Changeset 3232 in MondoRescue for branches/3.2/mindi-busybox/coreutils/date.c


Ignore:
Timestamp:
Jan 1, 2014, 12:47:38 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Update mindi-busybox to 1.21.1
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi-busybox/coreutils/date.c

    r2725 r3232  
    2020   much as possible, missed out a lot of bounds checking */
    2121
    22 //applet:IF_DATE(APPLET(date, _BB_DIR_BIN, _BB_SUID_DROP))
     22//applet:IF_DATE(APPLET(date, BB_DIR_BIN, BB_SUID_DROP))
    2323
    2424//kbuild:lib-$(CONFIG_DATE) += date.o
     
    4343//config:   bool "Support %[num]N nanosecond format specifier"
    4444//config:   default n
    45 //config:   depends on DATE && PLATFORM_LINUX # syscall(__NR_clock_gettime)
     45//config:   depends on DATE  # syscall(__NR_clock_gettime)
     46//config:   select PLATFORM_LINUX
    4647//config:   help
    4748//config:     Support %[num]N format specifier. Adds ~250 bytes of code.
     
    9899//usage:#define date_full_usage "\n\n"
    99100//usage:       "Display time (using +FMT), or set time\n"
    100 //usage:     "\nOptions:"
    101101//usage:    IF_NOT_LONG_OPTS(
    102102//usage:     "\n    [-s] TIME   Set time to TIME"
     
    130130//usage:     "\n    YYYY-MM-DD hh:mm[:ss]"
    131131//usage:     "\n    [[[[[YY]YY]MM]DD]hh]mm[.ss]"
     132//usage:    IF_FEATURE_DATE_COMPAT(
     133//usage:     "\n    'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead"
     134//usage:    )
    132135//usage:
    133136//usage:#define date_example_usage
     
    251254#if ENABLE_FEATURE_DATE_NANO
    252255        ts.tv_nsec = statbuf.st_mtim.tv_nsec;
    253         /* some toolchains use .st_mtimensec instead of st_mtim.tv_nsec */
     256        /* Some toolchains use .st_mtimensec instead of st_mtim.tv_nsec.
     257         * If you need #define _SVID_SOURCE 1 to enable st_mtim.tv_nsec,
     258         * drop a mail to project mailing list please
     259         */
    254260#endif
    255261    } else {
     
    280286
    281287        /* Correct any day of week and day of year etc. fields */
    282         tm_time.tm_isdst = -1;  /* Be sure to recheck dst */
     288        /* Be sure to recheck dst (but not if date is time_t format) */
     289        if (date_str[0] != '@')
     290            tm_time.tm_isdst = -1;
    283291        ts.tv_sec = validate_tm_time(date_str, &tm_time);
    284292
Note: See TracChangeset for help on using the changeset viewer.