[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

time_r.m4 checks unexpectedly pass on hpux10

From: Peter O'Gorman
Subject: time_r.m4 checks unexpectedly pass on hpux10
Date: Fri, 22 Feb 2008 14:00:41 -0600
User-agent: Mutt/1.5.17 (2007-11-01)


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 

Perhaps we should set ac_c_werror_flag=yes before running this test?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]