From: Gurusamy Sarathy Date: Sun, 19 Sep 1999 22:14:29 +0000 (+0000) Subject: control change#1914 via hints (causes problems on some platforms) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=371b7e1ad2e46c79c7794d9b0f41b49157e7653c;p=p5sagit%2Fp5-mst-13.2.git control change#1914 via hints (causes problems on some platforms) p4raw-link: @1914 on //depot/perl: e44f695ee9be4f523999589b52c7c8e9ddc1bed9 p4raw-id: //depot/perl@4196 --- diff --git a/ext/POSIX/POSIX.pod b/ext/POSIX/POSIX.pod index 6ad74b7..75d4d1d 100644 --- a/ext/POSIX/POSIX.pod +++ b/ext/POSIX/POSIX.pod @@ -1023,7 +1023,7 @@ about these and the other arguments. If you want your code to be portable, your format (C) argument should use only the conversion specifiers defined by the ANSI C standard. These are C. -The given arguments are made consistent +On platforms that need it, the given arguments are made consistent by calling C before calling your system's C function. The string for Tuesday, December 12, 1995. diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs index 16217f0..e828d52 100644 --- a/ext/POSIX/POSIX.xs +++ b/ext/POSIX/POSIX.xs @@ -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 diff --git a/ext/POSIX/hints/linux.pl b/ext/POSIX/hints/linux.pl index f1d1981..8cec446 100644 --- a/ext/POSIX/hints/linux.pl +++ b/ext/POSIX/hints/linux.pl @@ -2,4 +2,6 @@ # Thanks to Bart Schuller # 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' ;