diff options
author | Ron Yorston <rmy@pobox.com> | 2014-01-19 22:10:30 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2014-01-19 22:10:30 +0000 |
commit | 19148b1e7ebb279bfbc1ea8be329f795fa2c1eb0 (patch) | |
tree | 5a5c20faa5a0385ef2f0d1e1595f77cd4eae8988 | |
parent | 9b6a1210733c8d069cd595d37809062ede2eca68 (diff) | |
download | busybox-w32-19148b1e7ebb279bfbc1ea8be329f795fa2c1eb0.tar.gz busybox-w32-19148b1e7ebb279bfbc1ea8be329f795fa2c1eb0.tar.bz2 busybox-w32-19148b1e7ebb279bfbc1ea8be329f795fa2c1eb0.zip |
date: add dummy stime
-rw-r--r-- | coreutils/date.c | 5 | ||||
-rw-r--r-- | include/mingw.h | 1 | ||||
-rw-r--r-- | win32/mingw.c | 6 |
3 files changed, 7 insertions, 5 deletions
diff --git a/coreutils/date.c b/coreutils/date.c index 4860aa308..767e0d4a2 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -293,14 +293,9 @@ int date_main(int argc UNUSED_PARAM, char **argv) | |||
293 | maybe_set_utc(opt); | 293 | maybe_set_utc(opt); |
294 | 294 | ||
295 | /* if setting time, set it */ | 295 | /* if setting time, set it */ |
296 | #if ENABLE_PLATFORM_MINGW32 | ||
297 | if (opt & OPT_SET) | ||
298 | bb_error_msg_and_die("Setting date is not supported"); | ||
299 | #else | ||
300 | if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { | 296 | if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { |
301 | bb_perror_msg("can't set date"); | 297 | bb_perror_msg("can't set date"); |
302 | } | 298 | } |
303 | #endif | ||
304 | } | 299 | } |
305 | 300 | ||
306 | /* Display output */ | 301 | /* Display output */ |
diff --git a/include/mingw.h b/include/mingw.h index 11edc449e..9f2e192b5 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -302,6 +302,7 @@ struct tm *gmtime_r(const time_t *timep, struct tm *result); | |||
302 | struct tm *localtime_r(const time_t *timep, struct tm *result); | 302 | struct tm *localtime_r(const time_t *timep, struct tm *result); |
303 | char *strptime(const char *s, const char *format, struct tm *tm); | 303 | char *strptime(const char *s, const char *format, struct tm *tm); |
304 | size_t mingw_strftime(const char *buf, size_t max, const char *format, const struct tm *tm); | 304 | size_t mingw_strftime(const char *buf, size_t max, const char *format, const struct tm *tm); |
305 | int stime(time_t *t); | ||
305 | 306 | ||
306 | #define strftime mingw_strftime | 307 | #define strftime mingw_strftime |
307 | 308 | ||
diff --git a/win32/mingw.c b/win32/mingw.c index bbeb3b8d8..b5b3576eb 100644 --- a/win32/mingw.c +++ b/win32/mingw.c | |||
@@ -835,6 +835,12 @@ size_t mingw_strftime(const char *buf, size_t max, const char *format, const str | |||
835 | return ret; | 835 | return ret; |
836 | } | 836 | } |
837 | 837 | ||
838 | int stime(time_t *t) | ||
839 | { | ||
840 | errno = EPERM; | ||
841 | return -1; | ||
842 | } | ||
843 | |||
838 | #undef access | 844 | #undef access |
839 | int mingw_access(const char *name, int mode) | 845 | int mingw_access(const char *name, int mode) |
840 | { | 846 | { |