aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-02-28 05:08:01 +0000
committerUlrich Drepper <drepper@redhat.com>2000-02-28 05:08:01 +0000
commit0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0 (patch)
tree5aa27fb2d06f760ba64c7424d36f2bf91a1940f9 /sysdeps
parent919e98fa39e74f1bbd5c4b0b21edbce3d293f03f (diff)
downloadglibc-0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0.zip
glibc-0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0.tar.gz
glibc-0ed99ce46d9521347c2fd1c72f7b4e9aa0e3f4d0.tar.bz2
Update.
2000-02-27 Ulrich Drepper <drepper@redhat.com> * conform/conformtest.pl (@headers): Add wordexp.h, wctype.h, wchar.h, varargs.h, utmpx.h, utime.h, unistd.h, ulimit.h, ucontext.h, time.h, termios.h, tar.h, sys/wait.h, sys/uio.h, sys/types.h, sys/times.h, sys/timeb.h, sys/time.h, sys/statvfs.h, sys/stat.h, sys/shm.h, sys/sem.h, and sys/resource.h. Implement handling of allow-header. * conform/data/fcntl.h-data: Correct various bugs. * conform/data/fnmatch.h-data: Likewise. * conform/data/math.h-data: Likewise. * conform/data/ndbm.h-data: Likewise. * conform/data/nl_types.h-data: Likewise. * conform/data/poll.h-data: Likewise. * conform/data/pthread.h-data: Likewise. * conform/data/semaphore.h-data: Likewise. * conform/data/setjmp.h-data: Likewise. * conform/data/signal.h-data: Likewise. * conform/data/stdarg.h-data: Likewise. * conform/data/stddef.h-data: Likewise. * conform/data/stdio.h-data: Likewise. * conform/data/stdlib.h-data: Likewise. * conform/data/string.h-data: Likewise. * conform/data/strings.h-data: Likewise. * conform/data/stropts.h-data: Likewise. * conform/data/syslog.h-data: Likewise. * conform/data/sys/ipc.h-data: Likewise. * conform/data/sys/mman.h-data: Likewise. * conform/data/sys/msg.h-data: Likewise. * conform/data/tar.h-data: New file. * conform/data/termios.h-data: New file. * conform/data/time.h-data: New file. * conform/data/ucontext.h-data: New file. * conform/data/ulimit.h-data: New file. * conform/data/unistd.h-data: New file. * conform/data/utime.h-data: New file. * conform/data/utmpx.h-data: New file. * conform/data/varargs.h-data: New file. * conform/data/wchar.h-data: New file. * conform/data/wctype.h-data: New file. * conform/data/wordexp.h-data: New file. * conform/data/sys/resource.h-data: New file. * conform/data/sys/sem.h-data: New file. * conform/data/sys/shm.h-data: New file. * conform/data/sys/stat.h-data: New file. * conform/data/sys/statvfs.h-data: New file. * conform/data/sys/time.h-data: New file. * conform/data/sys/timeb.h-data: New file. * conform/data/sys/times.h-data: New file. * conform/data/sys/types.h-data: New file. * conform/data/sys/uio.h-data: New file. * conform/data/sys/wait.h-data: New file. * grp/grp.h (getgrent_r): Declare only if __USE_GNU. * include/sys/time.h (__itimes): Fix type of second parameter. * io/sys/stat.h (S_IFLNK): Define also if __USE_XOPEN. (S_ISVTX): Likewise. * io/sys/statvfs.h: Define fsblkcnt_t and fsfilcnt_t. * locale/langindo.h: Make ERA_YEAR, INT_CURR_SYMBOL, CURRENCY_SYMBOL, MON_DECIMAL_POINT, MON_THOUSANDS_SEP, MON_GROUPING, POSITIVE_SIGN, NEGATIVE_SIGN, INT_FRAC_DIGITS, FRAC_DIGITS, P_CS_PRECEDES, P_SEP_BY_SPACE, N_CS_PRECEDES, N_SEP_BY_SPACE, P_SIGN_POSN, N_SIGN_POSN, DECIMAL_POINT, THOUSANDS_SEP, GROUPING, YESEXPR, NOEXPR, YESSTR, and NOSTR only available if __USE_GNU. * math/bits/mathcalls.h: Don't declare tgamma and scalbn if only __USE_XOPEN. * posix/unistd.h: Don't define ptrdiff_t. (sbrk): Correct type of parameter. * sysdeps/generic/sbrk.c: Likewise. * sysdeps/mach/hurd/sbrk.c: Likewise. * posix/sys/types.h: Allow id_t, suseconds_t, fsblkcnt_t, and fsfilcnt_t being defined elsewhere. * resource/sys/resource.h: Define id_t. If __USE_XOPEN use int for type of first parameter if getrlimit, getrlimit64, setrlimit, setrlimit64, getrusage, getpriority, and setpriority. * sysdeps/generic/getpriority.c: Fix type of second parameter. * sysdeps/generic/setpriority.c: Likewise. * sysdeps/mach/hurd/getpriority.c: Likewise. * sysdeps/mach/hurd/setpriority.c: Likewise. * sysdeps/unix/sysv/irix4/getpriority.c: Likewise. * sysdeps/unix/sysv/irix4/setpriority.c: Likewise. * sysdeps/unix/sysv/linux/getpriority.c: Likewise. * sysdeps/generic/utimes.c: Fix parameter of third parameter. * sysdeps/mach/hurd/utimes.c: Likewise. * sysdeps/posix/utimes.c: Likewise. * sysdeps/generic/bits/shm.h: Define shmatt_t type and use it in struct shmid_ds definition. * sysdeps/gnu/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/bits/shm.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/shm.h: Likewise. * sysvipc/sys/shm.h: Define time_t. * sysvipc/sys/sem.h (struct sembuf): Make sem_num field unsigned. * sysdeps/gnu/bits/sem.h: Rename anonymous type struct sem_queue and struct sem_undo to struct __sem_queue and struct __sem_undo resp. * time/time.h: Define suseconds_t if not already done. * sysdeps/unix/sysv/linux/bits/statvfs.h: Rename f_spare to __f_spare. * sysdeps/unix/sysv/linux/fstatvfs64.c: Likewise. * sysdeps/unix/sysv/linux/statvfs64.c: Likewise. * sysdeps/unix/sysv/linux/internal_statvfs.c: Likewise. * intl/bindtextdom.c: Use rwlock to avoid surprising results in multithreaded applications. * intl/dcigettext.c: Likewise. * intl/textdomain.c: Likewise. * intl/*.c: Update copyright. * sysdeps/generic/bits/libc-lock.h: Define __libc_rwlock_* stubs. 2000-02-27 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/configure.in: Treat also "/usr/" as prefix especially. 2000-02-27 Ulrich Drepper <drepper@redhat.com> * po/de.po: Update from translation team. * po/ko.po: Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/bits/libc-lock.h11
-rw-r--r--sysdeps/generic/bits/shm.h9
-rw-r--r--sysdeps/generic/getpriority.c4
-rw-r--r--sysdeps/generic/sbrk.c4
-rw-r--r--sysdeps/generic/setpriority.c4
-rw-r--r--sysdeps/generic/utimes.c4
-rw-r--r--sysdeps/gnu/bits/sem.h8
-rw-r--r--sysdeps/gnu/bits/shm.h9
-rw-r--r--sysdeps/mach/hurd/getpriority.c4
-rw-r--r--sysdeps/mach/hurd/sbrk.c4
-rw-r--r--sysdeps/mach/hurd/setpriority.c4
-rw-r--r--sysdeps/mach/hurd/utimes.c4
-rw-r--r--sysdeps/posix/utimes.c4
-rw-r--r--sysdeps/unix/sysv/irix4/getpriority.c4
-rw-r--r--sysdeps/unix/sysv/irix4/setpriority.c4
-rw-r--r--sysdeps/unix/sysv/linux/alpha/bits/shm.h11
-rw-r--r--sysdeps/unix/sysv/linux/bits/shm.h11
-rw-r--r--sysdeps/unix/sysv/linux/bits/statvfs.h26
-rw-r--r--sysdeps/unix/sysv/linux/configure.in2
-rw-r--r--sysdeps/unix/sysv/linux/fstatvfs64.c4
-rw-r--r--sysdeps/unix/sysv/linux/getpriority.c6
-rw-r--r--sysdeps/unix/sysv/linux/internal_statvfs.c2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/shm.h11
-rw-r--r--sysdeps/unix/sysv/linux/statvfs64.c4
24 files changed, 92 insertions, 66 deletions
diff --git a/sysdeps/generic/bits/libc-lock.h b/sysdeps/generic/bits/libc-lock.h
index 84f9cd4..4613310 100644
--- a/sysdeps/generic/bits/libc-lock.h
+++ b/sysdeps/generic/bits/libc-lock.h
@@ -1,5 +1,5 @@
/* libc-internal interface for mutex locks. Stub version.
- Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1999, 2000 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
@@ -29,9 +29,11 @@
begins with a `*'), because its storage size will not be known outside
of libc. */
#define __libc_lock_define(CLASS,NAME)
+#define __libc_rwlock_define(CLASS,NAME)
/* Define an initialized lock variable NAME with storage class CLASS. */
#define __libc_lock_define_initialized(CLASS,NAME)
+#define __libc_rwlock_define_initialized(CLASS,NAME)
/* Define an initialized recursive lock variable NAME with storage
class CLASS. */
@@ -40,6 +42,7 @@
/* Initialize the named lock variable, leaving it in a consistent, unlocked
state. */
#define __libc_lock_init(NAME)
+#define __libc_rwlock_init(NAME)
/* Same as last but this time we initialize a recursive mutex. */
#define __libc_lock_init_recursive(NAME)
@@ -48,24 +51,30 @@
used again until __libc_lock_init is called again on it. This must be
called on a lock variable before the containing storage is reused. */
#define __libc_lock_fini(NAME)
+#define __libc_rwlock_fini(NAME)
/* Finalize recursive named lock. */
#define __libc_lock_fini_recursive(NAME)
/* Lock the named lock variable. */
#define __libc_lock_lock(NAME)
+#define __libc_rwlock_rdlock(NAME)
+#define __libc_rwlock_wrlock(NAME)
/* Lock the recursive named lock variable. */
#define __libc_lock_lock_recursive(NAME)
/* Try to lock the named lock variable. */
#define __libc_lock_trylock(NAME) 0
+#define __libc_rwlock_tryrdlock(NAME) 0
+#define __libc_rwlock_trywrlock(NAME) 0
/* Try to lock the recursive named lock variable. */
#define __libc_lock_trylock_recursive(NAME) 0
/* Unlock the named lock variable. */
#define __libc_lock_unlock(NAME)
+#define __libc_rwlock_unlock(NAME)
/* Unlock the recursive named lock variable. */
#define __libc_lock_unlock_recursive(NAME)
diff --git a/sysdeps/generic/bits/shm.h b/sysdeps/generic/bits/shm.h
index 8c97999..e230f81 100644
--- a/sysdeps/generic/bits/shm.h
+++ b/sysdeps/generic/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000 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
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Flags for `shmat'. */
#define SHM_RDONLY 010000 /* attach read-only else read-write */
@@ -32,6 +32,9 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned short int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
@@ -42,5 +45,5 @@ struct shmid_ds
__time_t sem_ctime; /* time of last change by shmctl() */
__pid_t shm_cpid; /* pid of creator */
__pid_t shm_lpid; /* pid of last shmop */
- unsigned short int shm_nattch; /* number of current attaches */
+ shmatt_t shm_nattch; /* number of current attaches */
};
diff --git a/sysdeps/generic/getpriority.c b/sysdeps/generic/getpriority.c
index ce9eb59..e92303b 100644
--- a/sysdeps/generic/getpriority.c
+++ b/sysdeps/generic/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 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
@@ -26,7 +26,7 @@
int
getpriority (which, who)
enum __priority_which which;
- int who;
+ id_t who;
{
__set_errno (ENOSYS);
return -1;
diff --git a/sysdeps/generic/sbrk.c b/sysdeps/generic/sbrk.c
index 4df883b..8710a9e 100644
--- a/sysdeps/generic/sbrk.c
+++ b/sysdeps/generic/sbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 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
@@ -29,7 +29,7 @@ extern int __libc_multiple_libcs; /* Defined in init-first.c. */
If INCREMENT is negative, shrink data space by - INCREMENT.
Return start of new space allocated, or -1 for errors. */
void *
-__sbrk (ptrdiff_t increment)
+__sbrk (intptr_t increment)
{
void *oldbrk;
diff --git a/sysdeps/generic/setpriority.c b/sysdeps/generic/setpriority.c
index 997bea8..04158c6 100644
--- a/sysdeps/generic/setpriority.c
+++ b/sysdeps/generic/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 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
@@ -24,7 +24,7 @@
int
setpriority (which, who, prio)
enum __priority_which which;
- int who;
+ id_t who;
int prio;
{
__set_errno (ENOSYS);
diff --git a/sysdeps/generic/utimes.c b/sysdeps/generic/utimes.c
index 438673b..4d29339 100644
--- a/sysdeps/generic/utimes.c
+++ b/sysdeps/generic/utimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 1995, 1996, 1997, 2000 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
@@ -25,7 +25,7 @@
int
__utimes (file, tvp)
const char *file;
- struct timeval tvp[2];
+ const struct timeval tvp[2];
{
if (file == NULL || tvp == NULL)
{
diff --git a/sysdeps/gnu/bits/sem.h b/sysdeps/gnu/bits/sem.h
index 3d113a7..096254d 100644
--- a/sysdeps/gnu/bits/sem.h
+++ b/sysdeps/gnu/bits/sem.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 1998, 2000 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
@@ -42,9 +42,9 @@ struct semid_ds
__time_t sem_otime; /* last semop() time */
__time_t sem_ctime; /* last time changed by semctl() */
struct sem *__sembase; /* ptr to first semaphore in array */
- struct sem_queue *__sem_pending; /* pending operations */
- struct sem_queue *__sem_pending_last; /* last pending operation */
- struct sem_undo *__undo; /* ondo requests on this array */
+ struct __sem_queue *__sem_pending; /* pending operations */
+ struct __sem_queue *__sem_pending_last;/* last pending operation */
+ struct __sem_undo *__undo; /* ondo requests on this array */
unsigned short int sem_nsems; /* number of semaphores in set */
};
diff --git a/sysdeps/gnu/bits/shm.h b/sysdeps/gnu/bits/shm.h
index c707059..81116f4 100644
--- a/sysdeps/gnu/bits/shm.h
+++ b/sysdeps/gnu/bits/shm.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1996, 1997, 2000 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
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -36,6 +36,9 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned short int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
@@ -46,7 +49,7 @@ struct shmid_ds
__time_t shm_ctime; /* time of last change by shmctl() */
__ipc_pid_t shm_cpid; /* pid of creator */
__ipc_pid_t shm_lpid; /* pid of last shmop */
- unsigned short int shm_nattch; /* number of current attaches */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned short int __shm_npages; /* size of segment (pages) */
unsigned long int *__shm_pages; /* array of ptrs to frames -> SHMMAX */
struct vm_area_struct *__attaches; /* descriptors for attaches */
diff --git a/sysdeps/mach/hurd/getpriority.c b/sysdeps/mach/hurd/getpriority.c
index 49cc38e..99e9fdb 100644
--- a/sysdeps/mach/hurd/getpriority.c
+++ b/sysdeps/mach/hurd/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1996, 1997, 2000 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
@@ -25,7 +25,7 @@
or user (as specified by WHO) is used. A lower priority number means higher
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-getpriority (enum __priority_which which, int who)
+getpriority (enum __priority_which which, id_t who)
{
error_t err, onerr;
int maxpri = INT_MIN;
diff --git a/sysdeps/mach/hurd/sbrk.c b/sysdeps/mach/hurd/sbrk.c
index ece9b50..48a15d9 100644
--- a/sysdeps/mach/hurd/sbrk.c
+++ b/sysdeps/mach/hurd/sbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 94, 95, 97, 98 Free Software Foundation, Inc.
+/* Copyright (C) 1991, 94, 95, 97, 98, 2000 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
@@ -24,7 +24,7 @@
If INCREMENT is negative, shrink data space by - INCREMENT.
Return the address of the start of the new data space, or -1 for errors. */
void *
-__sbrk (int increment)
+__sbrk (intptr_t increment)
{
void *result;
diff --git a/sysdeps/mach/hurd/setpriority.c b/sysdeps/mach/hurd/setpriority.c
index 3da7f32..d9951e5 100644
--- a/sysdeps/mach/hurd/setpriority.c
+++ b/sysdeps/mach/hurd/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1995, 1997, 2000 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
@@ -22,7 +22,7 @@
/* Set the priority of all processes specified by WHICH and WHO
to PRIO. Returns 0 on success, -1 on errors. */
int
-setpriority (enum __priority_which which, int who, int prio)
+setpriority (enum __priority_which which, id_t who, int prio)
{
error_t err;
error_t pidloser, priloser;
diff --git a/sysdeps/mach/hurd/utimes.c b/sysdeps/mach/hurd/utimes.c
index aec7d5d..6f24e99 100644
--- a/sysdeps/mach/hurd/utimes.c
+++ b/sysdeps/mach/hurd/utimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 92, 93, 94, 95, 97, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1995, 97, 99, 2000 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
@@ -26,7 +26,7 @@
int
__utimes (file, tvp)
const char *file;
- struct timeval tvp[2];
+ const struct timeval tvp[2];
{
struct timeval timevals[2];
error_t err;
diff --git a/sysdeps/posix/utimes.c b/sysdeps/posix/utimes.c
index 2ef10b7..dfb236d 100644
--- a/sysdeps/posix/utimes.c
+++ b/sysdeps/posix/utimes.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000 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
@@ -24,7 +24,7 @@
/* Change the access time of FILE to TVP[0] and
the modification time of FILE to TVP[1]. */
int
-__utimes (const char *file, struct timeval tvp[2])
+__utimes (const char *file, const struct timeval tvp[2])
{
struct utimbuf buf, *times;
diff --git a/sysdeps/unix/sysv/irix4/getpriority.c b/sysdeps/unix/sysv/irix4/getpriority.c
index 290573a..5203b42 100644
--- a/sysdeps/unix/sysv/irix4/getpriority.c
+++ b/sysdeps/unix/sysv/irix4/getpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997, 2000 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
@@ -29,7 +29,7 @@ extern int __sysmp __P ((int, ...));
int
getpriority (which, who)
enum __priority_which which;
- int who;
+ id_t who;
{
switch (which)
{
diff --git a/sysdeps/unix/sysv/irix4/setpriority.c b/sysdeps/unix/sysv/irix4/setpriority.c
index 5d6313a..8e2c8ec 100644
--- a/sysdeps/unix/sysv/irix4/setpriority.c
+++ b/sysdeps/unix/sysv/irix4/setpriority.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1994, 1996, 1997, 2000 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
@@ -23,7 +23,7 @@
int
setpriority (which, who, prio)
enum __priority_which which;
- int who;
+ id_t who;
int prio;
{
switch (which)
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/shm.h b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
index 683a9b6..acd479d 100644
--- a/sysdeps/unix/sysv/linux/alpha/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/alpha/bits/shm.h
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -36,6 +36,9 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
@@ -44,9 +47,9 @@ struct shmid_ds
__time_t shm_atime; /* time of last shmat() */
__time_t shm_dtime; /* time of last shmdt() */
__time_t shm_ctime; /* time of last change by shmctl() */
- pid_t shm_cpid; /* pid of creator */
- pid_t shm_lpid; /* pid of last shmop */
- unsigned long int shm_nattch; /* number of current attaches */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned long int __unused1;
unsigned long int __unused2;
};
diff --git a/sysdeps/unix/sysv/linux/bits/shm.h b/sysdeps/unix/sysv/linux/bits/shm.h
index ca397e8..8e4b8ac 100644
--- a/sysdeps/unix/sysv/linux/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/bits/shm.h
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
/* Permission flag for shmget. */
#define SHM_R 0400 /* or S_IRUGO from <linux/stat.h> */
@@ -36,6 +36,9 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
@@ -47,9 +50,9 @@ struct shmid_ds
unsigned long int __unused2;
__time_t shm_ctime; /* time of last change by shmctl() */
unsigned long int __unused3;
- pid_t shm_cpid; /* pid of creator */
- pid_t shm_lpid; /* pid of last shmop */
- unsigned long int shm_nattch; /* number of current attaches */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned long int __unused4;
unsigned long int __unused5;
};
diff --git a/sysdeps/unix/sysv/linux/bits/statvfs.h b/sysdeps/unix/sysv/linux/bits/statvfs.h
index fc63806..c000e8a 100644
--- a/sysdeps/unix/sysv/linux/bits/statvfs.h
+++ b/sysdeps/unix/sysv/linux/bits/statvfs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2000 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
@@ -44,7 +44,7 @@ struct statvfs
__fsid_t f_fsid;
unsigned long int f_flag;
unsigned long int f_namemax;
- int f_spare[6];
+ int __f_spare[6];
};
#ifdef __USE_LARGEFILE64
@@ -61,7 +61,7 @@ struct statvfs64
__fsid_t f_fsid;
unsigned long int f_flag;
unsigned long int f_namemax;
- int f_spare[6];
+ int __f_spare[6];
};
#endif
@@ -73,22 +73,24 @@ enum
#define ST_RDONLY ST_RDONLY
ST_NOSUID = 2, /* Ignore suid and sgid bits. */
#define ST_NOSUID ST_NOSUID
+#ifdef __USE_GNU
ST_NODEV = 4, /* Disallow access to device special files. */
-#define ST_NODEV ST_NODEV
+# define ST_NODEV ST_NODEV
ST_NOEXEC = 8, /* Disallow program execution. */
-#define ST_NOEXEC ST_NOEXEC
+# define ST_NOEXEC ST_NOEXEC
ST_SYNCHRONOUS = 16, /* Writes are synced at once. */
-#define ST_SYNCHRONOUS ST_SYNCHRONOUS
+# define ST_SYNCHRONOUS ST_SYNCHRONOUS
ST_MANDLOCK = 64, /* Allow mandatory locks on an FS. */
-#define ST_MANDLOCK ST_MANDLOCK
+# define ST_MANDLOCK ST_MANDLOCK
ST_WRITE = 128, /* Write on file/directory/symlink. */
-#define ST_WRITE ST_WRITE
+# define ST_WRITE ST_WRITE
ST_APPEND = 256, /* Append-only file. */
-#define ST_APPEND ST_APPEND
+# define ST_APPEND ST_APPEND
ST_IMMUTABLE = 512, /* Immutable file. */
-#define ST_IMMUTABLE ST_IMMUTABLE
+# define ST_IMMUTABLE ST_IMMUTABLE
ST_NOATIME = 1024, /* Do not update access times. */
-#define ST_NOATIME ST_NOATIME
+# define ST_NOATIME ST_NOATIME
ST_NODIRATIME /* Do not update directory access times. */
-#define ST_NODIRATIME ST_NODIRATIME
+# define ST_NODIRATIME ST_NODIRATIME
+#endif /* Use GNU. */
};
diff --git a/sysdeps/unix/sysv/linux/configure.in b/sysdeps/unix/sysv/linux/configure.in
index 5cb5462..9d17063 100644
--- a/sysdeps/unix/sysv/linux/configure.in
+++ b/sysdeps/unix/sysv/linux/configure.in
@@ -62,7 +62,7 @@ fi
# files. I.e., when the installation prefix is "/usr" we have to place
# shared library objects and the configuration files on the root partition
# in /lib and /etc.
-if test "$prefix" = "/usr"; then
+if test "$prefix" = "/usr" -o "$prefix" = "/usr/"; then
# 64bit libraries on sparc go to /lib64 and not /lib
if test "$machine" = "sparc/sparc64"; then
libc_cv_slibdir="/lib64"
diff --git a/sysdeps/unix/sysv/linux/fstatvfs64.c b/sysdeps/unix/sysv/linux/fstatvfs64.c
index 8ede56e..bc2165e 100644
--- a/sysdeps/unix/sysv/linux/fstatvfs64.c
+++ b/sysdeps/unix/sysv/linux/fstatvfs64.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FD resides.
- Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1997, 1998, 2000 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
@@ -41,7 +41,7 @@ fstatvfs64 (int fd, struct statvfs64 *buf)
buf->f_fsid = buf32.f_fsid;
buf->f_flag = buf32.f_flag;
buf->f_namemax = buf32.f_namemax;
- memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
+ memcpy (buf->__f_spare, buf32.__f_spare, sizeof (buf32.__f_spare));
return 0;
}
diff --git a/sysdeps/unix/sysv/linux/getpriority.c b/sysdeps/unix/sysv/linux/getpriority.c
index 9be8d3f..c420ff5 100644
--- a/sysdeps/unix/sysv/linux/getpriority.c
+++ b/sysdeps/unix/sysv/linux/getpriority.c
@@ -1,5 +1,5 @@
/* getpriority for Linux.
- Copyright (C) 1996, 1998 Free Software Foundation, Inc.
+ Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public License as
@@ -22,7 +22,7 @@
#include <sysdep.h>
#include <sys/syscall.h>
-extern int __syscall_getpriority (int, int);
+extern int __syscall_getpriority (int, id_t);
/* The return value of __syscall_getpriority is biased by this value
to avoid returning negative values. */
@@ -34,7 +34,7 @@ extern int __syscall_getpriority (int, int);
priority. Priorities range from PRIO_MIN to PRIO_MAX. */
int
-getpriority (enum __priority_which which, int who)
+getpriority (enum __priority_which which, id_t who)
{
int res;
diff --git a/sysdeps/unix/sysv/linux/internal_statvfs.c b/sysdeps/unix/sysv/linux/internal_statvfs.c
index 2ea380d..a6aec7d 100644
--- a/sysdeps/unix/sysv/linux/internal_statvfs.c
+++ b/sysdeps/unix/sysv/linux/internal_statvfs.c
@@ -28,7 +28,7 @@
buf->f_ffree = fsbuf.f_ffree;
buf->f_fsid = fsbuf.f_fsid;
buf->f_namemax = fsbuf.f_namelen;
- memset (buf->f_spare, '\0', 6 * sizeof (int));
+ memset (buf->__f_spare, '\0', 6 * sizeof (int));
/* What remains to do is to fill the fields f_favail and f_flag. */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/shm.h b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
index e43de59f..6dc6011 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/shm.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/shm.h
@@ -20,7 +20,7 @@
# error "Never include <bits/shm.h> directly; use <sys/shm.h> instead."
#endif
-#include <sys/types.h>
+#include <bits/types.h>
#include <bits/wordsize.h>
/* Permission flag for shmget. */
@@ -37,6 +37,9 @@
#define SHM_UNLOCK 12 /* unlock segment (root only) */
+/* Type to count number of attaches. */
+typedef unsigned long int shmatt_t;
+
/* Data structure describing a set of semaphores. */
struct shmid_ds
{
@@ -54,9 +57,9 @@ struct shmid_ds
#endif
__time_t shm_ctime; /* time of last change by shmctl() */
size_t shm_segsz; /* size of segment in bytes */
- pid_t shm_cpid; /* pid of creator */
- pid_t shm_lpid; /* pid of last shmop */
- unsigned long int shm_nattch; /* number of current attaches */
+ __pid_t shm_cpid; /* pid of creator */
+ __pid_t shm_lpid; /* pid of last shmop */
+ shmatt_t shm_nattch; /* number of current attaches */
unsigned long int __unused1;
unsigned long int __unused2;
};
diff --git a/sysdeps/unix/sysv/linux/statvfs64.c b/sysdeps/unix/sysv/linux/statvfs64.c
index d88bd59..9417b23 100644
--- a/sysdeps/unix/sysv/linux/statvfs64.c
+++ b/sysdeps/unix/sysv/linux/statvfs64.c
@@ -1,5 +1,5 @@
/* Return information about the filesystem on which FILE resides.
- Copyright (C) 1998 Free Software Foundation, Inc.
+ Copyright (C) 1998, 2000 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
@@ -42,7 +42,7 @@ statvfs64 (const char *file, struct statvfs64 *buf)
buf->f_fsid = buf32.f_fsid;
buf->f_flag = buf32.f_flag;
buf->f_namemax = buf32.f_namemax;
- memcpy (buf->f_spare, buf32.f_spare, sizeof (buf32.f_spare));
+ memcpy (buf->__f_spare, buf32.__f_spare, sizeof (buf32.__f_spare));
return 0;
}