Author michael-o
Recipients michael-o
Date 2018-08-14.12:36:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
strftime() fails on HP-UX. It is mapped to wcsftime(3). It has a quirk on HP-UX that is does not conform to POSIX. To enable POSIX compat one has to do (excerpt from manpage):
>       The "Unix Standards Only" prototype of wcsftime() is available to
>       applications if they are:
>            a. c99 conformant.
>            b. Compiled with -D_XOPEN_SOURCE macro with a value >=500.
>            c. Compiled with -D_POSIX_C_SOURCE macro with a value >= 200112.
>       Also the application must be compiled with the environment variable
>       UNIX_STD set to the value 98 or above and exported.

b and c are satasfied according to config.log. Let's get to a). The manpage of aCC says:
>     Environment Variables
>       [...]
>       UNIX95 or UNIX_STD specify the XPG4 behavior for c89(1) and c99(1).
>       -D_XOPEN_UNIX is also set.  UNIX_STD must be set to 1995, 1998 or
>       2003.  Both these variables cause an appropriate object file to be
>       linked into executables in order to customize libc to match ISO/IEC
>       9899:1990/Amendment 1:1995 (1995) and the C++ and C99 Standards for
>       the various wide char (1998) or other C99 libc functions (2003).
>       NOTE: 2003 is only available on HP-UX 11.31.

So one must at least do "export UNIX_STD=1998".

I am quite certain that other parts of Python are affected too.

The safest bet would be actually to test wcsftime at configure time wether the output is fine and have this env var set in the Makefile, unfortunately, this will only work for GNU make. Alternatively, a warning at the very end of the configure run has to be printed to export this env var.

If done, test_strftime and test_teststrptime will pass flawlessly.
Date User Action Args
2018-08-14 12:36:57michael-osetrecipients: + michael-o
2018-08-14 12:36:57michael-osetmessageid: <>
2018-08-14 12:36:57michael-olinkissue34402 messages
2018-08-14 12:36:57michael-ocreate