This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (3/6): i386-pc-interix-support -- libiberty


Jeffrey A Law <law@cygnus.com> writes:
> Actually, I may have incorrectly forwarded Craig & David that patch.  It's fo
> r
> libiberty stuff only.  For some reason I saw clock.c and thought of a module
> in libf2c.
> 
> Mumit -- was the only libf2c patch the one for the struct timezone problem?
> 

Yes, libf2c was the timezone one, and I'll send a autoconf patch tomorrow
after test on multiple platforms. 

My idea is the following (Dave?): Add a aclocal.m4 for libU77 and use

  LIBU77_HAVE_STRUCT_TIMEZONE macro as following:
  dnl See whether we have struct timezone
  dnl LIBU77_HAVE_STRUCT_TIMEZONE
  AC_DEFUN(LIBU77_HAVE_STRUCT_TIMEZONE,
  [AC_MSG_CHECKING([AC_CACHE_CHECK([whether struct timezone exists])
  AC_CACHE_VAL(libu77_cv_have_struct_timezone,
  [AC_TRY_COMPILE([#include <sys/time.h>],
  [struct timezone *tz;],
  libu77_ac_have_struct_timezone=no, libu77_ac_have_struct_timezone=yes)])
  if test $libu77_ac_have_struct_timezone = yes; then
  AC_DEFINE(HAVE_STRUCT_TIMEZONE)
  fi
  ])

and then, use that to declare a struct timezone or not. It's still not
correct, and neither is the current implementation, since on HPUX 
anything but a NULL pointer as the second arg is undefined behaviour.

Regards,
Mumit



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]