[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #4830] configure problem with stdbool.h
From: |
nobody |
Subject: |
[bug #4830] configure problem with stdbool.h |
Date: |
Mon, 18 Aug 2003 17:10:49 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 |
=================== BUG #4830: FULL BUG SNAPSHOT ===================
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4830&group_id=61
Submitted by: wendyp Project: findutils
Submitted on: Mon 08/18/2003 at 21:10
Category: None Severity: 5 - Major
Bug Group: None Resolution: None
Assigned to: None Originator Name:
Originator Email: Status: Open
Release: None Fixed Release: None
Summary: configure problem with stdbool.h
Original Submission: i'm in the process of checking out a snapshot provided to
me by james youngman of a snapshot of the CVS tree of findutils, from 8 august.
i've had findutils-4.1 running on all the cray architectures for several years.
i'm having trouble getting the compile to complete for this snapshot. the
problem seems to be that there is no stdbool.h.
...
cc -DHAVE_CONFIG_H -I. -I. -I.. -g -c `test -f 'human.c' || echo
'./'`human.c
CC-5 cc: ERROR File = human.h, Line = 30
The source file "stdbool.h" is unavailable.
# include <stdbool.h>
^
make[5]: *** [human.o] Error 1
make[5]: Leaving directory `/ptmp/wendyp/finddir/findutils-4.2.0/gnulib/lib'
well, that's true, there is no stdbool.h on a non-X1 cray machine.
so, i checked out my redhat linux box, and it also does not have a stdbool.h
file) but it completes compiling with no problem.
i don't understand this at all. but i was able to overcome the confusion and
find something that works.
"typedef char bool" works for gnulib/lib/human.h.
it looks like someone ran into a similar problem in find/defs.h, but the #ifdef
structure there makes no sense to me.
for the "bool" type to work on a UNICOS machine, the following patches are
needed:
$ diff -c gnulib/lib/human.h.orig gnulib/lib/human.h
*** gnulib/lib/human.h.orig Mon Aug 18 15:41:32 2003
--- gnulib/lib/human.h Mon Aug 18 16:04:38 2003
***************
*** 27,34 ****
# endif
# include <limits.h>
# include <stdbool.h>
!
# if HAVE_INTTYPES_H
# include <inttypes.h>
# else
--- 27,37 ----
# endif
# include <limits.h>
+ # ifndef _UNICOS
# include <stdbool.h>
! # else
! typedef char bool;
! # endif /* _UNICOS */
# if HAVE_INTTYPES_H
# include <inttypes.h>
# else
$ diff -c find/defs.h.orig find/defs.h
*** find/defs.h.orig Mon Aug 18 15:53:18 2003
--- find/defs.h Mon Aug 18 16:09:00 2003
***************
*** 128,134 ****
#define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX)
#if 1
! #include <stdbool.h>
typedef bool boolean;
#else
/* Not char because of type promotion; NeXT gcc can't handle it. */
--- 128,140 ----
#define MODE_ALL (S_ISUID | S_ISGID | S_ISVTX | MODE_RWX)
#if 1
! # ifndef _UNICOS
! # include <stdbool.h>
! # else
! typedef char bool;
! #define true 1
! #define false 0
! # endif /* _UNICOS */
typedef bool boolean;
#else
/* Not char because of type promotion; NeXT gcc can't handle it. */
No Followups Have Been Posted
CC list is empty
No files currently attached
For detailed info, follow this link:
http://savannah.gnu.org/bugs/?func=detailbug&bug_id=4830&group_id=61
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #4830] configure problem with stdbool.h,
nobody <=