🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.windows.interviews
Article #1685

Re: Problem with GCC-2.4.5, and libg++-2.4 compiling IV-3.1...

#1685
From: Greg Earle
Date: Fri, 16 Jul 1993 07:13
68 lines
3234 bytes
In article <CA5x3K.5K0@scr.siemens.com> aad@scr.siemens.com (Anthony A. Datri) writes:
>>>Like I just said, IT DOESN'T.  In fact, String.cc contains
>
>>>Now, it's difficult to know if this is ever actually used as strlen, but
>       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
>>  It does. libg++-2.4 fixes the problem
>
>One more time.  I ************AM************** using 2.4.

That doesn't mean you're using it correctly.

>>slen is not strlen, strlen is
>>a Sun libc call and slen is only a inline used in String.cc.
>
>	<=>lovecraft<=>uname -a
>	SunOS lovecraft 4.1.3 1 sun4c

	isolar:2:271 % uname -a
	SunOS isolar 4.1.3 2 sun4c

>	<=>lovecraft<=>grep strlen /usr/include/string.h
>	extern size_t   strlen(/* const char *s */);
>	<=>lovecraft<=>grep size_t /usr/include/sys/stdtypes.h 
>	 * define the thingy.  This is used so that we don't have size_t in
>	typedef int             size_t;         /* ??? */

isolar:2:272 % grep size_t /usr/include/sys/stdtypes.h \
/usr/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.4.5/include/sys/stdtypes.h 

/usr/include/sys/stdtypes.h: \
 * define the thingy.  This is used so that we don't have size_t in
/usr/include/sys/stdtypes.h: \
typedef     int             size_t;         /* ??? */

/usr/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.4.5/include/sys/stdtypes.h: \
 * define the thingy.  This is used so that we don't have size_t in
/usr/gnu/lib/gcc-lib/sparc-sun-sunos4.1/2.4.5/include/sys/stdtypes.h: \
typedef unsigned long int size_t;          /* ??? */

>The libc call is an int.  I N T.

You can call it whatever you want; that doesn't make it so.

gcc is supposed to be an ANSI compiler, remember?

As Brendan Kehoe of Cygnus explained it to me:

>You need to rebuild libg++ with CC=gcc, so it can find out the "real"
>definition of size_t (previous versions of the compiler used Sun's broken
>definition, instead of the correct ANSI definition).

In short:

- Build gcc 2.4.5.
- Once you have 2.4.5 installed, build libg++ 2.4 again; this time via
  "make CC=gcc"

Then you will get the correct prototype for "size_t" in the version of
<sys/stdtypes.h> that gcc actually uses.  

Capiche?

-- 
	- Greg Earle
	  Phone: (818) 353-8695		FAX: (818) 353-1877
	  Internet: earle@isolar.Tujunga.CA.US
	  UUCP: isolar!earle@elroy.JPL.NASA.GOV a.k.a. ...!elroy!isolar!earle
Technical Details
Message-ID: <225kf4$ci8@isolar.Tujunga.CA.US>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!isolar!isolar!not-for-mail
References: <SMILEY.93Jul9175300@maharet.im.hou.compaq.com> <CA28DM.CKy@scr.siemens.com> <21t1aoINNhjc@crcnis1.unl.edu> <CA5x3K.5K0@scr.siemens.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 101a2b,2a85f141102c1320
X-Google-Attributes: gid101a2b,public
X-Google-Thread: 10ba33,2a85f141102c1320
X-Google-Attributes: gid10ba33,public
X-Google-ArrivalTime: 1993-07-16 03:39:01 PST
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!isolar!isolar!not-for-mail
From: earle@isolar.Tujunga.CA.US (Greg Earle)
Newsgroups: comp.windows.interviews,gnu.g++.help
Subject: Re: Problem with GCC-2.4.5, and libg++-2.4 compiling IV-3.1...
Date: 16 Jul 1993 00:13:40 -0700
Organization: Personal Usenet site, Tujunga, CA USA
Lines: 68
Distribution: world
Message-ID: <225kf4$ci8@isolar.Tujunga.CA.US>
References: <SMILEY.93Jul9175300@maharet.im.hou.compaq.com> <CA28DM.CKy@scr.siemens.com> <21t1aoINNhjc@crcnis1.unl.edu> <CA5x3K.5K0@scr.siemens.com>