about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-11-10 19:36:06 +0000
committerUlrich Drepper <drepper@redhat.com>2007-11-10 19:36:06 +0000
commit7f745396c470216fb36d1d9867fb51318abc951d (patch)
tree2583cb46bf2658266ba1db669bc8169adc01c3f2 /sysdeps/unix
parentcbed6a607d6b42b0cb264d2bee1bd784c8504d60 (diff)
downloadglibc-7f745396c470216fb36d1d9867fb51318abc951d.tar.gz
glibc-7f745396c470216fb36d1d9867fb51318abc951d.tar.xz
glibc-7f745396c470216fb36d1d9867fb51318abc951d.zip
* sysdeps/unix/sysv/linux/open64.c: Move __open64_2 implementation to..
	* sysdeps/unix/sysv/linux/open64_2.c: ...here.  New file.
	* sysdeps/unix/sysv/linux/Makefile [subdir=io] (sysdep_routines): Add
	open64_2.
	* sysdeps/unix/sysv/linux/ia64/syscalls.list: Add open and creat
	entries.
	* sysdeps/unix/sysv/linux/x86_64/syscalls.list: Likewise.
	* sysdeps/wordsize-64/alphasort.c: New file.
	* sysdeps/wordsize-64/alphasort64.c: New file.
	* sysdeps/wordsize-64/fseeko.c: New file.
	* sysdeps/wordsize-64/fseeko64.c: New file.
	* sysdeps/wordsize-64/ftello.c: New file.
	* sysdeps/wordsize-64/ftello64.c: New file.
	* sysdeps/wordsize-64/ftw.c: New file.
	* sysdeps/wordsize-64/ftw64.c: New file.
	* sysdeps/wordsize-64/iofgetpos.c: New file.
	* sysdeps/wordsize-64/iofgetpos64.c: New file.
	* sysdeps/wordsize-64/iofopen.c: New file.
	* sysdeps/wordsize-64/iofopen64.c: New file.
	* sysdeps/wordsize-64/iofsetpos.c: New file.
	* sysdeps/wordsize-64/iofsetpos64.c: New file.
	* sysdeps/wordsize-64/lockf.c: New file.
	* sysdeps/wordsize-64/lockf64.c: New file.
	* sysdeps/wordsize-64/mkostemp.c: New file.
	* sysdeps/wordsize-64/mkostemp64.c: New file.
	* sysdeps/wordsize-64/mkstemp.c: New file.
	* sysdeps/wordsize-64/mkstemp64.c: New file.
	* sysdeps/wordsize-64/scandir.c: New file.
	* sysdeps/wordsize-64/scandir64.c: New file.
	* sysdeps/wordsize-64/tmpfile.c: New file.
	* sysdeps/wordsize-64/tmpfile64.c: New file.
	* sysdeps/wordsize-64/versionsort.c: New file.
	* sysdeps/wordsize-64/versionsort64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_read.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_write.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/creat64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/open64.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/openat.c: New file.
	* sysdeps/unix/sysv/linux/wordsize-64/openat64.c: New file.

	* crypt/sha256-crypt.c: Fix a comment.
	* crypt/sha512-crypt.c: Likewise.
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/Makefile2
-rw-r--r--sysdeps/unix/sysv/linux/ia64/syscalls.list3
-rw-r--r--sysdeps/unix/sysv/linux/open64.c23
-rw-r--r--sysdeps/unix/sysv/linux/open64_2.c32
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/aio_read.c7
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c1
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/aio_write.c7
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c1
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/creat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c3
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c1
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c13
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c1
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/open64.c1
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/openat.c16
-rw-r--r--sysdeps/unix/sysv/linux/wordsize-64/openat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/syscalls.list4
17 files changed, 91 insertions, 26 deletions
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index 6ba3a25c84..a3c6228812 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -138,7 +138,7 @@ endif
 
 ifeq ($(subdir),io)
 sysdep_routines += xstatconv internal_statvfs internal_statvfs64 \
