autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.69-21-g


From: Paul Eggert
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.69-21-gf52459d
Date: Thu, 06 Sep 2012 21:55:13 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=f52459d158bcf5edd4ca75a453bb012efd0f4d90

The branch, master has been updated
       via  f52459d158bcf5edd4ca75a453bb012efd0f4d90 (commit)
      from  db36f6df60b6aa4e692be7163407ef83c1de1afb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f52459d158bcf5edd4ca75a453bb012efd0f4d90
Author: Paul Eggert <address@hidden>
Date:   Thu Sep 6 14:50:27 2012 -0700

    AC_CHECK_ALIGNOF: fix cross-compilation bug with newer gcc
    
    * doc/autoconf.texi (Default Includes, Particular Functions)
    (Header Portability):
    * lib/autoconf/c.m4 (AC_LANG_FUNC_LINK_TRY(C)):
    * lib/autoconf/headers.m4 (AC_HEADER_STDC):
    * lib/autoconf/types.m4 (_AC_CHECK_ALIGNOF):
    * lib/m4sugar/m4sugar.m4 (m4_require) [comment only]:
    Assume the existence of the C89 freestanding headers <float.h>,
    <limits.h>, <stdarg.h>, <stddef.h>, as that's safe nowadays.
    This is less likely to run into gotchas, and should fix a
    cross-compilation bug with newer GCC reported by Myke Frysinger in
    <http://lists.gnu.org/archive/html/bug-autoconf/2012-09/msg00001.html>.

-----------------------------------------------------------------------

Summary of changes:
 doc/autoconf.texi       |   32 ++++++++------------------------
 lib/autoconf/c.m4       |   19 +++----------------
 lib/autoconf/headers.m4 |    8 ++------
 lib/autoconf/types.m4   |    3 ---
 lib/m4sugar/m4sugar.m4  |    4 ++--
 5 files changed, 15 insertions(+), 51 deletions(-)

diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 3d2fe1a..7b8bfd5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -3885,14 +3885,10 @@ Expand to @var{include-directives} if defined, 
otherwise to:
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef STDC_HEADERS
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
+#include <stddef.h>
 #ifdef HAVE_STRING_H
 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 #  include <memory.h>
@@ -4862,14 +4858,10 @@ like the following, to declare it properly.
 
 @example
 @group
-#ifdef STDC_HEADERS
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
+#include <stddef.h>
 #ifdef HAVE_ALLOCA_H
 # include <alloca.h>
 #elif !defined alloca
@@ -5764,14 +5756,10 @@ beforehand.  One should run:
 AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([net/if.h], [], [],
 [#include <stdio.h>
-#ifdef STDC_HEADERS
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
+#include <stddef.h>
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
@@ -5787,14 +5775,10 @@ On Darwin, this file requires that @file{stdio.h} and
 AC_CHECK_HEADERS([sys/socket.h])
 AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
 [#include <stdio.h>
-#ifdef STDC_HEADERS
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
+#include <stddef.h>
 #ifdef HAVE_SYS_SOCKET_H
 # include <sys/socket.h>
 #endif
diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index 7337245..e994609 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -154,16 +154,9 @@ m4_define([AC_LANG_FUNC_LINK_TRY(C)],
 #define $1 innocuous_$1
 
 /* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $1 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
+   which can conflict with char $1 (); below.  */
 
+#include <limits.h>
 #undef $1
 
 /* Override any GCC internal prototype to avoid an error.
@@ -348,15 +341,9 @@ for ac_[]_AC_LANG_ABBREV[]_preproc_warn_flag in '' yes
 do
   # Use a header file that comes with gcc, so configuring glibc
   # with a fresh cross-compiler works.
-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-  # <limits.h> exists even on freestanding compilers.
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp. "Syntax error" is here to catch this case.
-  _AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@ifdef __STDC__
address@hidden:@ include <limits.h>
address@hidden:@else
address@hidden:@ include <assert.h>
address@hidden:@endif
+  _AC_PREPROC_IFELSE([AC_LANG_SOURCE(address@hidden:@include <limits.h>
                     Syntax error]])],
                     [],
                     [# Broken: fails on valid input.
diff --git a/lib/autoconf/headers.m4 b/lib/autoconf/headers.m4
index 81a7fa2..58a2778 100644
--- a/lib/autoconf/headers.m4
+++ b/lib/autoconf/headers.m4
@@ -306,14 +306,10 @@ ac_includes_default="\
 #ifdef HAVE_SYS_STAT_H
 # include <sys/stat.h>
 #endif
-#ifdef STDC_HEADERS
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
 # include <stdlib.h>
-# include <stddef.h>
-#else
-# ifdef HAVE_STDLIB_H
-#  include <stdlib.h>
-# endif
 #endif
+#include <stddef.h>
 #ifdef HAVE_STRING_H
 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
 #  include <memory.h>
diff --git a/lib/autoconf/types.m4 b/lib/autoconf/types.m4
index 18fc175..f9ba33d 100644
--- a/lib/autoconf/types.m4
+++ b/lib/autoconf/types.m4
@@ -808,9 +808,6 @@ m4_define([_AC_CHECK_ALIGNOF],
 _AC_CACHE_CHECK_INT([alignment of $1], [AS_TR_SH([ac_cv_alignof_$3])],
   [(long int) offsetof (ac__type_alignof_, y)],
   [AC_INCLUDES_DEFAULT([$2])
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
 typedef struct { char x; $1 y; } ac__type_alignof_;],
   [if test "$AS_TR_SH([ac_cv_type_$3])" = yes; then
      AC_MSG_FAILURE([cannot compute alignment of $1], 77)
diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4
index 278bc05..12a9ab7 100644
--- a/lib/m4sugar/m4sugar.m4
+++ b/lib/m4sugar/m4sugar.m4
@@ -2038,10 +2038,10 @@ m4_define([m4_before],
 # - NAME-TO-CHECK == BODY-TO-EXPAND
 #   Which you can use for regular macros with or without arguments, e.g.,
 #     m4_require([AC_PROG_CC], [AC_PROG_CC])
-#     m4_require([AC_CHECK_HEADERS(limits.h)], [AC_CHECK_HEADERS(limits.h)])
+#     m4_require([AC_CHECK_HEADERS(threads.h)], [AC_CHECK_HEADERS(threads.h)])
 #   which is just the same as
 #     m4_require([AC_PROG_CC])
-#     m4_require([AC_CHECK_HEADERS(limits.h)])
+#     m4_require([AC_CHECK_HEADERS(threads.h)])
 #
 # - BODY-TO-EXPAND == m4_indir([NAME-TO-CHECK])
 #   In the case of macros with irregular names.  For instance:


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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