diff options
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/generic/bits/mman.h | 16 | ||||
-rw-r--r-- | sysdeps/generic/madvise.c | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/mman.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/bits/mman.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/i386/bits/mman.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/mman.h | 9 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/mman.h | 11 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/syscalls.list | 2 |
8 files changed, 66 insertions, 12 deletions
diff --git a/sysdeps/generic/bits/mman.h b/sysdeps/generic/bits/mman.h index 99e3bcd..57d4254 100644 --- a/sysdeps/generic/bits/mman.h +++ b/sysdeps/generic/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for BSD-style memory management. - Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. + Copyright (C) 1994-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 @@ -21,8 +21,9 @@ (such as GNU) where these facilities are not system services but can be emulated in the C library, these are the definitions we emulate. */ -#ifndef _BITS_MMAN_H -#define _BITS_MMAN_H 1 +#ifndef _SYS_MMAN_H +# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead." +#endif /* Protections are chosen from these bits, OR'd together. The implementation does not necessarily support PROT_EXEC or PROT_WRITE @@ -70,4 +71,11 @@ # define MADV_DONTNEED 4 /* Don't need these pages. */ #endif -#endif /* bits/mman.h */ +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/generic/madvise.c b/sysdeps/generic/madvise.c index 5431bda..d6c2322 100644 --- a/sysdeps/generic/madvise.c +++ b/sysdeps/generic/madvise.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 @@ -24,11 +24,12 @@ for the region starting at ADDR and extending LEN bytes. */ int -madvise (__ptr_t addr, size_t len, int advice) +__madvise (__ptr_t addr, size_t len, int advice) { __set_errno (ENOSYS); return -1; } - +weak_alias (__madvice, madvice) +weak_alias (__madvice, posix_madvise) stub_warning (madvise) #include <stub-tag.h> diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index a7ada10..31e39a8 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/Alpha version. - 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 @@ -91,6 +91,15 @@ # define MADV_DONTNEED 6 /* Don't need these pages. */ #endif +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 6 /* Don't need these pages. */ +#endif + /* Not used by Linux, but here to make sure we don't clash with OSF/1 defines. */ #if 0 && defined(__USE_BSD) diff --git a/sysdeps/unix/sysv/linux/arm/bits/mman.h b/sysdeps/unix/sysv/linux/arm/bits/mman.h index 37a1959..fbb58c8 100644 --- a/sysdeps/unix/sysv/linux/arm/bits/mman.h +++ b/sysdeps/unix/sysv/linux/arm/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/ARM version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 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 @@ -82,3 +82,12 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ #endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h index 7c33f79..b2b80ae 100644 --- a/sysdeps/unix/sysv/linux/i386/bits/mman.h +++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/i386 version. - Copyright (C) 1997 Free Software Foundation, Inc. + Copyright (C) 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 @@ -82,3 +82,12 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ #endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h index 2d04b28..0808b7d 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h @@ -81,3 +81,12 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ #endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h index ffe1e52..03fcb11 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h @@ -1,5 +1,5 @@ /* Definitions for POSIX memory map interface. Linux/SPARC version. - Copyright (C) 1997, 1999 Free Software Foundation, Inc. + Copyright (C) 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 @@ -84,3 +84,12 @@ # define MADV_WILLNEED 3 /* Will need these pages. */ # define MADV_DONTNEED 4 /* Don't need these pages. */ #endif + +/* The POSIX people had to invent similar names for the same things. */ +#ifdef __USE_XOPEN2K +# define POSIX_MADV_NORMAL 0 /* No further special treatment. */ +# define POSIX_MADV_RANDOM 1 /* Expect random page references. */ +# define POSIX_MADV_SEQUENTIAL 2 /* Expect sequential page references. */ +# define POSIX_MADV_WILLNEED 3 /* Will need these pages. */ +# define POSIX_MADV_DONTNEED 4 /* Don't need these pages. */ +#endif diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 4ce48d4..e9430e4 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -24,7 +24,7 @@ ioperm - ioperm 3 ioperm iopl - iopl 1 iopl klogctl EXTRA syslog 3 klogctl lchown - lchown 3 __lchown lchown -madvise - madvise 3 madvise +madvise - madvise 3 __madvise madvise posix_madvise mincore - mincore 3 mincore mlock EXTRA mlock 2 __mlock mlock mlockall EXTRA mlockall 1 __mlockall mlockall |