-		   sync_file_range open_2
+		   sync_file_range open_2 open64_2
 endif
 
 ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/ia64/syscalls.list b/sysdeps/unix/sysv/linux/ia64/syscalls.list
index c55c70ef54..582492706e 100644
--- a/sysdeps/unix/sysv/linux/ia64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/ia64/syscalls.list
@@ -4,6 +4,9 @@ umount2		-	umount		2	__umount2	umount2
 
 getpriority	-	getpriority	i:ii	__getpriority	getpriority
 
+creat		-	creat		Ci:si	__libc_creat	creat creat64
+open		-	open		Ci:siv	__libc_open	__open open __open64 open64
+
 # semaphore and shm system calls
 msgctl		-	msgctl		i:iip	__msgctl	msgctl
 msgget		-	msgget		i:ii	__msgget	msgget
diff --git a/sysdeps/unix/sysv/linux/open64.c b/sysdeps/unix/sysv/linux/open64.c
index c52ce39db1..21b3d0b010 100644
--- a/sysdeps/unix/sysv/linux/open64.c
+++ b/sysdeps/unix/sysv/linux/open64.c
@@ -52,26 +52,3 @@ __libc_open64 (const char *file, int oflag, ...)
 weak_alias (__libc_open64, __open64)
 libc_hidden_weak (__open64)
 weak_alias (__libc_open64, open64)
