Article View: gnu.gcc.help
Article #52946Re: g++ (gcc 2.1) on Sun ELC
From: Tom McConnell
Date: Thu, 23 Apr 1992 16:40
Date: Thu, 23 Apr 1992 16:40
84 lines
3297 bytes
3297 bytes
In article <2817@unisql.UUCP>, wrat@unisql.UUCP (wharfie) writes:
> In article <9204230029.AA10480@mole.gnu.ai.mit.edu> rms@gnu.ai.mit.edu (Richard Stallman) writes:
> >To ask "what you are doing wrong" instead of sending a proper bug
> >report, is inadvisabel for two reasons.
>
> Gee, sorry :-) Really, I was under the impression that g++
> worked on this platform, and didn't want to submit pilot errors as
> software bugs. One bug report coming up...
>
> I do have a question, though: If anyone has gotten g++/libg++
> working on SunOS 4.1.1 on Sparc platforms, would you call/write to discuss
> what you did/didn't do and/or why you aren't experiencing this problem?
> (Which is: cpp dumps core on #include_next directives)
>
> t.i.a.
>
> wharfie
>
> 512-343-7297
> ...!cs.utexas.edu!wrat@unisql.com
I had hesitated posting this "fix" because it strikes me as poor. In any case,
yes, I do have gcc-2.1, libg++-2.0 up on Sun SPARC SunOS 4.1.1. To do it, I had
to modify ./libg++-2.0/libg++/g++-include/stdio.h (gasp!). Here is a context
diff of the fix (I had to do much the same fixes for a VAXstation 3100 running
ultrix 3.1, which is where the "ultrix" and "bsd4_2" stuff comes from):
thunder> diff -c2 stdio.h_orig stdio.h
*** stdio.h_orig Mon Mar 30 15:11:47 1992
--- stdio.h Mon Mar 30 15:16:21 1992
***************
*** 47,50 ****
--- 47,58 ----
#endif
+ #ifdef sparc
+ #include_next <stdio.h>
+ #endif
+
+ #if defined (bsd4_2) && defined (ultrix)
+ #include_next <stdio.h>
+ #endif
+
#ifdef __stdio_h_recursive
#include_next <stdio.h>
***************
*** 196,200 ****
--- 204,210 ----
int setvbuf(FILE*, char*, int, __SIZE_TYPE__);
int sscanf(char*, const char* ...);
+ #if !defined (bsd4_2) && !defined (ultrix) && !defined (sparc)
FILE* tmpfile();
+ #endif
int ungetc(int, FILE*);
int vfprintf(FILE*, const char*, ...);
***************
*** 222,226 ****
--- 232,244 ----
#endif
#ifndef P_tmpdir
+
+ #if defined (bsd4_2) && defined (ultrix)
+ #define P_tmpdir "/usr/tmp/"
+ #elif defined (sparc)
+ #define P_tmpdir "/usr/tmp/"
+ #else
#define P_tmpdir "/tmp/"
+ #endif /* bsd && ultrix */
+
#endif
#ifndef L_tmpnam
Hope this helps.
Cheers,
Tom McConnell
--
Tom McConnell | Internet: tmcconne@sedona.intel.com
Intel, Corp. C3-21 | 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.
Technical Details
Message-ID:
<10555@inews.intel.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!iWarp.intel.com|ichips!inews!tmcconneReferences:
<2811@unisql.UUCP> <9204230029.AA10480@mole.gnu.ai.mit.edu> <2817@unisql.UUCP>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,7eac3aaa4b11348f X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-04-23 09:40:30 PST Path: arc1-ca.pugleaf.net!sparky!uunet!iWarp.intel.com|ichips!inews!tmcconne From: tmcconne@sedona.intel.com (Tom McConnell) Newsgroups: gnu.gcc.help Subject: Re: g++ (gcc 2.1) on Sun ELC Message-ID: <10555@inews.intel.com> Date: 23 Apr 92 16:40:30 GMT References: <2811@unisql.UUCP> <9204230029.AA10480@mole.gnu.ai.mit.edu> <2817@unisql.UUCP> Sender: news@inews.intel.com Reply-To: tmcconne@sedona.intel.com Distribution: gnu Organization: Intel Corporation Lines: 84 Originator: tmcconne@thunder