bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compilation error under HP-UX-B.10.20


From: Klaus Zeitler
Subject: Compilation error under HP-UX-B.10.20
Date: 02 Jul 2002 16:50:56 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hello,

I'm trying to build binutils 2.12 under HP-UX-B.10.20.
Compilation of file strings.c in binutils directory fails:

gcc -DHAVE_CONFIG_H -I. -I. -I. -D_GNU_SOURCE -I. -I. -I../bfd -I./../bfd 
-I./../include -DHOST_HPPAHPUX -I./../intl -I../intl 
-DLOCALEDIR="\"/usr/local/share/locale\""   -W -Wall -Wstrict-prototypes 
-Wmissing-prototypes -g -O2 -c strings.c
In file included from strings.c:64:
../include/getopt.h:115: warning: function declaration isn't a prototype
In file included from strings.c:67:
../include/libiberty.h:80: warning: function declaration isn't a prototype
strings.c:97: parse error before `file_off'
strings.c:97: warning: type defaults to `int' in declaration of `file_off'
strings.c:97: warning: data definition has no type or storage class
strings.c:147: parse error before `file_off'
strings.c:148: warning: function declaration isn't a prototype
strings.c:150: parse error before `file_off'
strings.c:151: warning: function declaration isn't a prototype
strings.c: In function `strings_file':
strings.c:389: warning: implicit declaration of function `fopen64'
strings.c:389: warning: assignment makes pointer from integer without a cast
strings.c:397: parse error before `0'
strings.c: At top level:
strings.c:422: warning: function declaration isn't a prototype
strings.c: In function `get_char':
strings.c:423: parse error before `file_off'
strings.c:422: warning: type of `address' defaults to `int'
strings.c:443: warning: implicit declaration of function `getc_unlocked'
strings.c:451: invalid type argument of `unary *'
strings.c: At top level:
strings.c:496: warning: function declaration isn't a prototype
strings.c: In function `print_strings':
strings.c:498: parse error before `file_off'
strings.c:496: warning: type of `address' defaults to `int'
strings.c:496: warning: type of `stop_point' defaults to `int'
strings.c:496: warning: type of `magiccount' defaults to `int'
strings.c:496: warning: type of `magic' defaults to `int'
strings.c:507: `file_off' undeclared (first use in this function)
strings.c:507: (Each undeclared identifier is reported only once
strings.c:507: for each function it appears in.)
strings.c:507: parse error before `start'
strings.c:515: `start' undeclared (first use in this function)
make[3]: *** [strings.o] Error 1



the first error is a missing typedef for off64_t in file strings.c(97):

#ifdef HAVE_FOPEN64
typedef off64_t file_off;
#define file_open(s,m) fopen64(s,m)
#else
typedef off_t file_off;
#define file_open(s,m) fopen(s,m)
#endif



off64_t should be defined in types.h:

#  ifndef _OFF64_T
#    define _OFF64_T
#    if !defined(__STDC_32_MODE__)
        typedef int64_t off64_t;        /* 64bit offsets and sizes */
#    endif
#  endif /* _OFF64_T */


my guess is that __STDC_32_MODE__ is set (maybe via file _inttypes.h).
I'm using compiler egcs 2.91.66.

Appreciate any help.

Thanks

Klaus



-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             address@hidden  |
 ------------------------------------------
---
Have you noticed that all you need to grow healthy,
vigorous grass is a crack in your sidewalk?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]