bugGNU Screen - Bugs: bug #29255, build fails on HP-UX 11.31:...

 
 

bug #29255: build fails on HP-UX 11.31: loadav.c:279: error: conflicting types for `nlist64'

Submitted by:  Alexander Gattin <xrgtn>
Submitted on:  Thu 18 Mar 2010 10:49:08 AM UTC  
 
Category: Build/InstallSeverity: 3 - Normal
Priority: 5 - NormalStatus: None
Privacy: PublicAssigned to: None
Open/Closed: OpenRelease: Cur Dev Sources
Fixed Release: NonePlanned Release: None
Work Required: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 18 Mar 2010 10:49:08 AM UTC, original submission:

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.

ilink@tunis:/tmp/screen/src > grep def.*NLIST config.h
/* #undef LOADAV_USE_NLIST64 */
/* #undef NLIST_DECLARED */
#define NLIST_STRUCT 1
/* #undef NLIST_NAME_UNION */
ilink@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...
ilink@tunis:/tmp/screen/src >

Here you can see why AC_EGREP fails to find nlist function:

ilink@tunis:/tmp/screen/src > cat nlist.c
#define NLIST_STRUCT 1
#ifdef NLIST_STRUCT
# include <nlist.h>
#else
# include <a.out.h>
#endif
ilink@tunis:/tmp/screen/src > cpp nlist.c | egrep "nlist([[:space:]]+.*\(|\()"
ilink@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);
ilink@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)?

Alexander Gattin <xrgtn>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by xrgtn (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1