c50384799a
The traditional API of sys_errlist[] and sys_nerr is provided by weak references if they are supported. Otherwise, we're forced to have to have two copies of the error message string table in the library. Fortunately, unless a program uses both sys_errlist[] and strerror(), only one of the copies will be linked into the executable. This is all to provide an clean namespace as required by ANSI. I've done the same for sys_siglist[], even though it is not required, to be consistant.
22 lines
491 B
C
22 lines
491 B
C
/*
|
|
* Written by J.T. Conklin, 10/06/94
|
|
* Public domain.
|
|
*/
|
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#ifdef __weak_reference
|
|
__weak_reference(__sys_siglist, sys_siglist);
|
|
#else
|
|
|
|
/*
|
|
* Without weak references, we're forced to have to have two copies of
|
|
* the signal name string table in the library. Fortunately, unless
|
|
* a program uses both sys_siglist[] and strsignal(), only one of the
|
|
* copies will be linked into the executable.
|
|
*/
|
|
|
|
#define __sys_siglist sys_siglist
|
|
#include "_siglist.c"
|
|
#endif
|