Subject: Re: pkg/37555: textproc/gsed
To: None <pkg-manager@NetBSD.org, gnats-admin@NetBSD.org,>
From: Gilles Dauphin <Gilles.Dauphin@enst.fr>
List: pkgsrc-bugs
Date: 12/18/2007 16:11:25
> From: Joerg Sonnenberger <joerg@britannica.bec.de>
> To: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org, pkgsrc-bugs@NetBSD.org, 
"Gilles Dauphin" <dauphin@enst.fr>
> Subject: Re: pkg/37555: textproc/gsed
> X-Gnats-Was-Stupid: no
> Cc: 
> Date: Tue, 18 Dec 2007 14:25:04 +0000 (UTC)
> 
> The following reply was made to PR pkg/37555; it has been noted by GNATS.
> 
> From: Joerg Sonnenberger <joerg@britannica.bec.de>
> To: gnats-bugs@NetBSD.org
> Cc: 
> Subject: Re: pkg/37555: textproc/gsed
> Date: Tue, 18 Dec 2007 15:16:55 +0100
> 
>  On Tue, Dec 18, 2007 at 01:50:01PM +0000, Gilles Dauphin wrote:
>  >  thoses words 'strickly' and 'newer' are nightmare for me.
>  >  be cool and please patch even if it is beetween 
>  >  .if ${OSNAME} == "SunOS" && ${OS_VERSION} == "5.10" ... .endif
>  >  
>  >  It's a good fix in this case.
>  
>  It is not. The configure script actually tries to handle missing
>  stdbool.h. Can you check config.log if it detects that?


Sorry but it is: the easyest way.
here is config.log:

configure:4896: checking for stdbool.h that conforms to C99
configure:4949: gcc -c -O -I/usr/pkg/include -I/usr/include -I/usr/pkg/include 
-I/usr/include conftest.c >&5
In file included from conftest.c:35:
/usr/include/stdbool.h:42:2: #error "Use of <stdbool.h> is valid only in a c99 
compilation environment."
conftest.c:55: error: syntax error before string constant
conftest.c:55: error: syntax error before '}' token
conftest.c:55: warning: data definition has no type or storage class
conftest.c:57: error: `true' undeclared here (not in a function)
conftest.c:58: error: `false' undeclared here (not in a function)
conftest.c:59: error: `__bool_true_false_are_defined' undeclared here (not in a 
function)
conftest.c:60: error: `bool' undeclared here (not in a function)
conftest.c:61: error: syntax error before "e"
conftest.c:61: warning: initialization makes integer from pointer without a cast
conftest.c:61: error: initializer element is not computable at load time
conftest.c:61: warning: data definition has no type or storage class
conftest.c:65: error: request for member `t' in something not a structure or 
union
conftest.c:57: error: storage size of `a' isn't known
conftest.c:58: error: storage size of `b' isn't known
conftest.c:59: error: storage size of `c' isn't known
conftest.c:60: error: storage size of `d' isn't known
conftest.c:62: error: storage size of `f' isn't known
conftest.c:63: error: storage size of `g' isn't known
configure:4955: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "sed"
| #define PACKAGE_TARNAME "sed"
| #define PACKAGE_VERSION "4.1.5"
| #define PACKAGE_STRING "sed 4.1.5"
| #define PACKAGE_BUGREPORT "bonzini@gnu.org"
| #define PACKAGE "sed"
| #define VERSION "4.1.5"
| #define SED_FEATURE_VERSION "4.1"
| #define _GNU_SOURCE 1
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_LONG_FILE_NAMES 1
| #define HAVE_DIRENT_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_LOCALE_H 1
| #define HAVE_STDARG_H 1
| #define HAVE_ALLOCA_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_ERRNO_H 1
| #define HAVE_WCHAR_H 1
| #define HAVE_WCTYPE_H 1
| #define HAVE_SYS_FILE_H 1
| /* end confdefs.h.  */
|
|         #include <stdbool.h>
|         #ifndef bool
|          "error: bool is not defined"
|         #endif
|         #ifndef false
|          "error: false is not defined"
|         #endif
|         #if false
|          "error: false is not 0"
|         #endif
|         #ifndef true
|          "error: false is not defined"
|         #endif
|         #if true != 1
|          "error: true is not 1"
|         #endif
|         #ifndef __bool_true_false_are_defined
|          "error: __bool_true_false_are_defined is not defined"
|         #endif
|
|         struct s { _Bool s: 1; _Bool t; } s;
|
|         char a[true == 1 ? 1 : -1];
|         char b[false == 0 ? 1 : -1];
|         char c[__bool_true_false_are_defined == 1 ? 1 : -1];
|         char d[(bool) -0.5 == true ? 1 : -1];
|         bool e = &s;
|         char f[(_Bool) -0.0 == false ? 1 : -1];
|         char g[true];
|         char h[sizeof (_Bool)];
|         char i[sizeof s.t];
|
| int
| main ()
| {
|  return !a + !b + !c + !d + !e + !f + !g + !h + !i;
|   ;
|   return 0;
| }
configure:4979: result: no
configure:4981: checking for _Bool
configure:5005: gcc -c -O -I/usr/pkg/include -I/usr/include -I/usr/pkg/include 
-I/usr/include conftest.c >&5
configure:5011: $? = 0
configure:5015: test -z
                         || test ! -s conftest.err
configure:5018: $? = 0
configure:5021: test -s conftest.o
configure:5024: $? = 0
configure:5035: result: yes
configure:5066: checking for working alloca.h