Subject: bin/637: rcs doesn't compile due to inconsistent declarations of _exit()
To: None <gnats-admin@sun-lamp.cs.berkeley.edu>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: netbsd-bugs
Date: 12/11/1994 15:20:05
>Number:         637
>Category:       bin
>Synopsis:       rcs doesn't compile due to inconsistent declarations of _exit()
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 11 15:20:04 1994
>Originator:     Jonathan Stone
>Organization:
Stanford Distributed Systems Group
>Release:        NetBSD-current at Dec 10, 1994
>Environment:

System: NetBSD Reno.Stanford.EDU 1.0A NetBSD 1.0A (RENO) #65: Sun Dec 11 13:46:21 PST 1994 jonathan@Reno.Stanford.EDU:/greyhawk/n1/src/NetBSD/src/sys/arch/pmax/compile/RENO pmax
	
	pmax, NetBSD-current, pmax

>Description:
	/src/gnu/usr.bin/rcs fails to compile.
	The specific problem is an inconsistentcy in the (perfectly
	reasonable) declaration of _exit in src/rcs/lib/conf.h.
	This declaration is treated by gcc 2.5.8 as _incompatible__
	with the declaration in /usr/include/stdlib.h. The NetBSD
	native declaration has GNU CC attributes that GCC treats
	as incompatible with the simpler declaration.

>How-To-Repeat:

	(cd /src/usr.bin/gnu/rcs ; make)
	Where cc is, or is derived from, gcc 2.5.8.
	The NetBSD ``official'' release of GCC distributed with NetBSD
	may or may not have the same problem; I dont have access to
	a machine on which it builds.
>Fix:
	The following patch works for me, though I expect this same
	problem to occur with other ``portable'' software packages.
	I wonder if the declaration in stdlib.h is worth the cost.
	Perhaps submitting a GCC bug report requesting that the error
	be made a warning is the best thing?

*** src/gnu/usr.bin/rcs/lib/conf.h.DIST	Mon Nov 21 13:36:48 1994
--- src/gnu/usr.bin/rcs/lib/conf.h	Sun Dec 11 14:09:54 1994
***************
*** 462,469 ****
  
  /* <stdlib.h> */
  char *getenv P((char const*));
- exiting void _exit P((int));
  #ifndef __NetBSD__
  exiting void exit P((int));
  #endif
  malloc_type malloc P((size_t));
--- 462,469 ----
  
  /* <stdlib.h> */
  char *getenv P((char const*));
  #ifndef __NetBSD__
+ exiting void _exit P((int));
  exiting void exit P((int));
  #endif
  malloc_type malloc P((size_t));


>Audit-Trail:
>Unformatted: