Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* include/sys/syslog.h: Use libc_hidden_proto for syslog, vsyslog.
	* include/err.h: Use libc_hidden_proto for warn, warnx, vwarn, vwarn,
	verr, verrx.
	* include/stdlib.h: Use libc_hidden_proto for exit, getenv, bsearch.
	* misc/syslog.c: Add libc_hidden_def.
	* misc/err.c: Likewise.
	* stdlib/exit.c: Likewise.
	* stdlib/bsearch.c: Likewise.
	* sysdeps/generic/getenv.c: Likewise.
  • Loading branch information
Roland McGrath committed Aug 3, 2002
1 parent c5598d4 commit a757607
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 4 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -1,5 +1,15 @@
2002-08-03 Roland McGrath <roland@redhat.com>

* include/sys/syslog.h: Use libc_hidden_proto for syslog, vsyslog.
* include/err.h: Use libc_hidden_proto for warn, warnx, vwarn, vwarn,
verr, verrx.
* include/stdlib.h: Use libc_hidden_proto for exit, getenv, bsearch.
* misc/syslog.c: Add libc_hidden_def.
* misc/err.c: Likewise.
* stdlib/exit.c: Likewise.
* stdlib/bsearch.c: Likewise.
* sysdeps/generic/getenv.c: Likewise.

* include/libc-symbols.h (hidden_weak): Define it for [__ASSEMBLER__].

* sysdeps/unix/make-syscalls.sh: Generate libc_hidden_def or
Expand Down
7 changes: 7 additions & 0 deletions include/err.h
@@ -1 +1,8 @@
#include <misc/err.h>

libc_hidden_proto (warn)
libc_hidden_proto (warnx)
libc_hidden_proto (vwarn)
libc_hidden_proto (vwarnx)
libc_hidden_proto (verr)
libc_hidden_proto (verrx)
3 changes: 3 additions & 0 deletions include/stdlib.h
Expand Up @@ -9,6 +9,9 @@
/* Now define the internal interfaces. */
#ifndef __Need_M_And_C

libc_hidden_proto (exit)
libc_hidden_proto (getenv)
libc_hidden_proto (bsearch)
libc_hidden_proto (__secure_getenv)

extern long int __random (void);
Expand Down
3 changes: 3 additions & 0 deletions include/sys/syslog.h
@@ -1 +1,4 @@
#include <misc/sys/syslog.h>

libc_hidden_proto (syslog)
libc_hidden_proto (vsyslog)
8 changes: 7 additions & 1 deletion misc/err.c
@@ -1,5 +1,5 @@
/* 4.4BSD utility functions for error messages.
Copyright (C) 1995, 1996, 1998, 2001 Free Software Foundation, Inc.
Copyright (C) 1995,96,98,2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -108,6 +108,7 @@ vwarnx (const char *format, __gnuc_va_list ap)
}
funlockfile (stderr);
}
libc_hidden_def (warnx)

void
vwarn (const char *format, __gnuc_va_list ap)
Expand Down Expand Up @@ -141,33 +142,38 @@ vwarn (const char *format, __gnuc_va_list ap)
}
funlockfile (stderr);
}
libc_hidden_def (warnx)


void
warn (const char *format, ...)
{
VA (vwarn (format, ap))
}
libc_hidden_def (warn)

void
warnx (const char *format, ...)
{
VA (vwarnx (format, ap))
}
libc_hidden_def (warnx)

void
verr (int status, const char *format, __gnuc_va_list ap)
{
vwarn (format, ap);
exit (status);
}
libc_hidden_def (verr)

void
verrx (int status, const char *format, __gnuc_va_list ap)
{
vwarnx (format, ap);
exit (status);
}
libc_hidden_def (verrx)

void
err (int status, const char *format, ...)
Expand Down
2 changes: 2 additions & 0 deletions misc/syslog.c
Expand Up @@ -102,6 +102,7 @@ syslog(pri, fmt, va_alist)
vsyslog(pri, fmt, ap);
va_end(ap);
}
libc_hidden_def (syslog)

void
vsyslog(pri, fmt, ap)
Expand Down Expand Up @@ -278,6 +279,7 @@ vsyslog(pri, fmt, ap)

free (buf);
}
libc_hidden_def (vsyslog)

static struct sockaddr SyslogAddr; /* AF_UNIX address of local logger */

Expand Down
3 changes: 2 additions & 1 deletion stdlib/bsearch.c
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 1992, 1997, 2000 Free Software Foundation, Inc.
/* Copyright (C) 1991,92,97,2000,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -46,3 +46,4 @@ bsearch (const void *key, const void *base, size_t nmemb, size_t size,

return NULL;
}
libc_hidden_def (bsearch)
3 changes: 2 additions & 1 deletion stdlib/exit.c
@@ -1,4 +1,4 @@
/* Copyright (C) 1991,1995,1996,1997,1999,2001 Free Software Foundation, Inc.
/* Copyright (C) 1991,95,96,97,99,2001,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -81,3 +81,4 @@ exit (int status)

_exit (status);
}
libc_hidden_def (exit)
3 changes: 2 additions & 1 deletion sysdeps/generic/getenv.c
@@ -1,4 +1,4 @@
/* Copyright (C) 1991, 92, 94, 96, 98, 99 Free Software Foundation, Inc.
/* Copyright (C) 1991,92,94,96,98,99,2002 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
Expand Down Expand Up @@ -98,3 +98,4 @@ getenv (name)

return NULL;
}
libc_hidden_def (getenv)

0 comments on commit a757607

Please sign in to comment.