bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: GNU Diffutils 2.8 is available


From: Paul Eggert
Subject: Re: GNU Diffutils 2.8 is available
Date: Tue, 26 Mar 2002 14:06:18 -0800 (PST)

> From: Albert Chin <address@hidden>
> Date: Tue, 26 Mar 2002 14:37:37 -0600
> 
> On Tru64 UNIX with the Commercial C compiler (not the one from the
> base OS), <stdbool.h> in /usr/include.dtk has:
>   #define bool    _Bool
> 
> I have no idea what _Bool is

On many hosts _Bool is built into the compiler.

>   gmake[3]: Entering directory `/opt/build/diffutils-2.8/lib'
>   cc -DHAVE_CONFIG_H -I. -I. -I.. -I../intl
>   -I/opt/TWWfsw/libiconv17/include  -O2 -std1 -c `test -f exclude.c ||
>   echo './'`exclude.c
>   cc: Error: exclude.h, line 49: Missing ";". (nosemi)
>   bool excluded_filename PARAMS ((struct exclude const *, char const *));
>   -----^

Sorry, I don't understand the problem yet.  This compile doesn't use
system.h or setmode.c, so it must be a problem with exclude.c alone.

Your proposed patch:

> --- lib/exclude.c.orig        Tue Mar 26 14:20:49 2002
> +++ lib/exclude.c     Tue Mar 26 14:21:03 2002
> @@ -24,11 +24,7 @@
>  # include <config.h>
>  #endif
>  
> -#if HAVE_STDBOOL_H
> -# include <stdbool.h>
> -#else
>  typedef enum {false = 0, true = 1} bool;
> -#endif
>  
>  #include <errno.h>
>  #ifndef errno

indicates that your host has <stdbool.h> and that HAVE_STDBOOL_H
is defined, but that '_Bool' does not work for some reason.  Is that
correct?

I would rather not use a patch like the proposed one, partly because
some hosts generate better code if "bool" is defined by the compiler,
partly because they generate better diagnostics.  So I'd rather get
to the underlying problem.  Perhaps the correct fix is to modify
"configure" so that HAVE_STDBOOL_H is not defined on your platform.

What is the output of this command?

  cc -E -DHAVE_CONFIG_H -I. -I. -I.. -I../intl \
    -I/opt/TWWfsw/libiconv17/include -std1 exclude.c | grep excluded_filename

What happens when you compile and run the following little program,
using "cc -std1"?  What is its exit status?

  #include <stdbool.h>
  bool x;
  bool y = false;
  bool j = true;
  int main (void)
  {
    return x + y + !j;
  }

What is the output of "cc -E -std1" on the same little program?



reply via email to

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