Subject: lib/1845: abort() and exit() need __dead tags in stdlib.h
To: None <gnats-bugs@gnats.netbsd.org>
From: Mike Long <mike.long@analog.com>
List: netbsd-bugs
Date: 12/16/1995 18:10:01
>Number:         1845
>Category:       lib
>Synopsis:       abort() and exit() need __dead tags in stdlib.h
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Dec 16 18:35:01 1995
>Last-Modified:
>Originator:     Mike Long <mike.long@analog.com>
>Organization:
	Christmas Shopping Haters Anonymous
>Release:        1.1
>Environment:
	
System: NetBSD azathoth 1.1 NetBSD 1.1 (AZATHOTH) #16: Thu Nov 23 03:00:50 EST 1995 root@azathoth:/usr/src/sys/arch/i386/compile/AZATHOTH i386

>Description:
	Neither abort() nor exit() ever returns, but the stdlib.h
header doesn't reflect that fact.

/usr/src/gnu/usr.bin/groff/libgroff/assert.cc won't compile with
-Werror until this is fixed.

>How-To-Repeat:
	cd /usr/src/gnu/usr.bin/groff/libgroff; make
>Fix:
	Apply the patch below.  You'll want to reformat stdlib.h
afterwards to make it comply with the NetBSD style guidelines.

*** /usr/src/include/stdlib.h.orig      Fri Oct 13 20:37:09 1995
--- /usr/src/include/stdlib.h   Sat Dec 16 04:27:45 1995
***************
*** 86,90 ****
  
  __BEGIN_DECLS
! void   abort __P((void));
  int    abs __P((int));
  int    atexit __P((void (*)(void)));
--- 86,90 ----
  
  __BEGIN_DECLS
! __dead void    abort __P((void));
  int    abs __P((int));
  int    atexit __P((void (*)(void)));
***************
*** 96,100 ****
  void  *calloc __P((size_t, size_t));
  div_t  div __P((int, int));
! void   exit __P((int));
  void   free __P((void *));
  char  *getenv __P((const char *));
--- 96,100 ----
  void  *calloc __P((size_t, size_t));
  div_t  div __P((int, int));
! __dead void    exit __P((int));
  void   free __P((void *));
  char  *getenv __P((const char *));


>Audit-Trail:
>Unformatted: