From: Ulrich Drepper Date: Tue, 18 Feb 2003 03:46:54 +0000 (+0000) Subject: Update. X-Git-Tag: cvs/glibc-2_3_2~128 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=46d7e2ba2235768df3d633109451fd2bee5f9291;p=thirdparty%2Fglibc.git Update. 2003-02-17 Ulrich Drepper * sysdeps/posix/sysconf.c (__sysconf): Test for LOGIN_NAME_MAX and TTY_NAME_MAX and not the _POSIX_* minimal value macros. * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX and LOGIN_NAME_MAX. --- diff --git a/ChangeLog b/ChangeLog index 5ca66feb90c..fcaa26c98d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-02-17 Ulrich Drepper + + * sysdeps/posix/sysconf.c (__sysconf): Test for LOGIN_NAME_MAX and + TTY_NAME_MAX and not the _POSIX_* minimal value macros. + * sysdeps/unix/sysv/linux/bits/local_lim.h: Define TTY_NAME_MAX + and LOGIN_NAME_MAX. + 2003-02-17 Kevin B. Hendricks Franz Sirl diff --git a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c index 0fce02a401b..e1c79e79b38 100644 --- a/nptl/sysdeps/unix/sysv/linux/pthread_kill.c +++ b/nptl/sysdeps/unix/sysv/linux/pthread_kill.c @@ -34,7 +34,11 @@ __pthread_kill (threadid, signo) /* We have a special syscall to do the work. */ INTERNAL_SYSCALL_DECL (err); - int val = INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo); + /* The kernel returns EINVAL for PIDs <= 0. This is not nice since + the user would expect ESRCH. Correct it here. */ + int val = (pd->tid > 0 + ? INTERNAL_SYSCALL (tkill, err, 2, pd->tid, signo) + : ESRCH); return (INTERNAL_SYSCALL_ERROR_P (val, err) ? INTERNAL_SYSCALL_ERRNO (val, err) : 0); diff --git a/sysdeps/posix/sysconf.c b/sysdeps/posix/sysconf.c index 1700ed0b873..7ad8ac7891f 100644 --- a/sysdeps/posix/sysconf.c +++ b/sysdeps/posix/sysconf.c @@ -515,15 +515,15 @@ __sysconf (name) return NSS_BUFLEN_PASSWD; case _SC_LOGIN_NAME_MAX: -#ifdef _POSIX_LOGIN_NAME_MAX - return _POSIX_LOGIN_NAME_MAX; +#ifdef LOGIN_NAME_MAX + return LOGIN_NAME_MAX; #else return -1; #endif case _SC_TTY_NAME_MAX: -#ifdef _POSIX_TTY_NAME_MAX - return _POSIX_TTY_NAME_MAX; +#ifdef TTY_NAME_MAX + return TTY_NAME_MAX; #else return -1; #endif