🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #49470

[Q] Prototype of fprintf only with __cplusplus declared, why?

#49470
From: Harald Kirsch
Date: Mon, 24 Jan 1994 10:12
44 lines
2303 bytes
Is it a bug or a feature?

Just installed gcc-2.5.7 on a Sparc with sunos-4.1 with compilers
generated for C, C++, but not Objective-C. The installation was done
without problems.

But when I compiled the first code, a warning about implicit declaration
of fprintf made me look into the file stdio.h created by fixincludes and
I find that prototypes for most of the functions, e.g.

	fclose, fflush, fgetc, ...

are surrounded by #ifdef __cplusplus ... #endif.

Why this?????
-- Did I something wrong during the installation? (Well, I installed
with 

    ./configure --prefix=/t/gcc --local-prefix=/t/gcc
    make LANGUAGES=c
    make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O" LANGUAGES="c"
    make CC="stage2/xgcc -Bstage2/" CFLAGS="-g -O" LANGUAGES="c c++ proto"
    make install CC="stage3/xgcc -Bstage3/" CFLAGS="-g -O" LANGUAGES="c c++ proto"
    make compare
because at our site we have quite different conventions for installing
software than /usr/local.)

-- Is fixincludes somehow wrong?

-- Is there a good reason for the #ifdef __cplusplus ?

Thank you for any help,
	Harald Kirsch

------------------------------------------------------------------------
Harald Kirsch             kir@iitb.fhg.de               +49 721 6091 384
FhG/IITB                  Fraunhoferstr. 1               76131 Karlsruhe

--
------------------------------------------------------------------------
Harald Kirsch             kir@iitb.fhg.de               +49 721 6091 384
FhG/IITB                  Fraunhoferstr. 1               76131 Karlsruhe
P.S.: Ist P=NP wenn die Raumzeit 11-dimensional ist?
Technical Details
Message-ID: <KIR.94Jan24111216@dsd101.iitb.fhg.de>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usenet.ins.cwru.edu!nigel.msen.com!yale.edu!xlink.net!news.fhg.de!iitb.fhg.de!iitb!kir

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,e6323d67509b98e1,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1994-01-24 04:13:04 PST
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usenet.ins.cwru.edu!nigel.msen.com!yale.edu!xlink.net!news.fhg.de!iitb.fhg.de!iitb!kir
From: kir@iitb.fhg.de (Harald Kirsch)
Newsgroups: gnu.gcc.help
Subject: [Q] Prototype of fprintf only with __cplusplus declared, why?
Date: 24 Jan 1994 10:12:15 GMT
Organization: Fraunhofer-Institut fuer Informations- und Datenverarbeitung
Lines: 44
Message-ID: <KIR.94Jan24111216@dsd101.iitb.fhg.de>
NNTP-Posting-Host: dsd101.iitb.fhg.de