aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-02-05 23:30:38 +0000
committerUlrich Drepper <drepper@redhat.com>2003-02-05 23:30:38 +0000
commit5cd09cd6482726257275ce45e39c5dd7dcbe9251 (patch)
treeb15b315544dbf3884ed08e1f0cacc787a3185ca4
parente0f86659bebf16c150e1c4cfe385c643c424e322 (diff)
downloadglibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.tar
glibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.tar.gz
glibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.tar.bz2
glibc-5cd09cd6482726257275ce45e39c5dd7dcbe9251.zip
Update.
* sysdeps/unix/sysv/linux/posix_fadvise.c: New file. * sysdeps/unix/sysv/linux/syscalls.list: Add posix_fadvise64 syscall. * sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
-rw-r--r--ChangeLog8
-rw-r--r--nptl/Banner2
-rw-r--r--nptl/atomic.h2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/posix_fadvise.c36
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list1
-rw-r--r--sysdeps/unix/sysv/linux/syscalls.list1
10 files changed, 52 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 98b79e6bc8..9dc7b172cc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2003-02-05 Ulrich Drepper <drepper@redhat.com>
+ * sysdeps/unix/sysv/linux/posix_fadvise.c: New file.
+ * sysdeps/unix/sysv/linux/syscalls.list: Add posix_fadvise64 syscall.
+ * sysdeps/unix/sysv/linux/alpha/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/ia64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list: Likewise.
+ * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Likewise.
+
* libio/putwc_u.c: Use _IO_putwc_unlocked, not _IO_putc_unlocked.
Patch by Moritz Schulte <moritz@duesseldorf.ccc.de>.
diff --git a/nptl/Banner b/nptl/Banner
index f87ad4d0fa..4732444761 100644
--- a/nptl/Banner
+++ b/nptl/Banner
@@ -1 +1 @@
-NPTL 0.19 by Ulrich Drepper
+NPTL 0.20 by Ulrich Drepper
diff --git a/nptl/atomic.h b/nptl/atomic.h
index 85a43c01e6..4279235a71 100644
--- a/nptl/atomic.h
+++ b/nptl/atomic.h
@@ -91,7 +91,7 @@
#endif
-#ifdef atomic_add_negative
+#ifndef atomic_add_negative
# define atomic_add_negative(mem, value) \
(atomic_exchange_and_add (mem, value) < 0)
#endif
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 6907ef1d2f..96bc8a5fd3 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -20,6 +20,7 @@ getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
llseek EXTRA lseek C:3 __libc_lseek64 __llseek llseek __lseek64 lseek64
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs __fstatfs64 fstatfs64
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index 7df0265feb..0985cc97a2 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -5,6 +5,7 @@ umount2 - umount 2 __umount2 umount2
# Whee! 64-bit systems naturally implement llseek.
llseek EXTRA lseek C:3 __libc_lseek __lseek lseek __libc_lseek64 __llseek llseek __lseek64 lseek64
lseek llseek -
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
pread - pread C:4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
pwrite - pwrite C:4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs i:ip __fstatfs fstatfs fstatfs64 __fstatfs64
diff --git a/sysdeps/unix/sysv/linux/posix_fadvise.c b/sysdeps/unix/sysv/linux/posix_fadvise.c
new file mode 100644
index 0000000000..fb1e59b2d3
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/posix_fadvise.c
@@ -0,0 +1,36 @@
+/* Copyright (C) 2003 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
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <sysdep.h>
+
+/* Advice the system about the expected behaviour of the application with
+ respect to the file associated with FD. */
+
+int
+posix_fadvise (int fd, __off_t offset, size_t len, int advise)
+{
+#ifdef __NR_fadvise64
+ return INLINE_SYSCALL (fadvise64, 5, fd,
+ __LONG_LONG_PAIR (offset >> 31, offset), len, advise);
+#else
+ __set_errno (ENOSYS);
+ return -1;
+#endif
+}
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list b/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
index 5266c4f59f..9dbe0ed29e 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/syscalls.list
@@ -25,6 +25,7 @@ s_getrlimit getrlimit getrlimit i:ip __syscall_getrlimit
s_lstat64 lxstat64 lstat64 i:sp __syscall_lstat64
s_mmap2 mmap64 mmap2 b:aniiii __syscall_mmap2
s_poll poll poll i:pii __syscall_poll
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
s_ptrace ptrace ptrace i:iipp __syscall_ptrace
s_putpmsg putpmsg putpmsg i:ippii __syscall_putpmsg
s_reboot reboot reboot i:iii __syscall_reboot
diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
index 273ed4fb5d..53284318d4 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/s390/s390-64/syscalls.list
@@ -10,6 +10,7 @@ getpeername - getpeername i:ipp __getpeername getpeername
ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64 __ftruncate64
truncate - truncate 2 truncate truncate64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
setrlimit - setrlimit 2 __setrlimit setrlimit setrlimit64
vfork - vfork 0 __vfork vfork
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index a34e49246e..ac0610feda 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -13,6 +13,7 @@ truncate - truncate 2 truncate truncate64
mmap - mmap 6 __mmap mmap __mmap64 mmap64
readahead - readahead 3 __readahead readahead
sendfile - sendfile i:iipi sendfile sendfile64
+posix_fadvise64 - fadvise64 4 posix_fadvise64 posix_fadvise
# Override select.S in parent directory:
select - select C:5 __select select
diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list
index 15c6b880fe..e629a6ca1d 100644
--- a/sysdeps/unix/sysv/linux/syscalls.list
+++ b/sysdeps/unix/sysv/linux/syscalls.list
@@ -43,6 +43,7 @@ pause - pause Ci: __libc_pause pause
personality init-first personality i:i __personality personality
pipe - pipe i:f __pipe pipe
pivot_root EXTRA pivot_root i:ss pivot_root
+posix_fadvise64 - fadvise64 i:iiiii posix_advise64
prctl EXTRA prctl i:iiiii __prctl prctl
putpmsg - putpmsg i:ippii putpmsg
query_module EXTRA query_module i:sipip query_module