🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #50193

Re: re: getting ANSI prototypes for gcc 2.4.5

#50193
From: a904209
Date: Fri, 12 Nov 1993 09:49
21 lines
1367 bytes
I use the following "trick" which was copied from g++ include files.
(Latter are a reasonable starting point for ANSI prototypes for printf
 etc., they are distributed with libg++ I think.)

#if !defined(PROTO_STDIO_H)
#define PROTO_STDIO_H
#include <stddef.h>
#undef NULL
#include_next <stdio.h>
#undef FILE
typedef struct _iobuf FILE;
extern int _filbuf(FILE *);
extern char *tmpnam(char *ret);
extern int fgetc(FILE *f);
extern int fputs(const char *,FILE *);
extern int fputc(int,FILE *);
....
#endif

Technique is to do above then turn on -Wstrict-prototypes and gradually
add them (by hand from man entries) till all the warnings go away.
Technical Details
Message-ID: <CGDHxr.A79@csc.ti.com>
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!math.fu-berlin.de!netmbx.de!Germany.EU.net!mcsun!howland.reston.ans.net!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!cauldron!ra.csc.ti.com!usenet
References: <9311111426.AA02702@rdxsun38.aud.alcatel.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,3cd95749e36de244
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1993-11-12 11:49:35 PST
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!gmd.de!xlink.net!math.fu-berlin.de!netmbx.de!Germany.EU.net!mcsun!howland.reston.ans.net!cs.utexas.edu!csc.ti.com!tilde.csc.ti.com!cauldron!ra.csc.ti.com!usenet
From: a904209@pluto.tiuk.ti.com
Subject: Re: re: getting ANSI prototypes for gcc 2.4.5
Message-ID: <CGDHxr.A79@csc.ti.com>
Sender: usenet@csc.ti.com
Nntp-Posting-Host: pluto.tiuk.ti.com
Organization: Texas Instruments Ltd.
References:  <9311111426.AA02702@rdxsun38.aud.alcatel.com>
Date: Fri, 12 Nov 1993 09:49:02 GMT
Lines: 23