]> arthur.barton.de Git - netatalk.git/commitdiff
Check for struct tm.tm_gmtoff instead of defining NO_STRUCT_TM_GMTOFF on
authorsrittau <srittau>
Mon, 15 Dec 2003 05:27:24 +0000 (05:27 +0000)
committersrittau <srittau>
Mon, 15 Dec 2003 05:27:24 +0000 (05:27 +0000)
a per-architecture basis.

bin/megatron/macbin.c
configure.in
sys/solaris/Makefile.kernel.in

index e6f52d507895765ff975b383152db8f73755f5d8..b98ef75720e658fd6d4a819b06c7c32560da3266 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: macbin.c,v 1.10 2002-02-16 17:12:53 srittau Exp $
+ * $Id: macbin.c,v 1.11 2003-12-15 05:27:24 srittau Exp $
  */
 
 #ifdef HAVE_CONFIG_H
@@ -85,12 +85,12 @@ int bin_open( binfile, flags, fh, options )
 
     /* call localtime so that we get the timezone offset */
     bin.gmtoff = 0;
-#ifndef NO_STRUCT_TM_GMTOFF
+#ifdef HAVE_STRUCT_TM_TM_GMTOFF
     time(&t);
     tp = localtime(&t);
     if (tp)
         bin.gmtoff = tp->tm_gmtoff;
