home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / gnu / utils / bug / 1522 < prev    next >
Encoding:
Text File  |  1992-09-09  |  2.2 KB  |  65 lines

  1. Newsgroups: gnu.utils.bug
  2. Path: sparky!uunet!cis.ohio-state.edu!claude.cs.umb.edu!karl
  3. From: karl@claude.cs.umb.edu (Karl Berry)
  4. Subject: autoconf 1.1: tzname decl
  5. Message-ID: <199209092056.AA09088@claude.cs.umb.edu>
  6. Sender: gnulists@ai.mit.edu
  7. Reply-To: karl@cs.umb.edu
  8. Organization: GNUs Not Usenet
  9. Distribution: gnu
  10. Date: Wed, 9 Sep 1992 12:56:08 GMT
  11. Approved: bug-gnu-utils@prep.ai.mit.edu
  12. Lines: 51
  13.  
  14. Autoconf 1.1 on a 486 running Interactive Unix 2.2.1.  (Someone else
  15. recently reported this problem for another system.)
  16.  
  17. In AC_TIMEZONE, the declaration of `tzname' is a problem. The decl in
  18. AC_TIMEZONE is `extern char **tzname'.  This conflicts with the system
  19. declaration
  20.  
  21.    extern char      *tzname[2];
  22.  
  23. and so Autoconf thinks the system doesn't have tzname.  This leads to
  24. `date' dumping core when it tries to call tzname as a function, or
  25. something like that.  (I didn't investigate it fully, since it seemed to
  26. me the right fix was to make Autoconf think the system had tzname[] if
  27. in fact it does.)
  28.  
  29. Anyway, since the declaration above is the one recommended by POSIX (for
  30. some reason), I think we should support it.  I fixed it below simply by
  31. removing the declaration from the test file to compile.
  32.  
  33. A more difficult but perhaps better alternative would be to see if
  34. tzname is in fact declared in <time.h>, and, if not, put in the default
  35. `extern char **tzname;'.  I don't know if there are in fact systems
  36. which have tzname but do not declare it.
  37.  
  38. Sun Sep  6 10:33:07 1992  Karl Berry  (karl@hayley)
  39.  
  40.         * AC_TIMEZONE: do not declare tzname, as it might conflict with
  41.           <time.h>.
  42.  
  43. *** acspecific.m4    Mon Aug 24 16:26:51 1992
  44. --- /usr/local/gnu/lib/acspecific.m4    Sun Sep  6 10:15:36 1992
  45. ***************
  46. *** 483,491 ****
  47.   [struct tm tm; tm.tm_zone;], AC_DEFINE(HAVE_TM_ZONE), no_tm_zone=1)
  48.   if test -n "$no_tm_zone"; then
  49.   AC_COMPILE_CHECK(tzname, [#include <time.h>
  50. ! #ifndef tzname /* For SGI.  */
  51. ! extern char **tzname;
  52. ! #endif], [atoi(*tzname);], AC_DEFINE(HAVE_TZNAME))
  53.   fi
  54.   ])dnl
  55.   dnl
  56. --- 483,489 ----
  57.   [struct tm tm; tm.tm_zone;], AC_DEFINE(HAVE_TM_ZONE), no_tm_zone=1)
  58.   if test -n "$no_tm_zone"; then
  59.   AC_COMPILE_CHECK(tzname, [#include <time.h>
  60. ! ], [atoi(*tzname);], AC_DEFINE(HAVE_TZNAME))
  61.   fi
  62.   ])dnl
  63.   dnl
  64.  
  65.