From: tmcconne@sedona.intel.com (Tom McConnell~)
Newsgroups: fj.mail-lists.x-window
Subject: Done! Re: X11R5 make World on SVR4.0 Intel platform. Help!
Date: 22 Dec 92 18:55:48 GMT
Distribution: fj
Organization: Intel Corporation

Date: 22 Dec 1992 15:42:57 GMT
Message-Id: <1h7d21INN7sn@chnews.intel.com>
Newsgroups: comp.windows.x,gnu.gcc.help


In article <1h3adrINN1o5@chnews.intel.com>, tmcconne@sedona.intel.com (Tom McConnell~) writes:
> 
>   Platform: NCR 3350, SVR4.02
>             gcc-2.3.2
> 
> In article <1h07c3INN5ge@chnews.intel.com>, tmcconne@sedona.intel.com (Tom McConnell~) writes:
> > 
> > In article <1992Dec16.223104.28858@cbnewsj.cb.att.com>, mjma@cbnewsj.cb.att.com
> >  (michael.j.matthews) writes:
> > > 
> > > Help,
> > > 
> > > I am trying to make World X11R5 on a SVR4.0 ATT/NCR Intel machine.
> > > 
> > > It doesn't get far before I get this idiotic message:
> 
>   Well, I just tried to build X11R5p21 with gcc-2.3.2 on an NCR 3350, and I
> cannot get it done. The last time I built X11R5 (p17) was with gcc-2.2.2, and it
> had some of the same problems, but did not exhibit this one.
> 
>   The problem is currently that "htonl" is defined twice in libX11.a, once in
> XConnDis.o and once in XlibInt.o. It is actually defined in <sys/byteorder.h>,
> which is part of gcc-2.3.2. <sys/byteorder.h> gets included from <sys/endian.h>,
> which is included from <netinet/in.h>.
> 

  Found the problem. I had to "fix" the include files for gcc-2.3.2 in order to
make X11R5 build. No modifications to the X11R5 source was necessary. I have
included a patch file for the gcc folks to peruse. I will place a more detailed
bug report in gnu.gcc.bug.

 In the patch file, the files <netinet/in.h> and <sys/endian.h> were copied
into the gcc include area, then modified. I am not saying that my patches are
the correct ones, I am just saying they seem to work for me :)

    Cheers,

    Tom McConnell

This patch file was created on Tue Dec 22 08:04:35 MST 1992.

The top level directory was /a/stor/gnu/iAWS/lib/gcc-lib/ncr3000/2.3.2/include


*** ./sys/endian.h_orig	Mon Dec 21 20:37:52 1992
--- ./sys/endian.h	Mon Dec 21 20:35:10 1992
***************
*** 39,42 ****
--- 39,43 ----
  #define	htons(x)	(x)
  #else
+ #   if !defined (__GNUC__) && !defined (__GNUG__)
  #	ifdef	__STDC__
  		unsigned short	ntohs(unsigned int), htons(unsigned int);
***************
*** 46,50 ****
  		unsigned long	ntohl(), htonl();
  #	endif
! #		include	<sys/byteorder.h>
  #endif
  
--- 47,52 ----
  		unsigned long	ntohl(), htonl();
  #	endif
! #   endif /* !defined (__GNUC__) && !defined (__GNUG__) */
! #   include	<sys/byteorder.h>
  #endif
  
*** ./sys/types.h_orig	Mon Dec 21 20:40:22 1992
--- ./sys/types.h	Tue Dec 22 08:04:24 1992
***************
*** 33,37 ****
  typedef	short		index_t;
  typedef	short		lock_t;		/* lock work for busy wait */
! typedef enum boolean { B_FALSE, B_TRUE } boolean_t;
  /*
   * New type from XENIX
--- 33,37 ----
  typedef	short		index_t;
  typedef	short		lock_t;		/* lock work for busy wait */
! typedef enum { B_FALSE, B_TRUE } boolean_t;
  /*
   * New type from XENIX
*** ./float.h_orig	Sun Dec 20 09:55:32 1992
--- ./float.h	Sun Dec 20 01:46:58 1992
***************
*** 17,21 ****
  #define FLT_MIN_EXP (-125)
     /* Minimum normalised float */
! #define FLT_MIN 1.17549435e-38F
     /* Minimum int x such that 10**x is a normalised float */
  #define FLT_MIN_10_EXP (-37)
--- 17,21 ----
  #define FLT_MIN_EXP (-125)
     /* Minimum normalised float */
! #define FLT_MIN 1.17549435E-38F
     /* Minimum int x such that 10**x is a normalised float */
  #define FLT_MIN_10_EXP (-37)
***************
*** 23,27 ****
  #define FLT_MAX_EXP 128
     /* Maximum float */
! #define FLT_MAX 3.40282347e+38F
     /* Maximum int x such that 10**x is a representable float */
  #define FLT_MAX_10_EXP 38
--- 23,27 ----
  #define FLT_MAX_EXP 128
     /* Maximum float */
! #define FLT_MAX 3.40282347E+38F
     /* Maximum int x such that 10**x is a representable float */
  #define FLT_MAX_10_EXP 38
***************
*** 36,40 ****
  #define DBL_MIN_EXP (-1021)
     /* Minimum normalised double */
! #define DBL_MIN 2.2250738585072014e-308
     /* Minimum int x such that 10**x is a normalised double */
  #define DBL_MIN_10_EXP (-307)
--- 36,40 ----
  #define DBL_MIN_EXP (-1021)
     /* Minimum normalised double */
! #define DBL_MIN 2.2250738585072014E-308
     /* Minimum int x such that 10**x is a normalised double */
  #define DBL_MIN_10_EXP (-307)
***************
*** 42,46 ****
  #define DBL_MAX_EXP 1024
     /* Maximum double */
! #define DBL_MAX 1.7976931348623157e+308
     /* Maximum int x such that 10**x is a representable double */
  #define DBL_MAX_10_EXP 308
--- 42,46 ----
  #define DBL_MAX_EXP 1024
     /* Maximum double */
! #define DBL_MAX 1.7976931348623157E+308
     /* Maximum int x such that 10**x is a representable double */
  #define DBL_MAX_10_EXP 308
*** ./netinet/in.h_orig	Tue Dec 22 07:13:13 1992
--- ./netinet/in.h	Sun Dec 20 20:59:48 1992
***************
*** 199,202 ****
--- 199,203 ----
  #endif
  
+ #ifdef _KERNEL
  #ifdef INKERNEL
  
***************
*** 225,228 ****
--- 226,230 ----
  
  #endif	/* INKERNEL */
+ #endif /* _KERNEL */
  #undef	_PROTO
  
-- 
 Tom McConnell          |     Internet: tmcconne@sedona.intel.com
 Intel, Corp. C3-91     |     Phone: (602)-554-8229
 5000 W. Chandler Blvd. | The opinions expressed are my own. No one in 
 Chandler, AZ  85226    | their right mind would claim them.