-#endif /* ! NO_STRUCT_TM_GMTOFF */
+#endif /* HAVE_STRUCT_TM_TM_GMTOFF */
 
     if ( flags == O_RDONLY ) { /* input */
        if ( strcmp( binfile, STDIN ) == 0 ) {
index dcf9b175e08c334bf0b343e6db9e4eddf2cd3580..bd947583344285f5d159ab94e4924670f5bc0a89 100644 (file)
@@ -1,4 +1,4 @@
-dnl $Id: configure.in,v 1.195 2003-12-15 05:05:19 srittau Exp $
+dnl $Id: configure.in,v 1.196 2003-12-15 05:27:24 srittau Exp $
 dnl configure.in for netatalk
 
 AC_INIT(etc/afpd/main.c)
@@ -10,7 +10,10 @@ AC_CANONICAL_SYSTEM
 AM_INIT_AUTOMAKE(netatalk, ${NETATALK_VERSION})
 AM_CONFIG_HEADER(config.h)
 
+dnl
 dnl Checks for programs.
+dnl
+
 AC_PROG_AWK
 AC_PROG_CC
 AC_PROG_INSTALL
@@ -24,12 +27,15 @@ AC_PROG_PS
 AC_PROG_DVIPS
 AC_PROG_TROFF2PS
 
+dnl
+dnl Checks for libraries.
+dnl
+
 dnl *********************************************************************
 dnl FIXME! FIXME! These should be selectable properly, and should produce
 dnl the proper flags and defines...
 dnl *********************************************************************
 
-dnl Checks for libraries.
 dnl Replace `main' with a function in -labs:
 AC_CHECK_LIB(abs, main)
 dnl Replace `main' with a function in -laudit:
@@ -67,17 +73,20 @@ AC_CHECK_LIB(sys, main)
 dnl Replace `main' with a function in -lubik:
 AC_CHECK_LIB(ubik, main)
 
-#
-# Check presence of some functions
-#
-# Check for XPG4 access() function
-# Be sure to test before adding AFS libs in LIBS path as AFS lib
-# has such a function that works only on AFS filesystems.
+dnl
+dnl Checks for presence of some functions.
+dnl
+
+dnl Check for XPG4 access() function
+dnl Be sure to test before adding AFS libs in LIBS path as AFS lib
+dnl has such a function that works only on AFS filesystems.
 AC_CHECK_FUNCS(access)
-# 
 AC_CHECK_FUNCS(pread pwrite)
 
+dnl
 dnl Checks for header files.
+dnl
+
 AC_HEADER_DIRENT
 AC_HEADER_STDC
 AC_HEADER_SYS_WAIT
@@ -87,7 +96,10 @@ AC_CHECK_HEADER(sys/cdefs.h,,
        CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
 )
 
+dnl
 dnl Checks for typedefs, structures, and compiler characteristics.
+dnl
+
 AC_C_CONST
 AC_TYPE_UID_T
 AC_C_INLINE
@@ -98,8 +110,12 @@ AC_TYPE_SIZE_T
 AC_STRUCT_ST_RDEV
 AC_HEADER_TIME
 AC_STRUCT_TM
+AC_CHECK_MEMBERS(struct tm.tm_gmtoff,,, [#include <time.h>])
 
+dnl
 dnl Checks for library functions.
+dnl
+
 AC_TYPE_GETGROUPS
 AC_PROG_GCC_TRADITIONAL
 AC_FUNC_MEMCMP
@@ -111,7 +127,10 @@ AC_FUNC_WAIT3
 AC_CHECK_FUNCS(getcwd gethostname gettimeofday getusershell mkdir rmdir select socket strdup strcasestr strstr strtoul setpgrp strchr memcpy)
 AC_FUNC_SETPGRP
 
+dnl
 dnl Checks for (v)snprintf
+dnl
+
 NETATALK_SNPRINTF_CHECK
 
 dnl --------------------------------------------------------------------------
@@ -467,7 +486,6 @@ dnl --------------------- operating system specific flags (port from sys/*)
 dnl ----- AIX specific -----
 if test x"$this_os" = "xaix"; then
        AC_MSG_RESULT([ * AIX specific configuration])
-       AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
 
        dnl This is probably a lie; AIX 4.3 supports a 64-bit long
        dnl compilation environment.  It's enough to get things defined
@@ -489,14 +507,6 @@ if test x"$this_os" = "xhpux11"; then
        AC_MSG_RESULT([ * HP-UX 11 specific configuration])
 
        AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
-       AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
-fi
-
-dnl ----- IRIX specific -----
-if test x"$this_os" = "xirix"; then
-       AC_MSG_RESULT([ * IRIX specific configuration])
-
-       AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
 fi
 
 dnl ----- Linux specific -----
@@ -599,7 +609,6 @@ if test x"$this_os" = "xsolaris"; then
        AC_MSG_RESULT([ * Solaris specific configuration])
        AC_DEFINE(__svr4__, 1, [Solaris compatibility macro])
        AC_DEFINE(_ISOC9X_SOURCE, 1, [Compatibility macro])
-       AC_DEFINE(NO_STRUCT_TM_GMTOFF, 1, [Define if the gmtoff member of struct tm is not available])
        AC_DEFINE(SOLARIS, 1, [Solaris compatibility macro])
        CFLAGS="-I\$(top_srcdir)/sys/generic $CFLAGS"
        need_dash_r=yes
index a4e462056b891db7bc3f7395ffa3a5f29a21a0d3..5624a89fc4a94f75afec24ee0c7e60c4ed28c3b6 100644 (file)
@@ -1,7 +1,7 @@
 # Solaris specific defines, passed to subdirectories.
 # To use Sun CC, uncomment the CC and KFLAGS variables.
 #
-# $Id: Makefile.kernel.in,v 1.4 2003-06-17 06:39:37 srittau Exp $
+# $Id: Makefile.kernel.in,v 1.5 2003-12-15 05:27:24 srittau Exp $
 
 
 # uncomment for 64-bit sparc kernel
@@ -38,7 +38,7 @@ LIBSHARED=      -ldl
 # -D_ISOC9X_SOURCE is handled by OSVERSION. basically, it's not needed
 # with 2.5.1.
 # add -DHAVE_IFNAMEINDEX if you're using solaris 8.
-DEFS=  -DNO_STRUCT_TM_GMTOFF -DHAVE_IFNAMEINDEX -D__svr4__ -DSOLARIS -I../../sys/generic \
+DEFS=  -DHAVE_IFNAMEINDEX -D__svr4__ -DSOLARIS -I../../sys/generic \
        -I.. ${OSDEFS} ${MACHINEDEFS}
 AFPLIBS=
 ADDLIBS=       -lsocket -lnsl