diff options
Diffstat (limited to 'sysdeps')
24 files changed, 92 insertions, 66 deletions
diff --git a/sysdeps/generic/bits/libc-lock.h b/sysdeps/generic/bits/libc-lock.h index 84f9cd4653..4613310d39 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 8c97999626..e230f81061 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 ce9eb59f0d..e92303bfd4 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 4df883b59e..8710a9eb87 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 997bea82a6..04158c6b76 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 438673bf17..4d293398f5 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 3d113a74f6..096254d446 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 c7070595b8..81116f4dca 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 49cc38ec91..99e9fdbe2e 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 ece9b50967..48a15d9ab0 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 3da7f32385..d9951e55ac 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 aec7d5d2af..6f24e99080 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 2ef10b77eb..dfb236dee6 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 290573a65c..5203b42ac9 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 5d6313ae1c..8e2c8ec943 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 683a9b6726..acd479de57 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 ca397e810f..8e4b8ac9e8 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 fc63806848..c000e8a85a 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 5cb5462950..9d17063761 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 8ede56eec3..bc2165e3ee 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 9be8d3f70b..c420ff5ccf 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 2ea380d5cd..a6aec7d0f4 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 e43de59fe1..6dc6011da4 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 d88bd5945b..9417b23247 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; } |