2002-12-09  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/unix/sysv/linux/syscalls.list: Add __libc_creat and
	__libc_select aliases.

	* sysdeps/unix/sysv/linux/sigwaitinfo.c: Define __libc_sigwaitinfo
	alias.

	* sysdeps/unix/sysv/linux/sigwait.c: Define __libc_sigwait alias.

	* sysdeps/unix/sysv/linux/sigsuspend.c: Define __libc_sigsuspend alias.

	* sysdeps/unix/sysv/linux/poll.c: Define __libc_poll alias.

	* sysdeps/unix/syscalls.list: Define __libc_select alias.

	* sysdeps/posix/waitid.c: Define __libc_waitid alias.

	* sysdeps/posix/sigpause.c: Define __libc_sigpause and
	__libc___xpg_sigpause aliases.

	* sysdeps/generic/pselect.c: Define __libc_pselect alias.

	* misc/error.c: Remove use of USE_IN_LIBIO.
This commit is contained in:
Ulrich Drepper 2002-12-10 04:05:39 +00:00
parent 2231b60efc
commit e5e45b5337
18 changed files with 144 additions and 51 deletions

View File

@ -1,3 +1,28 @@
2002-12-09 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/syscalls.list: Add __libc_creat and
__libc_select aliases.
* sysdeps/unix/sysv/linux/sigwaitinfo.c: Define __libc_sigwaitinfo
alias.
* sysdeps/unix/sysv/linux/sigwait.c: Define __libc_sigwait alias.
* sysdeps/unix/sysv/linux/sigsuspend.c: Define __libc_sigsuspend alias.
* sysdeps/unix/sysv/linux/poll.c: Define __libc_poll alias.
* sysdeps/unix/syscalls.list: Define __libc_select alias.
* sysdeps/posix/waitid.c: Define __libc_waitid alias.
* sysdeps/posix/sigpause.c: Define __libc_sigpause and
__libc___xpg_sigpause aliases.
* sysdeps/generic/pselect.c: Define __libc_pselect alias.
* misc/error.c: Remove use of USE_IN_LIBIO.
2002-12-08 Roland McGrath <roland@redhat.com>
* elf/Makefile (tests): Uncomment tst-array[123].

2
FAQ.in
View File

@ -87,7 +87,7 @@ understand all the features of ELF, including weak and versioned symbols.
The static library can be compiled with less featureful tools, but lacks key
features such as NSS.
For Linux or Hurd, you want binutils 2.10.1 or higher. These are the only
For Linux or Hurd, you want binutils 2.13 or higher. These are the only
versions we've tested and found reliable. Other versions may work but we
don't recommend them, especially not when C++ is involved.

17
INSTALL
View File

@ -316,20 +316,11 @@ build the GNU C library:
Check the FAQ for any special compiler issues on particular
platforms.
* GNU `binutils' 2.10.1 or later
* GNU `binutils' 2.13 or later
You must use GNU `binutils' (as and ld) if you want to build a
shared library. Even if you don't want to build a shared library,
we recommend you use them anyway. No one has tested compilation
with non-GNU `binutils' in a long time.
The quality of `binutils' releases has varied a bit recently. The
bugs are in obscure features, but glibc uses quite a few of those.
2.10.1 and later releases are known to work. Versions after
2.8.1.0.23 may or may not work. Older versions definitely don't.
For PPC you might need some patches even on top of the last
`binutils' version. See the FAQ.
You must use GNU `binutils' (as and ld) to build the GNU C library.
No other assembler and linker has the necessary functionality in
the moment.
* GNU `texinfo' 3.12f

View File

@ -1,3 +1,11 @@
2002-12-09 Ulrich Drepper <drepper@redhat.com>
* wrapsyscall.c: Add wrappers for creat, poll, pselect, readv, select,
sigpause, __xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev.
* Versions: Export creat, poll, pselect, readv, select, sigpause,
__xpg_sigpause, sigsuspend, sigwaitinfo, waitid, and writev from
libpthread in version GLIBC_2.3.2.
2002-12-06 Ulrich Drepper <drepper@redhat.com>
* sysdeps/pthread/bits/libc-lock.h: Define __rtld_lock_* macros.

View File

