From 472b1fef81600e801235bb146dab0006208b4f47 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 15 Jan 2009 00:27:45 +0100 Subject: [PATCH] Fix a syntax error due to recursive inclusion of wchar.h on HP-UX 11.00. --- ChangeLog | 8 ++++++++ lib/stdint.in.h | 4 +++- lib/wchar.in.h | 13 ++++++++++--- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index c4e6c2fb5..766fde7bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2009-01-14 Bruno Haible + * lib/stdint.in.h (_GL_JUST_INCLUDE_SYSTEM_WCHAR_H): New macro, defined + while including . + * lib/wchar.in.h: In two particular situations on HP-UX, include only + the system's file. + Reported by Albert Chin . + +2009-01-14 Bruno Haible + * m4/csharp.m4: Don't mention gettext on the serial number line. * m4/csharpexec.m4: Likewise. * m4/eaccess.m4: Likewise. diff --git a/lib/stdint.in.h b/lib/stdint.in.h index a335fd07f..469a599ae 100644 --- a/lib/stdint.in.h +++ b/lib/stdint.in.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2002, 2004-2008 Free Software Foundation, Inc. +/* Copyright (C) 2001-2002, 2004-2009 Free Software Foundation, Inc. Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood. This file is part of gnulib. @@ -478,7 +478,9 @@ typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - includes -> -> -> , and the latter includes and assumes its types are already defined. */ #if ! (defined WCHAR_MIN && defined WCHAR_MAX) +# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H # include +# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H #endif #undef WCHAR_MIN #undef WCHAR_MAX diff --git a/lib/wchar.in.h b/lib/wchar.in.h index 74e5f249a..77c068b93 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -1,6 +1,6 @@ /* A substitute for ISO C99 , for platforms that have issues. - Copyright (C) 2007-2008 Free Software Foundation, Inc. + Copyright (C) 2007-2009 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,8 +30,15 @@ @PRAGMA_SYSTEM_HEADER@ #endif -#ifdef __need_mbstate_t -/* Special invocation convention inside uClibc header files. */ +#if defined __need_mbstate_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) +/* Special invocation convention: + - Inside uClibc header files. + - On HP-UX 11.00 we have a sequence of nested includes + -> -> , and the latter includes , + once indirectly -> -> -> + and once directly. In both situations 'wint_t' is not yet defined, + therefore we cannot provide the function overrides; instead include only + the system's . */ #@INCLUDE_NEXT@ @NEXT_WCHAR_H@ -- 2.11.0