make libc work again, on systems that don't support __warn_reference

This commit is contained in:
cgd 1994-12-18 11:32:37 +00:00
parent 510290ed54
commit 2eed827e82
11 changed files with 67 additions and 0 deletions

View File

@ -5,4 +5,19 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_err, err);
#else
#define _err err
#define _errx errx
#define _warn warn
#define _warnx warnx
#define _verr verr
#define _verrx verrx
#define _vwarn vwarn
#define _vwarnx vwarnx
#define rcsid _rcsid
#include "err.c"
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_errx, errx);
#endif

View File

@ -5,5 +5,25 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_sys_errlist, sys_errlist);
__weak_reference(_sys_errlist, __sys_errlist); /* Backwards compat with v.12 */
#else
#undef _sys_errlist
#undef _sys_nerr
#undef rcsid
#define _sys_errlist sys_errlist
#define _sys_nerr sys_nerr
#define rcsid _rcsid
#include "errlist.c"
#undef _sys_errlist
#undef _sys_nerr
#undef rcsid
#define _sys_errlist __sys_errlist
#define _sys_nerr __sys_nerr
#define rcsid __rcsid
#include "errlist.c"
#endif

View File

@ -5,5 +5,7 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_sys_nerr, sys_nerr);
__weak_reference(_sys_nerr, __sys_nerr); /* Backwards compat with v.12 */
#endif

View File

@ -5,5 +5,21 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_sys_siglist, sys_siglist);
__weak_reference(_sys_siglist, __sys_siglist); /* Backwards compat with v.12 */
#else
#undef _sys_siglist
#undef rcsid
#define _sys_siglist sys_siglist
#define rcsid _rcsid
#include "siglist.c"
#undef _sys_siglist
#undef rcsid
#define _sys_siglist __sys_siglist
#define rcsid __rcsid
#include "siglist.c"
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_verr, verr);
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_verrx, verrx);
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_vwarn, vwarn);
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_vwarnx, vwarnx);
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_warn, warn);
#endif

View File

@ -5,4 +5,6 @@
#include <sys/cdefs.h>
#ifdef __weak_reference
__weak_reference(_warnx, warnx);
#endif