egcs CVS 19980519, hpux9 bootstrap failure in libiberty dir + patch
Kaveh R. Ghazi
ghazi@caip.rutgers.edu
Tue May 19 15:14:00 GMT 1998
Snapshot: CVS checkout (19980519)
Platform: hppa1.1-hp-hpux9.01
Stage1 compiler: cc
Assembler: GAS-970915
Linker: native
BOOT_CFLAGS: none
I get the following error in the libiberty directory during
bootstrap:
> cc -c -DHAVE_CONFIG_H -g -I. -I./../include getpagesize.c
> cc: "getpagesize.c", line 67: error 1588: "_SC_PAGESIZE" undefined.
> make[1]: *** [getpagesize.o] Error 1
I fixed it with the following patch. Is it okay to install?
--Kaveh
Tue May 19 13:08:09 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* configure.in (AC_CHECK_HEADERS): Check also for <unistd.h>.
* getpagesize.c: Don't include <unistd.h> based on HAVE_SYSCONF,
instead base it on HAVE_UNISTD_H. Only use `sysconf(_SC_PAGESIZE)'
if both HAVE_SYSCONF and _SC_PAGESIZE are defined.
*** orig/egcs-C19980519/libiberty/configure.in Tue May 19 12:05:17 1998
--- egcs-C19980519/libiberty/configure.in Tue May 19 12:51:06 1998
***************
*** 104,110 ****
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
! AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h)
# This is the list of functions which libiberty will provide if they
# are not available on the host.
--- 104,110 ----
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
! AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h)
# This is the list of functions which libiberty will provide if they
# are not available on the host.
*** orig/egcs-C19980519/libiberty/getpagesize.c Tue May 19 12:05:18 1998
--- egcs-C19980519/libiberty/getpagesize.c Tue May 19 12:50:40 1998
***************
*** 35,42 ****
#include <sys/param.h>
#endif
! #ifdef HAVE_SYSCONF
#include <unistd.h>
#define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE)
#else
#ifdef PAGESIZE
--- 35,45 ----
#include <sys/param.h>
#endif
! #ifdef HAVE_UNISTD_H
#include <unistd.h>
+ #endif
+
+ #if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
#define GNU_OUR_PAGESIZE sysconf(_SC_PAGESIZE)
#else
#ifdef PAGESIZE
--
Kaveh R. Ghazi Project Manager / Custom Development
ghazi@caip.rutgers.edu Icon CMT Corp.
More information about the Gcc-bugs
mailing list