Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
de5bf5d3
Commit
de5bf5d3
authored
Feb 23, 1992
by
Jim Blandy
Browse files
*** empty log message ***
parent
9ab9afa9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
29 deletions
+7
-29
src/fileio.c
src/fileio.c
+7
-29
No files found.
src/fileio.c
View file @
de5bf5d3
...
...
@@ -22,7 +22,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <sys/stat.h>
#ifdef VMS
#include "pwd.h"
#include "
vms-
pwd.h"
#else
#include <pwd.h>
#endif
...
...
@@ -64,13 +64,7 @@ extern int sys_nerr;
#include <nam.h>
#endif
#ifdef NEED_TIME_H
#include <time.h>
#else /* not NEED_TIME_H */
#ifdef HAVE_TIMEVAL
#include <sys/time.h>
#endif /* HAVE_TIMEVAL */
#endif /* not NEED_TIME_H */
#include "systime.h"
#ifdef HPUX
#include <netio.h>
...
...
@@ -1417,33 +1411,17 @@ A prefix arg makes KEEP-TIME non-nil.")
if (fstat (ifd, &st) >= 0)
{
#ifdef HAVE_TIMEVAL
if (!NILP (keep_date))
{
#ifdef USE_UTIME
/* AIX has utimes() in compatibility package, but it dies. So use good old
utime interface instead. */
struct {
time_t atime;
time_t mtime;
} tv;
tv.atime = st.st_atime;
tv.mtime = st.st_mtime;
utime (XSTRING (newname)->data, &tv);
#else /* not USE_UTIME */
struct timeval timevals[2];
timevals[0].tv_sec = st.st_atime;
timevals[1].tv_sec = st.st_mtime;
timevals[0].tv_usec = timevals[1].tv_usec = 0;
utimes (XSTRING (newname)->data, timevals);
#endif /* not USE_UTIME */
EMACS_TIME atime, mtime;
EMACS_SET_SECS_USECS (atime, st.st_atime, 0);
EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
EMACS_SET_UTIMES (XSTRING (newname)->data, atime, mtime);
}
#endif /* HAVE_TIMEVALS */
#ifdef APOLLO
if (!egetenv ("USE_DOMAIN_ACLS"))
#endif
chmod (XSTRING (newname)->data, st.st_mode & 07777);
chmod (XSTRING (newname)->data, st.st_mode & 07777);
}
close (ifd);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment