This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GDB AIX build broken


On 10/25/2016 01:31 AM, Pedro Alves wrote:
> On 10/25/2016 01:13 AM, David Edelsohn wrote:
>> On Mon, Oct 24, 2016 at 7:00 PM, Pedro Alves <palves@redhat.com> wrote:
>>
>>> That's a hint, but it can't be the fix.  common-defs.h must be the
>>> first file included.  I suspect that gnulib's inttypes.h
>>> replacement logic is broken on AIX.
>>
>> The gnulib import definitely is the commit that caused the breakage.

Could it be it's the commit after the import?  The one
that removes __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS from
common-defs.h?

Looking at the import (49e4877c5487), we see that stdint.h
now relies on a new limits.h replacement, which sounds suspicious.

# The substitute stdint.h needs the substitute limit.h's _GL_INTEGER_WIDTH:

+  LIMITS_H=limits.h
+   if test -n "$LIMITS_H"; then
+  GL_GENERATE_LIMITS_H_TRUE=
+  GL_GENERATE_LIMITS_H_FALSE='#'
+else
+  GL_GENERATE_LIMITS_H_TRUE='#'
+  GL_GENERATE_LIMITS_H_FALSE=


and it had this change:

--- a/gdb/gnulib/import/stdint.in.h
+++ b/gdb/gnulib/import/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2015 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2016 Free Software Foundation, Inc.
    Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
    This file is part of gnulib.
 
@@ -79,54 +79,51 @@
 #if ! defined _@GUARD_PREFIX@_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
 #define _@GUARD_PREFIX@_STDINT_H
 
+/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
+   LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH.  */
+#include <limits.h>
+
+#if ! @HAVE_C99_STDINT_H@
+
 /* <sys/types.h> defines some of the stdint.h types as well, on glibc,
    IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
    AIX 5.2 <sys/types.h> isn't needed and causes troubles.
    Mac OS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
    relies on the system <stdint.h> definitions, so include
    <sys/types.h> after @NEXT_STDINT_H@.  */
-#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
-# include <sys/types.h>
-#endif
-
-/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
-   LONG_MIN, LONG_MAX, ULONG_MAX.  */
-#include <limits.h>
+# if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+#  include <sys/types.h>
+# endif
 

Note the new HAVE_C99_STDINT_H check.  The _AIX check
is also curious.

Thanks,
Pedro Alves


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