Hi,
HP-UX10 has:
int gmtime_r(const time_t *timer, struct tm *result);
int localtime_r(const time_t *timer, struct tm *result);
Which is, as you know, not standards conforming.
However, compiling the test case for reentrant time functions on
hpux10 with its native cc and -Ae results in a compiler warning, not
an error. So the test, unfortunately, passes.
The test case is:
#include <time.h>
int main() {
/* We don't need to append 'restrict's to the argument types,
even though the POSIX signature has the 'restrict's,
since C99 says they can't affect type compatibility. */
struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
if (ptr) return 0;
}
The compile line and warning:
cc -Ae -c lcltimecheck.c -D_REENTRANT
cc: "lcltimecheck.c", line 7: warning 604: Pointers are not
assignment-compatible.
Perhaps we should set ac_c_werror_flag=yes before running this test?
Thanks,
Peter