@ -21,6 +21,10 @@ libc {
__libc_internal_tsd_get; __libc_internal_tsd_set;
__libc_internal_tsd_address; __libc_alloca_cutoff;
__libc_dl_error_tsd;
__libc_creat; __libc_poll; __libc_pselect; __libc_select;
__libc_sigpause; __libc_sigsuspend; __libc_sigwait; __libc_sigwaitinfo;
__libc_waitid; __libc___xpg_sigpause;
}
}
@ -151,6 +155,10 @@ libpthread {
# Cancellation wrapper
__nanosleep;
}
GLIBC_2.3.2 {
creat; poll; pselect; readv; select; sigpause; sigsuspend;
sigwaitinfo; __xpg_sigpause; waitid; writev;
}
GLIBC_PRIVATE {
# Internal libc interface to libpthread
__libc_internal_tsd_get; __libc_internal_tsd_set;

View File

@ -26,7 +26,10 @@
#include <stddef.h>
#include <stdlib.h>
#include <termios.h>
#include <sys/poll.h>
#include <sys/resource.h>
#include <sys/select.h>
#include <sys/uio.h>
#include <sys/wait.h>
#include <sys/socket.h>
@ -39,7 +42,7 @@ const int __pthread_provide_wrappers = 0;
#define CANCELABLE_SYSCALL(res_type, name, param_list, params) \
res_type __libc_##name param_list; \
extern res_type __libc_##name param_list; \
res_type \
__attribute__ ((weak)) \
name param_list \
@ -77,6 +80,11 @@ CANCELABLE_SYSCALL (int, close, (int fd), (fd))
strong_alias (close, __close)
/* creat(2). */
CANCELABLE_SYSCALL (int, creat, (const char *pathname, mode_t mode),
(pathname, mode))
/* fcntl(2). */
CANCELABLE_SYSCALL_VA (int, fcntl, (int fd, int cmd, ...),
(fd, cmd, va_arg (ap, long int)), cmd)
@ -130,6 +138,12 @@ strong_alias (open64, __open64)
CANCELABLE_SYSCALL (int, pause, (void), ())
/* poll(2). */
CANCELABLE_SYSCALL (int, poll,
(struct pollfd *ufds, nfds_t nfds, int timeout),
(ufds, nfds, timeout))
/* pread(3). */
CANCELABLE_SYSCALL (ssize_t, pread, (int fd, void *buf, size_t count,
off_t offset),
@ -143,6 +157,14 @@ CANCELABLE_SYSCALL (ssize_t, pread64, (int fd, void *buf, size_t count,
strong_alias (pread64, __pread64)
/* pselect(3). */
CANCELABLE_SYSCALL (int, pselect, (int n, fd_set *readfds, fd_set *writefds,
fd_set *exceptfds,
const struct timespec *timeout,
const sigset_t *sigmask),
(n, readfds, writefds, exceptfds, timeout, sigmask))
/* pwrite(3). */
CANCELABLE_SYSCALL (ssize_t, pwrite, (int fd, const void *buf, size_t n,
off_t offset),
@ -162,6 +184,38 @@ CANCELABLE_SYSCALL (ssize_t, read, (int fd, void *buf, size_t count),
strong_alias (read, __read)
/* readv(2). */
CANCELABLE_SYSCALL (ssize_t, readv,
(int fd, const struct iovec *vector, int count),
(fd, vector, count))
/* select(2). */
CANCELABLE_SYSCALL (int, select, (int n, fd_set *readfds,
fd_set *writefds,
fd_set *exceptfds,
struct timeval *timeout),
(n, readfds, writefds, exceptfds, timeout))
/* sigpause(3). */
#undef sigpause
CANCELABLE_SYSCALL (int, sigpause, (int sigmask), (sigmask))
/* __xpg_sigpause(3). */
CANCELABLE_SYSCALL (int, __xpg_sigpause, (int sigmask), (sigmask))
/* sigsuspend(2). */
CANCELABLE_SYSCALL (int, sigsuspend, (const sigset_t *mask), (mask))
/* sigwaitinfo(3). */
CANCELABLE_SYSCALL (int, sigwaitinfo, (const sigset_t *set, siginfo_t *info),
(set, info))
/* system(3). */
CANCELABLE_SYSCALL (int, system, (const char *line), (line))
@ -175,6 +229,12 @@ CANCELABLE_SYSCALL (__pid_t, wait, (__WAIT_STATUS_DEFN stat_loc), (stat_loc))
strong_alias (wait, __wait)
/* waitid(3). */
CANCELABLE_SYSCALL (int, waitid,
(idtype_t idtype, id_t id, siginfo_t *info, int options),
(idtype, id, info, options))
/* waitpid(2). */
CANCELABLE_SYSCALL (__pid_t, waitpid, (__pid_t pid, int *stat_loc,
int options),
@ -187,6 +247,12 @@ CANCELABLE_SYSCALL (ssize_t, write, (int fd, const void *buf, size_t n),
strong_alias (write, __write)
/* writev(2). */
CANCELABLE_SYSCALL (ssize_t, writev,
(int fd, const struct iovec *vector, int count),
(fd, vector, count))
/* The following system calls are thread cancellation points specified
in XNS. */

View File

@ -87,12 +87,10 @@ extern void __error_at_line (int status, int errnum, const char *file_name,
# define error __error
# define error_at_line __error_at_line
# ifdef USE_IN_LIBIO
# include <libio/iolibio.h>
# define fflush(s) INTUSE(_IO_fflush) (s)
# undef putc
# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
# endif
# include <libio/iolibio.h>
# define fflush(s) INTUSE(_IO_fflush) (s)
# undef putc
# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
#else /* not _LIBC */
@ -157,7 +155,7 @@ print_errno_message (int errnum)
s = _("Unknown system error");
#endif
#if _LIBC && USE_IN_LIBIO
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
{
__fwprintf (stderr, L": %s", s);
@ -173,7 +171,7 @@ static void
error_tail (int status, int errnum, const char *message, va_list args)
{
# if HAVE_VPRINTF || _LIBC
# if _LIBC && USE_IN_LIBIO
# if _LIBC
if (_IO_fwide (stderr, 0) > 0)
{
# define ALLOCA_LIMIT 2000
@ -224,7 +222,7 @@ error_tail (int status, int errnum, const char *message, va_list args)
++error_message_count;
if (errnum)
print_errno_message (errnum);
# if _LIBC && USE_IN_LIBIO
# if _LIBC
if (_IO_fwide (stderr, 0) > 0)
putwc (L'\n', stderr);
else
@ -259,17 +257,13 @@ error (status, errnum, message, va_alist)
fflush (stdout);
#ifdef _LIBC
# ifdef USE_IN_LIBIO
_IO_flockfile (stderr);
# else
__flockfile (stderr);
# endif
#endif
if (error_print_progname)
(*error_print_progname) ();
else
{
#if _LIBC && USE_IN_LIBIO
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s: ", program_name);
else
@ -293,11 +287,7 @@ error (status, errnum, message, va_alist)
#endif
#ifdef _LIBC
# ifdef USE_IN_LIBIO
_IO_funlockfile (stderr);
# else
__funlockfile (stderr);
# endif
#endif
}
@ -340,17 +330,13 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
fflush (stdout);
#ifdef _LIBC
# ifdef USE_IN_LIBIO
_IO_flockfile (stderr);
# else
__flockfile (stderr);
# endif
#endif
if (error_print_progname)
(*error_print_progname) ();
else
{
#if _LIBC && USE_IN_LIBIO
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s: ", program_name);
else
@ -360,7 +346,7 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
if (file_name != NULL)
{
#if _LIBC && USE_IN_LIBIO
#if _LIBC
if (_IO_fwide (stderr, 0) > 0)
__fwprintf (stderr, L"%s:%d: ", file_name, line_number);
else
@ -384,11 +370,7 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
#endif
#ifdef _LIBC
# ifdef USE_IN_LIBIO
_IO_funlockfile (stderr);
# else
__funlockfile (stderr);
# endif
#endif
}

View File

@ -1,3 +1,7 @@
2002-12-09 Ulrich Drepper <drepper@redhat.com>
* Versions: Remove duplicated sigwait entry.
2002-12-08 Ulrich Drepper <drepper@redhat.com>
* pthreadP.h: Enable pthread_cleanup_{push,pop} optimizations only

View File

@ -189,13 +189,14 @@ libpthread {
__nanosleep;
}
# XXX Adjust number for final release.
GLIBC_2.3.2 {
# Proposed API extensions.
pthread_tryjoin_np; pthread_timedjoin_np;
# The version for these interfaces is fixed.
creat; poll; pselect; readv; select; sigpause; sigsuspend;
sigwaitinfo; waitid; writev; __xpg_sigpause;
creat; poll; pselect; readv; select; sigpause; sigsuspend; sigwait;
sigwaitinfo; waitid; writev; __xpg_sigpause;
# Proposed API extensions.
# XXX Adjust number for final release.
pthread_tryjoin_np; pthread_timedjoin_np;
}
GLIBC_PRIVATE {

View File

@ -63,3 +63,4 @@ __pselect (nfds, readfds, writefds, exceptfds, timeout, sigmask)
return retval;
}
weak_alias (__pselect, pselect)
strong_alias (__pselect, __libc_pselect)

View File

@ -54,6 +54,7 @@ __default_sigpause (int mask)
}
#undef sigpause
weak_alias (__default_sigpause, sigpause)
strong_alias (__default_sigpause, __libc_sigpause)
/* We have to provide a default version of this function since the
@ -64,3 +65,4 @@ __xpg_sigpause (int sig)
{
return __sigpause (sig, 1);
}
strong_alias (__xpg_sigpause, __libc___xpg_sigpause)

View File

@ -119,3 +119,4 @@ __waitid (idtype, id, infop, options)
return 0;
}
weak_alias (__waitid, waitid)
strong_alias (__waitid, __libc_waitid)

View File

@ -35,7 +35,7 @@ readv - readv i:ipi __readv readv
reboot - reboot i:i reboot
rename - rename i:ss rename
rmdir - rmdir i:s __rmdir rmdir
select - select i:iPPPP __select select
select - select i:iPPPP __select __libc_select select
setdomain - setdomainname i:si setdomainname
setegid - setegid i:i __setegid setegid
seteuid - seteuid i:i __seteuid seteuid

View File

@ -65,6 +65,7 @@ __poll (fds, nfds, timeout)
}
libc_hidden_def (__poll)
weak_alias (__poll, poll)
strong_alias (__poll, __libc_poll)
/* Get the emulation code. */
# define __poll(fds, nfds, timeout) \

View File

@ -66,3 +66,4 @@ __sigsuspend (set)
}
libc_hidden_def (__sigsuspend)
weak_alias (__sigsuspend, sigsuspend)
strong_alias (__sigsuspend, __libc_sigsuspend)

View File

@ -69,3 +69,4 @@ weak_alias (__sigwait, sigwait)
#else
# include <sysdeps/posix/sigwait.c>
#endif
strong_alias (__sigwait, __libc_sigwait)

View File

@ -46,3 +46,4 @@ weak_alias (__sigwaitinfo, sigwaitinfo)
#else
# include <sysdeps/generic/sigwaitinfo.c>
#endif
strong_alias (__sigwaitinfo, __libc_sigwaitinfo)

View File

@ -4,7 +4,7 @@ adjtimex adjtime adjtimex i:p __adjtimex adjtimex ntp_adjtime __adjtimex_interna
bdflush EXTRA bdflush i:ii bdflush
capget EXTRA capget i:pp capget
capset EXTRA capset i:pp capset
creat - creat i:si creat
creat - creat i:si __libc_creat creat
create_module EXTRA create_module 3 create_module
delete_module EXTRA delete_module 3 delete_module
fdatasync - fdatasync i:i fdatasync
@ -52,7 +52,7 @@ sched_setaffinity - sched_setaffinity i:iip sched_setaffinity
sched_setp - sched_setparam i:ip __sched_setparam sched_setparam
sched_sets - sched_setscheduler i:iip __sched_setscheduler sched_setscheduler
sched_yield - sched_yield i: __sched_yield sched_yield
select - _newselect i:iPPPP __select select
select - _newselect i:iPPPP __select __libc_select select
sendfile - sendfile i:iipi sendfile
sendfile64 - sendfile64 i:iipi sendfile64
setfsgid EXTRA setfsgid i:i setfsgid