-
-
-#ifndef PTW
-int
-__open64_2 (file, oflag)
-     const char *file;
-     int oflag;
-{
-  if (oflag & O_CREAT)
-    __fortify_fail ("invalid open64 call: O_CREAT without mode");
-
-  if (SINGLE_THREAD_P)
-    return INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
-
-  int oldtype = LIBC_CANCEL_ASYNC ();
-
-  int result = INLINE_SYSCALL (open, 2, file, oflag | O_LARGEFILE);
-
-  LIBC_CANCEL_RESET (oldtype);
-
-  return result;
-}
-#endif
diff --git a/sysdeps/unix/sysv/linux/open64_2.c b/sysdeps/unix/sysv/linux/open64_2.c
new file mode 100644
index 0000000000..76b65e5217
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/open64_2.c
@@ -0,0 +1,32 @@
+/* Copyright (C) 2007 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 <fcntl.h>
+#include <stdio.h>
+
+
+int
+__open64_2 (file, oflag)
+     const char *file;
+     int oflag;
+{
+  if (oflag & O_CREAT)
+    __fortify_fail ("invalid open64 call: O_CREAT without mode");
+
+  return __open64 (file, oflag);
+}
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/aio_read.c b/sysdeps/unix/sysv/linux/wordsize-64/aio_read.c
new file mode 100644
index 0000000000..d10fc4320b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/aio_read.c
@@ -0,0 +1,7 @@
+#define aio_read64 __renamed_aio_read64
+
+#include "../../../../pthread/aio_read.c"
+
+#undef aio_read64
+
+weak_alias (aio_read, aio_read64)
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c b/sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c
new file mode 100644
index 0000000000..6a6a102c8d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/aio_read64.c
@@ -0,0 +1 @@
+/* Defined in aio_read.c.  */
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/aio_write.c b/sysdeps/unix/sysv/linux/wordsize-64/aio_write.c
new file mode 100644
index 0000000000..b0fb469cb2
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/aio_write.c
@@ -0,0 +1,7 @@
+#define aio_write64 __renamed_aio_write64
+
+#include "../../../../pthread/aio_write.c"
+
+#undef aio_write64
+
+weak_alias (aio_write, aio_write64)
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c b/sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c
new file mode 100644
index 0000000000..ced07fa273
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/aio_write64.c
@@ -0,0 +1 @@
+/* Defined in aio_write.c.  */
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/creat64.c b/sysdeps/unix/sysv/linux/wordsize-64/creat64.c
new file mode 100644
index 0000000000..c106e2b362
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/creat64.c
@@ -0,0 +1 @@
+/* Defined as alias for the syscall.  */
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c b/sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c
new file mode 100644
index 0000000000..298d1e9e91
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/getdirentries.c
@@ -0,0 +1,3 @@
+#include "../getdirentries.c"
+
+weak_alias (getdirentries, getdirentries64)
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c b/sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c
new file mode 100644
index 0000000000..622baf0c87
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/getdirentries64.c
@@ -0,0 +1 @@
+/* Defined in getdirentries.c.  */
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c b/sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c
new file mode 100644
index 0000000000..25ee5a3507
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/lio_listio.c
@@ -0,0 +1,13 @@
+#define lio_listio64 __renamed_lio_listio64
+
+#include "../../../../pthread/lio_listio.c"
+
+#undef lio_listio64
+
+#if SHLIB_COMPAT (librt, GLIBC_2_1, GLIBC_2_4)
+strong_alias (__lio_listio_21, __lio_listio64_21)
+compat_symbol (librt, __lio_listio64_21, lio_listio64, GLIBC_2_1);
+#endif
+
+strong_alias (__lio_listio_item_notify, __lio_listio64_item_notify)
+versioned_symbol (librt, __lio_listio64_item_notify, lio_listio64, GLIBC_2_4);
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c b/sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c
new file mode 100644
index 0000000000..1dabae3692
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/lio_listio64.c
@@ -0,0 +1 @@
+/* Defined in lio_listio.c.  */
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/open64.c b/sysdeps/unix/sysv/linux/wordsize-64/open64.c
new file mode 100644
index 0000000000..0abe30ef62
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/open64.c
@@ -0,0 +1 @@
+/* Defined in open syscall.  */
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/openat.c b/sysdeps/unix/sysv/linux/wordsize-64/openat.c
new file mode 100644
index 0000000000..4921fca335
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/openat.c
@@ -0,0 +1,16 @@
+#define __openat64 __rename___openat64
+#define __openat64_2 __rename___openat64_2
+#define __openat64_nocancel __rename___openat64_nocancel
+#define openat64 __rename_openat64
+
+#include "../openat.c"
+
+#undef __openat64
+#undef __openat64_2
+#undef __openat64_nocancel
+#undef openat64
+
+weak_alias (__openat, __openat64)
+weak_alias (__openat_2, __openat64_2)
+weak_alias (__openat_nocancel, __openat64_nocancel)
+weak_alias (openat, openat64)
diff --git a/sysdeps/unix/sysv/linux/wordsize-64/openat64.c b/sysdeps/unix/sysv/linux/wordsize-64/openat64.c
new file mode 100644
index 0000000000..b4a864b040
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/wordsize-64/openat64.c
@@ -0,0 +1 @@
+/* Defined in openat.c.  */
diff --git a/sysdeps/unix/sysv/linux/x86_64/syscalls.list b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
index a9d40446db..a3d3d6cf92 100644
--- a/sysdeps/unix/sysv/linux/x86_64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/x86_64/syscalls.list
@@ -1,13 +1,13 @@
 # File name	Caller	Syscall name	# args	Strong name	Weak names
 
 arch_prctl	EXTRA	arch_prctl	i:ii	__arch_prctl	arch_prctl
+creat		-	creat		Ci:si	__libc_creat	creat creat64
 modify_ldt	EXTRA	modify_ldt	i:ipi	__modify_ldt	modify_ldt
-
-# semaphore and shm system calls
 msgctl		-	msgctl		i:iip	__msgctl	msgctl
 msgget		-	msgget		i:ii	__msgget	msgget
 msgrcv		-	msgrcv		Ci:ibnii __msgrcv	msgrcv
 msgsnd		-	msgsnd		Ci:ibni	__msgsnd	msgsnd
+open		-	open		Ci:siv	__libc_open	__open open __open64 open64
 shmat		-	shmat		i:ipi	__shmat		shmat
 shmctl		-	shmctl		i:iip	__shmctl	shmctl
 shmdt		-	shmdt		i:s	__shmdt		shmdt