control change#1914 via hints (causes problems on some platforms)
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 19 Sep 1999 22:14:29 +0000 (22:14 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 19 Sep 1999 22:14:29 +0000 (22:14 +0000)
p4raw-link: @1914 on //depot/perl: e44f695ee9be4f523999589b52c7c8e9ddc1bed9

p4raw-id: //depot/perl@4196

ext/POSIX/POSIX.pod
ext/POSIX/POSIX.xs
ext/POSIX/hints/linux.pl

index 6ad74b7..75d4d1d 100644 (file)
@@ -1023,7 +1023,7 @@ about these and the other arguments.
 If you want your code to be portable, your format (C<fmt>) argument
 should use only the conversion specifiers defined by the ANSI C
 standard.  These are C<aAbBcdHIjmMpSUwWxXyYZ%>.
-The given arguments are made consistent
+On platforms that need it, the given arguments are made consistent
 by calling C<mktime()> before calling your system's C<strftime()> function.
 
 The string for Tuesday, December 12, 1995.
index 16217f0..e828d52 100644 (file)
@@ -3652,7 +3652,9 @@ strftime(fmt, sec, min, hour, mday, mon, year, wday = -1, yday = -1, isdst = -1)
            mytm.tm_wday = wday;
            mytm.tm_yday = yday;
            mytm.tm_isdst = isdst;
+#if defined(HINT_STRFTIME_NEEDS_MKTIME)
            (void) mktime(&mytm);
+#endif
            len = strftime(tmpbuf, sizeof tmpbuf, fmt, &mytm);
            /*
            ** The following is needed to handle to the situation where 
index f1d1981..8cec446 100644 (file)
@@ -2,4 +2,6 @@
 # Thanks to Bart Schuller <schuller@Lunatech.com>
 # See Message-ID: <19971009002636.50729@tanglefoot>
 #  XXX A Configure test is needed.
-$self->{CCFLAGS} = $Config{ccflags} . ' -DSTRUCT_TM_HASZONE -DHINT_SC_EXIST' ;
+$self->{CCFLAGS} = $Config{ccflags}
+                . ' -DHINT_STRFTIME_NEEDS_MKTIME'
+                . ' -DSTRUCT_TM_HASZONE -DHINT_SC_EXIST' ;