URL: <http://savannah.gnu.org/bugs/?29255>
Summary: build fails on HP-UX 11.31: loadav.c:279: error: conflicting types for `nlist64' Project: GNU Screen Submitted by: xrgtn Submitted on: Thu 18 Mar 2010 12:49:08 PM EET Category: Build/Install Severity: 3 - Normal Priority: 5 - Normal Status: None Privacy: Public Assigned to: None Open/Closed: Open Discussion Lock: Any Release: Cur Dev Sources Fixed Release: None Planned Release: None Work Required: None _______________________________________________________ Details: screen compilation fails on HP-UX: gcc -c -I. -I. -D_XOPEN_SOURCE=600 -DETCSCREENRC='"/comptel/ilink/xxx/etc/screenrc"' -DSCREENENCODINGS='"/comptel/ilink/xxx/share/screen/utf8encodings"' -DHAVE_CONFIG_H -DGIT_REV=\""`git describe --always 2>/dev/null`"\" \ -D_XOPEN_SOURCE=600 loadav.c loadav.c:279: error: conflicting types for `nlist64' /usr/include/nlist.h:108: error: previous declaration of `nlist64' make: *** [loadav.o] Error 1 The HP-UX's nlist.h contains the next: ... #ifdef __ia64 #define nlist nlist64 #endif #ifdef __ia64 #pragma extern nlist #endif #if defined(__STDC__) || defined(__cplusplus) || defined(_PROTOTYPES) extern int nlist(const char* file_name, struct nlist *nl); #else /* not __STDC__ || __cplusplus || _PROTOTYPES */ extern int nlist(); #endif /* not __STDC__ || __cplusplus || _PROTOTYPES */ #if defined(__LP64__) || ! defined(__STDC_32_MODE__) # if defined(__STDC__) || defined(__cplusplus) || defined(_PROTOTYPES) extern int nlist64(const char* filename, struct nlist64* nl); # else /* not __STDC__ || __cplusplus || _PROTOTYPES */ extern int nlist64(); # endif /* not __STDC__ || __cplusplus || _PROTOTYPES */ #endif ... line #108 is the one containing 2-arg nlist64 declaration. If I append -DNLIST_DECLARED to CFLAGS, screen compiles OK. So I suspect there might be a problem in ./configure script... P.S. il...@tunis:/tmp/screen/src > grep def.*NLIST config.h /* #undef LOADAV_USE_NLIST64 */ /* #undef NLIST_DECLARED */ #define NLIST_STRUCT 1 /* #undef NLIST_NAME_UNION */ il...@tunis:/tmp/screen/src > grep nlist xxx-configure.log checking nlist.h usability... yes checking nlist.h presence... yes checking for nlist.h... yes configure: checking n_un in struct nlist... configure: checking for nlist declaration... il...@tunis:/tmp/screen/src > Here you can see why AC_EGREP fails to find nlist function: il...@tunis:/tmp/screen/src > cat nlist.c #define NLIST_STRUCT 1 #ifdef NLIST_STRUCT # include <nlist.h> #else # include <a.out.h> #endif il...@tunis:/tmp/screen/src > cpp nlist.c | egrep "nlist([[:space:]]+.*\(|\()" il...@tunis:/tmp/screen/src > cpp nlist.c | egrep "nlist([[:space:]]*.*\(|\()" extern int nlist64(const char* file_name, struct nlist64 *nl); extern int nlist64(const char* filename, struct nlist64* nl); il...@tunis:/tmp/screen/src > Any suggestions? Can configure.in's AC_EGREP_CPP for nlist be fixed at all (replaced with a pair of regexps)? _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?29255> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/