#endif
if (slk)
return;
-#ifdef __minix
- {
- struct utimbuf timp;
- timp.actime = atime;
- timp.modtime = mtime;
- if (utime(fnm, &timp) < 0)
- goto bad;
- }
-#else
if (utimes(fnm, tv) == -1)
goto bad;
-#endif
return;
bad:
syswarn(1, errno, "Access/modification time set failed on: %s", fnm);
* @(#)pax.h 8.2 (Berkeley) 4/18/94
*/
-#if ! HAVE_NBTOOL_CONFIG_H && !defined(__minix)
+#if ! HAVE_NBTOOL_CONFIG_H
#define HAVE_LUTIMES 1
+#ifndef __minix
#define HAVE_STRUCT_STAT_ST_FLAGS 1
#endif
+#endif
/*
* BSD PAX global data structures and constants.
*/
signal:
/* set mtime of local file */
-#ifndef __minix
if (!n_flag && us.mtime && !o_stdout && of != NULL &&
(stat(path, &sb) != -1) && sb.st_mode & S_IFREG) {
struct timeval tv[2];
if (utimes(tmppath ? tmppath : path, tv))
warn("%s: utimes()", tmppath ? tmppath : path);
}
-#else
- if (!n_flag && us.mtime && !o_stdout && of != NULL &&
- (stat(path, &sb) != -1) && sb.st_mode & S_IFREG) {
- struct utimbuf ut;
-
- fflush(of);
- ut.actime = (us.atime ? us.atime : us.mtime);
- ut.modtime = us.mtime;
-
- if (utime(tmppath ? tmppath : path, &ut))
- warn("%s: utime()", tmppath ? tmppath : path);
- }
-#endif
/* timed out or interrupted? */
if (fetchLastErrCode == FETCH_TIMEOUT)
{
struct stat sb;
struct timeval tv[2];
- struct utimbuf timbuf;
int aflag, cflag, mflag, ch, fd, len, rval, timeset;
char *p;
continue;
}
-#if 0
if (!aflag)
TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atimespec);
if (!mflag)
TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtimespec);
-#else
- if (!aflag)
- tv[0].tv_sec = sb.st_atime;
- if (!mflag)
- tv[1].tv_sec = sb.st_mtime;
-#endif
/* Try utimes(2). */
-#if 0
if (!utimes(*argv, tv))
continue;
-#else
- timbuf.actime = tv[0].tv_sec;
- timbuf.modtime = tv[1].tv_sec;
- if (!utime(*argv, &timbuf))
- continue;
-#endif
/* If the user specified a time, nothing else we can do. */
if (timeset) {
* The permission checks are different, too, in that the
* ability to write the file is sufficient. Take a shot.
*/
-#if 0
if (!utimes(*argv, NULL))
continue;
-#else
- if (!utime(*argv, NULL))
- continue;
-#endif
rval = 1;
warn("%s", *argv);
if (stat(fname, &sb))
err(1, "%s", fname);
-#if 0
TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atimespec);
TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtimespec);
-#else
- (tvp + 0)->tv_sec = sb.st_atime;
- (tvp + 1)->tv_sec = sb.st_mtime;
-#endif
}
__dead void
#define HAVE_UTIME 1
/* Define to 1 if you have the `utimes' function. */
-/* #undef HAVE_UTIMES */
+#define HAVE_UTIMES 1
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
/* #undef HAVE_FUTIMENS */
/* Define to 1 if you have the `futimes' function. */
-/* #define HAVE_FUTIMES 1 */
+#define HAVE_FUTIMES 1
/* Define to 1 if you have the `geteuid' function. */
#define HAVE_GETEUID 1
/* #undef HAVE_LSTAT_EMPTY_STRING_BUG */
/* Define to 1 if you have the `lutimes' function. */
-/* #define HAVE_LUTIMES 1 */
+#define HAVE_LUTIMES 1
/* Define to 1 if you have the <lzmadec.h> header file. */
/* #undef HAVE_LZMADEC_H */
/* #undef HAVE_UTIMENSAT */
/* Define to 1 if you have the `utimes' function. */
-/* #define HAVE_UTIMES 1 */
+#define HAVE_UTIMES 1
/* Define to 1 if you have the <utime.h> header file. */
#define HAVE_UTIME_H 1
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `futimens' function. */
-/* #undef HAVE_FUTIMENS */
+#define HAVE_FUTIMENS 1
/* Define to 1 if you have the `futimes' function. */
#define HAVE_FUTIMES 1
/* #undef HAVE_UTIME */
/* Define to 1 if you have the `utimes' function. */
-/* #undef HAVE_UTIMES */
+#define HAVE_UTIMES 1
/* Define to 1 if you have the `wcwidth' function. */
#define HAVE_WCWIDTH 1
# install(1) parameters.
#
COPY?= -c
-.if ${HOST_OSTYPE:C/\-.*//} != "Minix"
.if ${MKUPDATE} == "no"
PRESERVE?=
.else
-#LSC: Not supported by MINIX install
PRESERVE?= -p
.endif
-#XXX: Not supported by MINIX install
RENAME?= -r
-.endif # != "Minix"
HRDLINK?= -l h
SYMLINK?= -l s
#include <unistd.h>
#include <time.h>
-#ifdef __minix
-#include <utime.h>
-#endif
-
#include "ssl.h"
#include "ftp_var.h"
#include "version.h"
progressmeter(1);
(void)fflush(fout);
if (closefunc == fclose && mtime != -1) {
-#ifdef __minix
- struct utimbuf utb;
-#endif /* __minix */
-
struct timeval tval[2];
(void)gettimeofday(&tval[0], NULL);
-
-#ifdef __minix
- utb.actime = tval[0].tv_sec;
- utb.modtime = mtime;
-#else /* !__minix */
tval[1].tv_sec = mtime;
tval[1].tv_usec = 0;
-#endif /* !__minix */
-
(*closefunc)(fout);
fout = NULL;
-#ifdef __minix
- if (utime(savefile, &utb) == -1) {
- fprintf(ttyout,
- "Can't change modification time to %s",
- rfc2822time(localtime(&mtime)));
- }
-#else /* !__minix */
if (utimes(savefile, tval) == -1) {
fprintf(ttyout,
"Can't change modification time to %s",
rfc2822time(localtime(&mtime)));
}
-#endif /* !__minix */
-
}
if (bytes > 0)
ptransfer(0);
#include <unistd.h>
#include <stdarg.h>
-#ifdef __minix
-#include <utime.h>
-#endif
-
#include "ftp_var.h"
volatile sig_atomic_t abrtflag;
int oprogress;
int opreserve;
-#ifdef __minix
- struct utimbuf utb;
-#endif
-
fout = NULL;
din = NULL;
hashbytes = mark;
mtime = remotemodtime(remote, 0);
if (mtime != -1) {
(void)gettimeofday(&tval[0], NULL);
-#ifdef __minix
- utb.actime = tval[0].tv_sec;
- utb.modtime = mtime;
- if (utime(local, &utb) == -1) {
- fprintf(ttyout,
- "Can't change modification time on %s to %s",
- local,
- rfc2822time(localtime(&mtime)));
- }
-#else
tval[1].tv_sec = mtime;
tval[1].tv_usec = 0;
if (utimes(local, tval) == -1) {
local,
rfc2822time(localtime(&mtime)));
}
-#endif
}
}
}
TIMESPEC_TO_TIMEVAL(×[0], &sb.st_atimespec);
TIMESPEC_TO_TIMEVAL(×[1], &sb.st_mtimespec);
-#ifndef __minix
if (futimes(fd, times) < 0)
maybe_warn("couldn't utimes: %s", file);
-#endif
}
#endif
break;
case 'p':
dopreserve = 1;
-#ifdef __minix
- warn("Minix lacks support for futimes(3)/utimes(2)");
-#endif
break;
case 'r':
dorename = 1;
/*
* Preserve the date of the source file.
*/
-#ifndef __minix
if (dopreserve) {
#if HAVE_FUTIMES
if (futimes(to_fd, tv) == -1)
warn("%s: utimes", to_name);
#endif
}
-#endif
(void)close(to_fd);
return -1;
}
#endif
-
-static int
-fake_utimes(const char *path, const struct timeval times[2])
-{
- return -1;
-}
-#undef utimes
-#define utimes(path, times) fake_utimes(path, times)
#endif
int