On Mon, May 05, 2014 at 20:10, enh wrote:
> i've accidentally been building wcsftime.c without
> -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU and i've
> been seeing a warning:

yikes. agreed, but i think it's past time to cure the disease, not treat
the symptoms. :)

Index: private.h
===================================================================
RCS file: /cvs/src/lib/libc/time/private.h,v
retrieving revision 1.25
diff -u -p -r1.25 private.h
--- private.h   13 Sep 2012 11:14:20 -0000      1.25
+++ private.h   6 May 2014 04:03:00 -0000
@@ -16,7 +16,6 @@
 #define STD_INSPIRED           1
 #define HAVE_STRERROR          1
 #define HAVE_STDINT_H          1
-#define NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU        1
 
 /*
 ** This header is for use ONLY with the time conversion code.
Index: strftime.c
===================================================================
RCS file: /cvs/src/lib/libc/time/strftime.c,v
retrieving revision 1.21
diff -u -p -r1.21 strftime.c
--- strftime.c  13 Sep 2012 11:14:20 -0000      1.21
+++ strftime.c  6 May 2014 04:02:32 -0000
@@ -111,10 +111,6 @@ static char *      _yconv(int, int, int, int,
 
 extern char *  tzname[];
 
-#ifndef YEAR_2000_NAME
-#define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS"
-#endif /* !defined YEAR_2000_NAME */
-
 #define IN_NONE        0
 #define IN_SOME        1
 #define IN_THIS        2
@@ -136,22 +132,6 @@ const struct tm * const    t;
 #endif /* defined LOCALE_HOME */
        warn = IN_NONE;
        p = _fmt(((format == NULL) ? "%c" : format), t, s, s + maxsize, &warn);
-#ifndef NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU
-       if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) {
-               (void) fprintf(stderr, "\n");
-               if (format == NULL)
-                       (void) fprintf(stderr, "NULL strftime format ");
-               else    (void) fprintf(stderr, "strftime format \"%s\" ",
-                               format);
-               (void) fprintf(stderr, "yields only two digits of years in ");
-               if (warn == IN_SOME)
-                       (void) fprintf(stderr, "some locales");
-               else if (warn == IN_THIS)
-                       (void) fprintf(stderr, "the current locale");
-               else    (void) fprintf(stderr, "all locales");
-               (void) fprintf(stderr, "\n");
-       }
-#endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */
        if (p == s + maxsize) {
                if (maxsize > 0)
                        s[maxsize - 1] = '\0';
Index: wcsftime.c
===================================================================
RCS file: /cvs/src/lib/libc/time/wcsftime.c,v
retrieving revision 1.2
diff -u -p -r1.2 wcsftime.c
--- wcsftime.c  20 Jan 2013 20:29:02 -0000      1.2
+++ wcsftime.c  6 May 2014 04:02:48 -0000
@@ -110,10 +110,6 @@ static wchar_t *   _yconv(int, int, int, i
 
 extern char *  tzname[];
 
-#ifndef YEAR_2000_NAME
-#define YEAR_2000_NAME "CHECK_STRFTIME_FORMATS_FOR_TWO_DIGIT_YEARS"
-#endif /* !defined YEAR_2000_NAME */
-
 #define IN_NONE        0
 #define IN_SOME        1
 #define IN_THIS        2
@@ -129,22 +125,6 @@ wcsftime(wchar_t *__restrict s, size_t m
        tzset();
        warn = IN_NONE;
        p = _fmt(((format == NULL) ? L"%c" : format), t, s, s + maxsize, &warn);
-#ifndef NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU
-       if (warn != IN_NONE && getenv(YEAR_2000_NAME) != NULL) {
-               (void) fprintf(stderr, "\n");
-               if (format == NULL)
-                       (void) fprintf(stderr, "NULL strftime format ");
-               else    (void) fwprintf(stderr, "strftime format \"%ls\" ",
-                               format);
-               (void) fprintf(stderr, "yields only two digits of years in ");
-               if (warn == IN_SOME)
-                       (void) fprintf(stderr, "some locales");
-               else if (warn == IN_THIS)
-                       (void) fprintf(stderr, "the current locale");
-               else    (void) fprintf(stderr, "all locales");
-               (void) fprintf(stderr, "\n");
-       }
-#endif /* !defined NO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU */
        if (p == s + maxsize) {
                if (maxsize > 0)
                        s[maxsize - 1] = '\0';

Reply via email to