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
546ec8fb
Commit
546ec8fb
authored
Sep 18, 1994
by
Karl Heuer
Browse files
(set_file_times): New function.
parent
f48c727a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
26 deletions
+24
-26
src/sysdep.c
src/sysdep.c
+24
-26
No files found.
src/sysdep.c
View file @
546ec8fb
...
...
@@ -3023,36 +3023,34 @@ rename (from, to)
#endif
#ifdef MISSING_UTIMES
/* HPUX (among others) sets HAVE_TIMEVAL but does not implement utimes. */
utimes
()
int
set_file_times
(
path
,
atime
,
mtime
)
char
*
path
;
EMACS_TIME
atime
,
mtime
;
{
}
#ifdef HAVE_UTIMES
struct
timeval
tv
[
2
];
tv
[
0
]
=
atime
;
tv
[
1
]
=
mtime
;
return
utimes
(
path
,
tv
);
#else
#ifdef HAVE_UTIME
#ifndef HAVE_STRUCT_UTIMBUF
struct
utimbuf
{
long
actime
;
long
modtime
;
};
#endif
#ifdef IRIS_UTIME
/* The IRIS (3.5) has timevals, but uses sys V utime, and doesn't have the
utimbuf structure defined anywhere but in the man page. */
struct
utimbuf
{
long
actime
;
long
modtime
;
};
utimes
(
name
,
tvp
)
char
*
name
;
struct
timeval
tvp
[];
{
struct
utimbuf
utb
;
utb
.
actime
=
tvp
[
0
].
tv_sec
;
utb
.
modtime
=
tvp
[
1
].
tv_sec
;
utime
(
name
,
&
utb
);
utb
.
actime
=
EMACS_SECS
(
atime
);
utb
.
modtime
=
EMACS_SECS
(
mtime
);
return
utime
(
path
,
&
utb
);
#else
/* !HAVE_UTIMES && !HAVE_UTIME */
/* Should we set errno here? If so, set it to what? */
return
-
1
;
#endif
#endif
}
#endif
/* IRIS_UTIME */
#ifdef HPUX
...
...
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