This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
GCC 3.0.1 on HP-UX 11i
- To: hpux at connect dot org dot uk, gcc-bugs at gcc dot gnu dot org
- Subject: GCC 3.0.1 on HP-UX 11i
- From: Remi COLLET <root at iut-info dot ens dot univ-reims dot fr>
- Date: Wed, 05 Sep 2001 17:40:33 +0200
- Organization: IUT de Reims - Departement Informatique
Hi,
I install gcc-3.0.1 (binaries from HPUX porting center) HP-UX 11i and
have some problems with the
headers (i tried to build mysql-3.23.41 with this compiler).
I fix the problems and give you "my" solution :
1) problem with redefinition of "struct label_t" when include
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.1/include/sys/types.h
and /usr/include/machine/sys/setjmp.h
Modify to avoid redefinition as in setjmp.h:
> #ifndef _LABEL_T
> #define _LABEL_T
> typedef struct label_t {
> #ifdef __LP64__
> int64_t lbl_rp;
> int64_t lbl_sp;
> int64_t lbl_s[17];
> int64_t lbl_ss[1];
> int64_t lbl_sf[10];
> #else
> int32_t lbl_rp;
> int32_t lbl_sp;
> int32_t lbl_s[17];
> int32_t lbl_ss[1];
> double lbl_sf[10];
> #endif
> } label_t;
> #endif /* _LABEL_T */
>
2) problem with "bsize_t" not defined and need by "socket.h"
in /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.1/include/sys/types.h
Add (from /usr/include/sys/types.h) :
> # ifndef _BSIZE_T
> # define _BSIZE_T
> # if defined(_APP32_64BIT_OFF_T) || defined(_KERNEL)
> typedef int64_t sbsize_t; /* signed length in bytes */
> typedef uint64_t bsize_t; /* unsigned length in bytes */
> # else
> typedef long sbsize_t;
> typedef unsigned long bsize_t;
> # endif
> # endif /* _BSIZE_T */
>
> # ifndef _BSIZE64_T
> # define _BSIZE64_T
> # if !defined(__STDC_32_MODE__)
> typedef int64_t sbsize64_t;
> typedef uint64_t bsize64_t;
> # endif
> # endif /* _BSIZE64_T */
>
>
3) non ANSI declaration of sendfile and sendpath (C++) in socket.h
Copy socket.h in
/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.0.1/include/sys
Replace (line 470)
> inline sbsize_t sendfile(a,b,c,d,e,f) int a,b,f; off_t c; bsize_t d; const struct iovec * e; { return __sendfile64(a,b,c,d,e,f); }
> inline sbsize_t sendpath(a,b,c,d,e,f) int a,f; char *b; off_t c; bsize_t d; const struct iovec * e; { return __sendpath64(a,b,c,d,e,f); }
>
>
With:
> inline sbsize_t sendfile(int a,int b,off_t c,bsize_t d,const struct iovec *e,int f)
> { return __sendfile64(a,b,c,d,e,f); }
> inline sbsize_t sendpath(int a,char *b,off_t c,bsize_t d,const struct iovec *e,int f)
> { return __sendpath64(a,b,c,d,e,f); }
>
>
Then, all works fine !