From: David Edelsohn <dje.gcc@gmail.com>
To: Pedro Alves <palves@redhat.com>
Cc: GDB Patches <gdb-patches@sourceware.org>
Subject: Re: GDB AIX build broken
Date: Tue, 25 Oct 2016 01:08:00 -0000 [thread overview]
Message-ID: <CAGWvnynLfvUNDG27SaBCFxp=tFS4zPkgQvyiogxFbFzN6Jbo1A@mail.gmail.com> (raw)
In-Reply-To: <12052de4-a0dd-8d23-2f46-57e91059cfa5@redhat.com>
On Mon, Oct 24, 2016 at 8:50 PM, Pedro Alves <palves@redhat.com> wrote:
> 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?
common-defs.h needs __STDC_FORMAT_MACROS defined before stdio.h is
included, as one possible solution.
Thanks, David
> 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
>
next prev parent reply other threads:[~2016-10-25 1:08 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 22:40 David Edelsohn
2016-10-24 22:46 ` Pedro Alves
2016-10-24 22:53 ` David Edelsohn
2016-10-24 23:00 ` Pedro Alves
2016-10-25 0:13 ` David Edelsohn
2016-10-25 0:31 ` Pedro Alves
2016-10-25 0:50 ` Pedro Alves
2016-10-25 1:08 ` David Edelsohn [this message]
2016-10-25 1:22 ` Pedro Alves
2016-10-25 10:58 ` [pushed] Define __STDC_CONSTANT_MACROS/__STDC_LIMIT_MACROS again (Re: GDB AIX build broken) Pedro Alves
2016-10-25 12:41 ` David Edelsohn
2016-10-25 12:48 ` Pedro Alves
2016-10-25 12:54 ` [pushed] common/common-defs.h: Define __STDC_FORMAT_MACROS as well " Pedro Alves
2016-10-25 13:01 ` David Edelsohn
2016-10-25 0:51 ` GDB AIX build broken David Edelsohn
2016-10-25 1:10 ` Pedro Alves
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAGWvnynLfvUNDG27SaBCFxp=tFS4zPkgQvyiogxFbFzN6Jbo1A@mail.gmail.com' \
--to=dje.gcc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox