From 219aa9e9f9677e2f50095433ca233abdef23a6b0 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 18 Aug 1999 07:53:35 +0000 Subject: Update. 1999-08-18 Ulrich Drepper * Rules: When generating stdio_lim.h also rewrite IOV_MAX definition. * stdio-common/stdio_lim.h.in: Add IOV_MAX template. * include/bits/xopen_lim.h: Don't define IOV_MAX here, get it from stdio_lim.h. Define LONG_BIT and WORD_BIT. * include/features.h: Define __USE_XOPEN2K if _XOPEN_SOURCE == 600. * libio/stdio.h: Don't declare cuserid and getopt for X/Open issue 6. * misc/search.h: Don't define NULL. * posix/sys/types.h: Define blksize_t if it hasn't happened. Only define key_t and blkcnt_t if it hasn't happened before. Define blksize_t if not happened before. * io/sys/stat.h: Don't define pid_t. Define blkcnt_t and blksize_t. * sysdeps/generic/bits/types.h: Define __blksize_t. * sysdeps/unix/sysv/linux/alpha/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/types.h: Likewise. * sysdeps/unix/sysv/linux/sparc/bits/types.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/types.h: Likewise. * sysdeps/mach/hurd/bits/stat.h (struct stat): Use __blksize_t for st_blksize member. (struct stat64): Likewise. * sysdeps/unix/bsd/bits/stat.h: Likewise. * sysdeps/unix/bsd/osf/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/bits/stat.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/i386/bist/stat.h: Likewise. * sysdeps/unix/sysv/sysv4/solaris2/bits/stat.h: Likewise. * stdlib/getsubopt.c: Correct type of second argument. * stdlib/stdlib.h: Likewise. * stdlib/monetary.h: Don't include sys/types.h. Define only size_t and ssize_t. * sysdeps/generic/putenv.c: Correct type of parameter. * stdlib/stdlib.h: Likewise. * sysdeps/generic/msgsnd.c: Correct type of second parameter. * sysdeps/unix/sysv/linux/msgsnd.c: Likewise. * sysvips/sys/msg.h: Likewise. * sysdeps/generic/semop.c: Correct type of third parameter. * sysdeps/unix/sysv/linux/semop.c: Likewise. * sysvipc/sys/sem.h: Likewise. Don't include sys/types.h, define size_t. * sysdeps/generic/shmget.c: Correct type of second parameter. * sysdeps/unix/sysv/linux/shmget.c: Likewise. * sysvips/sys/shm.h: Likewise. Don't include unistd.h and sys/types.h. Declare __getpagesize here. * sysdeps/generic/bits/ipc.h: Include bits/types.h instead of sys/types.h. * sysdeps/gnu/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/alpha/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/mips/bits/ipc.h: Likewise. * sysdeps/unix/sysv/linux/powerpc/bits/ipc.h: Likewise. * sysvipc/sys/ipc.h: Define uid_t, gid_t, mode_t, and key_t if not already done. * sysdeps/unix/bsd/usleep.c: Correct type of parameter. * debug/versions: Export __cyg_profile_func_enter and __cyg_profile_func_exit. * math/bits/mathcalls.h: Pretty print. --- sysvipc/sys/ipc.h | 26 +++++++++++++++++++++++--- sysvipc/sys/msg.h | 4 ++-- sysvipc/sys/sem.h | 7 ++++--- sysvipc/sys/shm.h | 10 ++++++---- 4 files changed, 35 insertions(+), 12 deletions(-) (limited to 'sysvipc/sys') diff --git a/sysvipc/sys/ipc.h b/sysvipc/sys/ipc.h index f1ba7ff188..0ec6ed16e0 100644 --- a/sysvipc/sys/ipc.h +++ b/sysvipc/sys/ipc.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1999 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 @@ -21,11 +21,31 @@ #include +#if !defined __USE_SVID && !defined __USE_XOPEN && __GNUC__ >= 2 +# warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE" +#endif + /* Get system dependent definition of `struct ipc_perm' and more. */ #include -#if !defined __USE_SVID && !defined __USE_XOPEN && __GNUC__ >= 2 -# warning "Files using this header must be compiled with _SVID_SOURCE or _XOPEN_SOURCE" +#ifndef __uid_t_defined +typedef __uid_t uid_t; +# define __uid_t_defined +#endif + +#ifndef __gid_t_defined +typedef __gid_t gid_t; +# define __gid_t_defined +#endif + +#ifndef __mode_t_defined +typedef __mode_t mode_t; +# define __mode_t_defined +#endif + +#ifndef __key_t_defined +typedef __key_t key_t; +# define __key_t_defined #endif __BEGIN_DECLS diff --git a/sysvipc/sys/msg.h b/sysvipc/sys/msg.h index 56938bf613..5f8f761cca 100644 --- a/sysvipc/sys/msg.h +++ b/sysvipc/sys/msg.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1999 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 @@ -52,7 +52,7 @@ extern int msgrcv __P ((int __msqid, void *__msgp, size_t __msgsz, long int __msgtyp, int __msgflg)); /* Send message to message queue. */ -extern int msgsnd __P ((int __msqid, void *__msgp, size_t __msgsz, +extern int msgsnd __P ((int __msqid, __const void *__msgp, size_t __msgsz, int __msgflg)); __END_DECLS diff --git a/sysvipc/sys/sem.h b/sysvipc/sys/sem.h index 6ae76e2347..b44194520e 100644 --- a/sysvipc/sys/sem.h +++ b/sysvipc/sys/sem.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 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 @@ -21,7 +21,8 @@ #include -#include +#define __need_size_t +#include /* Get common definition of System V style IPC. */ #include @@ -51,7 +52,7 @@ extern int semget __P ((key_t __key, int __nsems, int __semflg)); /* Operate on semaphore. */ extern int semop __P ((int __semid, struct sembuf *__sops, - unsigned int __nsops)); + size_t __nsops)); __END_DECLS diff --git a/sysvipc/sys/shm.h b/sysvipc/sys/shm.h index 47e0f496a2..6dce0a8155 100644 --- a/sysvipc/sys/shm.h +++ b/sysvipc/sys/shm.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 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 @@ -21,8 +21,8 @@ #include -#include /* for `getpagesize' declaration */ -#include +#define __need_size_t +#include /* Get common definition of System V style IPC. */ #include @@ -33,6 +33,8 @@ /* Segment low boundary address multiple. */ #define SHMLBA (__getpagesize ()) +extern int __getpagesize __P ((void)); + /* The following System V style IPC functions implement a shared memory facility. The definition is found in XPG4.2. */ @@ -43,7 +45,7 @@ __BEGIN_DECLS extern int shmctl __P ((int __shmid, int __cmd, struct shmid_ds *__buf)); /* Get shared memory segment. */ -extern int shmget __P ((key_t __key, int __size, int __shmflg)); +extern int shmget __P ((key_t __key, size_t __size, int __shmflg)); /* Attach shared memory segment. */ extern void *shmat __P ((int __shmid, __const void *__shmaddr, int __shmflg)); -- cgit 1.4.1