This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix -Wundef warning for HAVE_OBSTACK
- From: Will Newton <will dot newton at linaro dot org>
- To: Siddhesh Poyarekar <siddhesh at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Wed, 9 Jul 2014 09:04:18 +0100
- Subject: Re: [PATCH] Fix -Wundef warning for HAVE_OBSTACK
- Authentication-results: sourceware.org; auth=none
- References: <20140709070106 dot GA18813 at spoyarek dot pnq dot redhat dot com>
On 9 July 2014 08:01, Siddhesh Poyarekar <siddhesh@redhat.com> wrote:
> Remove the HAVE_OBSTACK macro check and include obstack check in
> include path order since we don't have a copy of obstack.h in the
> current directory.
>
> Siddhesh
>
> * locale/programs/simple-hash.c [!HAVE_OBSTACK]: Remove code.
>
> ---
> locale/programs/simple-hash.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/locale/programs/simple-hash.c b/locale/programs/simple-hash.c
> index ef371a0..8d087da 100644
> --- a/locale/programs/simple-hash.c
> +++ b/locale/programs/simple-hash.c
> @@ -27,11 +27,7 @@
> #include <stdint.h>
> #include <sys/types.h>
>
> -#if HAVE_OBSTACK
> # include <obstack.h>
> -#else
> -# include "obstack.h"
> -#endif
>
> #ifdef HAVE_VALUES_H
> # include <values.h>
I wonder if we could go further than this - it looks like we should be
able to remove HAVE_CONFIG_H and HAVE_VALUES_H too.
Also the define of bcopy seems redundant.
And the definition of BITSPERBYTE. Maybe we can remove the include of
values.h too?
Your change looks ok in itself though (with fixed indentation).
--
Will Newton
Toolchain Working Group, Linaro