#include <sys/termio.h>
#endif
-/* ------------------------------- */
-/* miscellaneous */
-/* ------------------------------- */
-
-#ifndef HAVE_UTIMES
-#ifndef HAVE_STRUCT_UTIMBUF
-/* We want to use utime rather than utimes, but we couldn't find the
- structure declaration. We'll use the traditional one. */
-struct utimbuf
-{
- long actime;
- long modtime;
-};
-#endif
-#endif
-
\f
/************************************************************************/
/* subprocess control */
#ifdef DATA_START
return ((char *) DATA_START);
#else
-#ifdef ORDINARY_LINK
+#if defined (ORDINARY_LINK) || defined(PDUMP)
/*
* This is a hack. Since we're not linking crt0.c or pre_crt0.c,
* data_start isn't defined. We take the address of environ, which
Qfile_name);
Dynarr_add_many (internal_DIRENTRY, internal_name, internal_len);
- Dynarr_add (internal_DIRENTRY, 0); /* zero-terminate */
+ Dynarr_add (internal_DIRENTRY, '\0'); /* NUL-terminate */
return (DIRENTRY *) Dynarr_atp (internal_DIRENTRY, 0);
}
}
int
set_file_times (char *filename, EMACS_TIME atime, EMACS_TIME mtime)
{
-#ifdef HAVE_UTIMES
- struct timeval tv[2];
- tv[0] = atime;
- tv[1] = mtime;
- return utimes (filename, tv);
-#else /* not HAVE_UTIMES */
+#if defined (HAVE_UTIME)
struct utimbuf utb;
utb.actime = EMACS_SECS (atime);
utb.modtime = EMACS_SECS (mtime);
return utime (filename, &utb);
-#endif /* not HAVE_UTIMES */
+#elif defined (HAVE_UTIMES)
+ struct timeval tv[2];
+ tv[0] = atime;
+ tv[1] = mtime;
+ return utimes (filename, tv);
+#else
+ /* No file times setting function available. */
+ return -1;
+#endif
}
/* */