2004-04-28  Carlos O'Donell  <carlos@baldric.uwo.ca>
	* sysdeps/unix/sysv/linux/mq_getattr.c: Include <stddef.h>.
	* sysdeps/unix/sysv/linux/mq_notify.c: Likewise.
	* sysdeps/unix/sysv/linux/mq_open.c: Likewise.
	* sysdeps/unix/sysv/linux/mq_receive.c: Likewise.
	* sysdeps/unix/sysv/linux/mq_send.c: Likewise.

	* manual/resource.texi (sched_setaffinity, sched_getaffinity): Fix
	prototypes and description [BZ #131].

	* string/bits/string2.h (strpbrk): Cast NULL to char * [BZ #130].
	Patch by Ed Catmur <ed@catmur.co.uk>.
	* string/tst-inlcall.c (main): Add test for strpbrk.
This commit is contained in:
Roland McGrath 2004-04-29 21:55:45 +00:00
parent 420a2f8b8d
commit 6f0b2e1f0f
11 changed files with 48 additions and 14 deletions

View File

@ -1,3 +1,11 @@
2004-04-28 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/unix/sysv/linux/mq_getattr.c: Include <stddef.h>.
* sysdeps/unix/sysv/linux/mq_notify.c: Likewise.
* sysdeps/unix/sysv/linux/mq_open.c: Likewise.
* sysdeps/unix/sysv/linux/mq_receive.c: Likewise.
* sysdeps/unix/sysv/linux/mq_send.c: Likewise.
2004-04-29 Philip Blundell <pb@nexus.co.uk> 2004-04-29 Philip Blundell <pb@nexus.co.uk>
* sysdeps/arm/dl-machine.h (RTLD_START): Avoid unnecessary GOT * sysdeps/arm/dl-machine.h (RTLD_START): Avoid unnecessary GOT
@ -5,6 +13,13 @@
2004-04-29 Jakub Jelinek <jakub@redhat.com> 2004-04-29 Jakub Jelinek <jakub@redhat.com>
* manual/resource.texi (sched_setaffinity, sched_getaffinity): Fix
prototypes and description [BZ #131].
* string/bits/string2.h (strpbrk): Cast NULL to char * [BZ #130].
Patch by Ed Catmur <ed@catmur.co.uk>.
* string/tst-inlcall.c (main): Add test for strpbrk.
[BZ #140] [BZ #140]
* sysdeps/unix/sysv/linux/sys/sysctl.h: Remove linux/compiler.h * sysdeps/unix/sysv/linux/sys/sysctl.h: Remove linux/compiler.h
include. include.

View File

@ -1,3 +1,8 @@
2004-04-28 Jakub Jelinek <jakub@redhat.com>
* semaphore.c (sem_timedwait): Return -1 and set errno instead of
returning error number [BZ #133]. Patch by <rmhaddad@yahoo.com>.
2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp> 2004-04-22 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
* sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer * sysdeps/unix/sysv/linux/sh/vfork.S: Fix wrong function pointer

View File

@ -225,7 +225,8 @@ int sem_timedwait(sem_t *sem, const struct timespec *abstime)
/* The standard requires that if the function would block and the /* The standard requires that if the function would block and the
time value is illegal, the function returns with an error. */ time value is illegal, the function returns with an error. */
__pthread_unlock(&sem->__sem_lock); __pthread_unlock(&sem->__sem_lock);
return EINVAL; __set_errno (EINVAL);
return -1;
} }
/* Set up extrication interface */ /* Set up extrication interface */
@ -263,7 +264,8 @@ int sem_timedwait(sem_t *sem, const struct timespec *abstime)
if (was_on_queue) { if (was_on_queue) {
__pthread_set_own_extricate_if(self, 0); __pthread_set_own_extricate_if(self, 0);
return ETIMEDOUT; __set_errno (ETIMEDOUT);
return -1;
} }
/* Eat the outstanding restart() from the signaller */ /* Eat the outstanding restart() from the signaller */

View File

@ -1367,12 +1367,12 @@ affinity mask can be retrieved from the system.
@comment sched.h @comment sched.h
@comment GNU @comment GNU
@deftypefun int sched_getaffinity (pid_t @var{pid}, cpu_set_t *@var{cpuset}) @deftypefun int sched_getaffinity (pid_t @var{pid}, size_t @var{cpusetsize}, cpu_set_t *@var{cpuset})
This functions stores the CPU affinity mask for the process or thread This functions stores the CPU affinity mask for the process or thread
with the ID @var{pid} in the memory pointed to by @var{cpuset}. If with the ID @var{pid} in the @var{cpusetsize} bytes long bitmap
successful, the function always initializes all bits in the pointed to by @var{cpuset}. If successful, the function always
@code{cpu_set_t} object and returns zero. initializes all bits in the @code{cpu_set_t} object and returns zero.
If @var{pid} does not correspond to a process or thread on the system If @var{pid} does not correspond to a process or thread on the system
the or the function fails for some other reason, it returns @code{-1} the or the function fails for some other reason, it returns @code{-1}
@ -1395,12 +1395,12 @@ interface must be provided for that.
@comment sched.h @comment sched.h
@comment GNU @comment GNU
@deftypefun int sched_setaffinity (pid_t @var{pid}, const cpu_set_t *@var{cpuset}) @deftypefun int sched_setaffinity (pid_t @var{pid}, size_t @var{cpusetsize}, const cpu_set_t *@var{cpuset})
This function installs the affinity mask pointed to by @var{cpuset} This function installs the @var{cpusetsize} bytes long affinity mask
for the process or thread with the ID @var{pid}. If successful the pointed to by @var{cpuset} for the process or thread with the ID @var{pid}.
function returns zero and the scheduler will in future take the If successful the function returns zero and the scheduler will in future
affinity information into account. take the affinity information into account.
If the function fails it will return @code{-1} and @code{errno} is set If the function fails it will return @code{-1} and @code{errno} is set
to the error code: to the error code:

View File

@ -1,5 +1,5 @@
/* Machine-independant string function optimizations. /* Machine-independant string function optimizations.
Copyright (C) 1997-2002, 2003 Free Software Foundation, Inc. Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997. Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@ -1019,7 +1019,7 @@ __strspn_c3 (__const char *__s, int __accept1, int __accept2, int __accept3)
({ char __a0, __a1, __a2; \ ({ char __a0, __a1, __a2; \
(__builtin_constant_p (accept) && __string2_1bptr_p (accept) \ (__builtin_constant_p (accept) && __string2_1bptr_p (accept) \
? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \ ? ((__a0 = ((__const char *) (accept))[0], __a0 == '\0') \
? ((void) (s), NULL) \ ? ((void) (s), (char *) NULL) \
: ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \ : ((__a1 = ((__const char *) (accept))[1], __a1 == '\0') \
? strchr (s, __a0) \ ? strchr (s, __a0) \
: ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \ : ((__a2 = ((__const char *) (accept))[2], __a2 == '\0') \

View File

@ -1,5 +1,5 @@
/* Tester for calling inline string functions. /* Tester for calling inline string functions.
Copyright (C) 1998, 2000 Free Software Foundation, Inc. Copyright (C) 1998, 2000, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@ -62,6 +62,13 @@ main (void)
++errors; ++errors;
} }
const char * const hw = "hello world";
if (strpbrk (hw, "o") - hw != 4)
{
puts ("strpbrk test 1 failed");
++errors;
}
if (errors == 0) if (errors == 0)
{ {
status = EXIT_SUCCESS; status = EXIT_SUCCESS;

View File

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <mqueue.h> #include <mqueue.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
#ifdef __NR_mq_getsetattr #ifdef __NR_mq_getsetattr

View File

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <mqueue.h> #include <mqueue.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
#ifdef __NR_mq_notify #ifdef __NR_mq_notify

View File

@ -19,6 +19,7 @@
#include <errno.h> #include <errno.h>
#include <mqueue.h> #include <mqueue.h>
#include <stdarg.h> #include <stdarg.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
#ifdef __NR_mq_open #ifdef __NR_mq_open

View File

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <mqueue.h> #include <mqueue.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
#ifdef __NR_mq_timedreceive #ifdef __NR_mq_timedreceive

View File

@ -18,6 +18,7 @@
#include <errno.h> #include <errno.h>
#include <mqueue.h> #include <mqueue.h>
#include <stddef.h>
#include <sysdep.h> #include <sysdep.h>
#ifdef __NR_mq_timedsend #ifdef __NR_mq_timedsend