public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* What prototype for atexit()?
@ 1998-02-08  7:56 Jeff Johnson
  0 siblings, 0 replies; only message in thread
From: Jeff Johnson @ 1998-02-08  7:56 UTC (permalink / raw)
  To: egcs

Greetings --

This is a teensy but annoying problem. Compiling egcs on multiple platforms
from a simgle src tree often craps out with a prototype clash for atexit. Why
have two conflicting prototypes? One of the two is guaranteed to be wrong
everywhere ...

Anyways, from my very limited view point, I suggest

Index: gbl-ctors.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/gbl-ctors.h,v
retrieving revision 1.1.1.1
diff -u -c -r1.1.1.1 gbl-ctors.h
*** gbl-ctors.h	1997/08/11 15:57:07	1.1.1.1
--- gbl-ctors.h	1998/02/08 15:48:23
***************
*** 40,46 ****
  #if defined (WINNT) || defined (NEED_ATEXIT)
  extern int atexit (void (*) (void));
  #else
! extern void atexit (void (*) (void));
  #endif
  #define ON_EXIT(FUNC,ARG) atexit ((FUNC))
  #else
--- 40,46 ----
  #if defined (WINNT) || defined (NEED_ATEXIT)
  extern int atexit (void (*) (void));
  #else
! /* extern void atexit (void (*) (void)); */
  #endif
  #define ON_EXIT(FUNC,ARG) atexit ((FUNC))
  #else

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@jbj.org
Gaithersburg, MD

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1998-02-08  7:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-08  7:56 What prototype for atexit()? Jeff Johnson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).