]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): Avoid `gcc -Wall'
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 25 Sep 2006 17:50:06 +0000 (17:50 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 25 Sep 2006 17:50:06 +0000 (17:50 +0000)
warnings (uninitialized value).
(AC_FUNC_UTIME_NULL): Likewise, test for and include <utime.h> if
present.
* lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Likewise, add
parentheses.
(AC_STRUCT_TM): Likewise, avoid unused variables.

ChangeLog
lib/autoconf/functions.m4
lib/autoconf/types.m4

index 02ebfe9705eae0f9c5b367df8e4b334118a6d656..eb9f84f5a2cf6f40637780b5412dbc2a09873fc2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
+       and Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * lib/autoconf/functions.m4 (AC_FUNC_OBSTACK): Avoid `gcc -Wall'
+       warnings (uninitialized value).
+       (AC_FUNC_UTIME_NULL): Likewise, test for and include <utime.h> if
+       present.
+       * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT): Likewise, add
+       parentheses.
+       (AC_STRUCT_TM): Likewise, avoid unused variables.
+
 2006-09-20  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * lib/autoconf/c.m4 (_AC_ARG_VAR_LDFLAGS): Update comment.
index a18274c1f7519558c975188eb222b284bacd11c6..343e06f55a21af03a3d33c503de92ae31733b894 100644 (file)
@@ -1340,7 +1340,9 @@ AC_DEFUN([AC_FUNC_OBSTACK],
 AC_CACHE_CHECK([for obstacks], ac_cv_func_obstack,
 [AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[@%:@include "obstack.h"]],
-                    [[struct obstack *mem; obstack_free(mem,(char *) 0)]])],
+                    [[struct obstack mem;
+                      obstack_init (&mem);
+                      obstack_free (&mem, 0);]])],
                [ac_cv_func_obstack=yes],
                [ac_cv_func_obstack=no])])
 if test $ac_cv_func_obstack = yes; then
@@ -1758,10 +1760,14 @@ AU_ALIAS([AC_STRCOLL], [AC_FUNC_STRCOLL])
 # ------------------
 AN_FUNCTION([utime], [AC_FUNC_UTIME_NULL])
 AC_DEFUN([AC_FUNC_UTIME_NULL],
-[AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
+[AC_CHECK_HEADERS_ONCE(utime.h)
+AC_CACHE_CHECK(whether utime accepts a null argument, ac_cv_func_utime_null,
 [rm -f conftest.data; >conftest.data
 # Sequent interprets utime(file, 0) to mean use start of epoch.  Wrong.
-AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
+              #ifdef HAVE_UTIME_H
+              # include <utime.h>
+              #endif],
 [[struct stat s, t;
   return ! (stat ("conftest.data", &s) == 0
            && utime ("conftest.data", 0) == 0
index 9a0d2e4105dfb0c2b79f8250d0fc08a21e82c4ec..31c06415eec6ddced78c8a9ae898bc00df6dad6f 100644 (file)
@@ -479,7 +479,7 @@ AC_DEFUN([AC_TYPE_LONG_LONG_INT],
                           ? 1 : -1)];
            int i = 63;]],
          [[long long int llmax = 9223372036854775807ll;
-           return (ll << 63 | ll >> 63 | ll < i | ll > i
+           return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
                    | llmax / ll | llmax % ll);]])],
        [ac_cv_type_long_long_int=yes],
        [ac_cv_type_long_long_int=no])])
@@ -919,7 +919,9 @@ AC_DEFUN([AC_STRUCT_TM],
 [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/types.h>
 #include <time.h>
 ],
-                                   [struct tm *tp; tp->tm_sec;])],
+                                   [struct tm tm;
+                                    int *p = &tm.tm_sec;
+                                    return !p;])],
                   [ac_cv_struct_tm=time.h],
                   [ac_cv_struct_tm=sys/time.h])])
 if test $ac_cv_struct_tm = sys/time.h; then