aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv/linux/sparc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-12-24 05:55:50 +0000
committerUlrich Drepper <drepper@redhat.com>1999-12-24 05:55:50 +0000
commit293321753c08b5db20b866f2ae2dbd716f717434 (patch)
treecd28dda5c83949cd59aa119439dfa7b4a0bd27e0 /sysdeps/unix/sysv/linux/sparc
parent575b273bdc8b2fe0be70396486e9fbc400b2e641 (diff)
downloadglibc-293321753c08b5db20b866f2ae2dbd716f717434.tar
glibc-293321753c08b5db20b866f2ae2dbd716f717434.tar.gz
glibc-293321753c08b5db20b866f2ae2dbd716f717434.tar.bz2
glibc-293321753c08b5db20b866f2ae2dbd716f717434.zip
Update.
1999-12-23 Ulrich Drepper <drepper@cygnus.com> * locale/programs/ld-monetary.c (monetary_finish): Add cast to prevent warning. * locale/programs/ld-collate.c: Implement writing out multibyte collation data. * locale/setlocale.c (setlocale): Allow setting LC_COLLATE again. * locale/localeinfo.h: Declare variables only for currently implemented collate functionality. Remove FORWARD_CHAR and ELLIPSIS_CHAR. * locale/lc-collate.c: Define variables only for currently implemented functionality. * locale/langinfo.h: Define symbols only for currently implemented functionality. * locale/categories.def: Define elements for currently implemented functionality. * locale/C-collate.c: Comment out definitions of arrays with symbol name definitions etc. (_nl_C_LC_COLLATE): Update for currently defined information. * intl/libintl.h: Remove dcgettext macro definition. * intl/gettextP.h: Declare _nl_msg_cat_cntr. * locale/iso-4217.def: Add NAD. Remove a few obsolete entries. * sysdeps/generic/glob.c (glob): Pass alternate file access functions also in recursive call. Patch by Joe Orton <joe@orton.demon.co.uk>. 1999-12-22 Jakub Jelinek <jakub@redhat.com> * sysdeps/sparc/fpu/ftestexcept.c (fetestexcept): Use proper type for __fenv_stfsr argument. * sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list: Add truncate64, ftruncate64, fstat64, lstat64, stat64 and mmap2. Remove ugetrlimit. * sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h (XSTAT_IS_XSTAT64): Define. * sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list: Add __libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64. Remove oldgetrlimit and oldsetrlimit. * sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c: New file. * sysdeps/unix/sysv/linux/fxstat64.c (__fxstat64): Pass the buf pointer to the syscall, not address of that pointer. * sysdeps/unix/sysv/linux/lxstat64.c (__lxstat64): Likewise. * sysdeps/unix/sysv/linux/xstat64.c (__xstat64): Likewise. (__syscall_stat64): Provide proper prototype. * sysdeps/unix/sysv/linux/ftruncate64.c (ftruncate64): Share has_no_truncate64 between truncate64 and ftruncate64. * sysdeps/unix/sysv/linux/truncate64.c (truncate64): Likewise. * sysdeps/unix/sysv/linux/kernel-features.h (__ASSUME_TRUNCATE64_SYSCALL, __ASSUME_MMAP2_SYSCALL, __ASSUME_STAT64_SYSCALL): Define on Sparc for kernels >= 2.3.35. 1999-12-22 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/alpha/syscalls.list: Add __libc_lseek64, __libc_pread, __libc_pread64, __libc_pwrite and __libc_pwrite64.
Diffstat (limited to 'sysdeps/unix/sysv/linux/sparc')
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c74
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list7
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c1
7 files changed, 88 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c b/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c
new file mode 100644
index 0000000000..a51c1e0098
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/mmap64.c
@@ -0,0 +1,74 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 1999.
+
+ 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
+ published by the Free Software Foundation; either version 2 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include <sysdep.h>
+#include <sys/syscall.h>
+
+#include <sys/mman.h>
+
+#include "kernel-features.h"
+
+#ifdef __NR_mmap2
+extern int __syscall_mmap2(__ptr_t, size_t, int, int, int, off_t);
+#ifndef __ASSUME_MMAP2_SYSCALL
+static int have_no_mmap2;
+#endif
+#endif
+
+__ptr_t
+__mmap64 (__ptr_t addr, size_t len, int prot, int flags, int fd, off64_t offset)
+{
+#ifdef __NR_mmap2
+ if (
+#ifndef __ASSUME_MMAP2_SYSCALL
+ ! have_no_mmap2 &&
+#endif
+ ! (offset & 4095))
+ {
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ int saved_errno = errno;
+#endif
+ /* This will be always 12, no matter what page size is. */
+ int result = INLINE_SYSCALL (mmap2, 6, addr, len, prot, flags,
+ fd, (off_t) (offset >> 12));
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ if (result != -1 || errno != ENOSYS)
+#endif
+ return result;
+
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+ __set_errno (saved_errno);
+ have_no_mmap2 = 1;
+#endif
+ }
+#endif
+ if (offset != (off_t) offset || (offset + len) != (off_t) (offset + len))
+ {
+ __set_errno (EINVAL);
+ return MAP_FAILED;
+ }
+
+ return __mmap (addr, len, prot, flags, fd, (off_t) offset);
+}
+
+weak_alias (__mmap64, mmap64)
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
index c80056f003..07333a72b6 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/syscalls.list
@@ -23,12 +23,16 @@ rt_sigqueueinfo - rt_sigqueueinfo 3 __syscall_rt_sigqueueinfo
rt_sigsuspend - rt_sigsuspend 2 __syscall_rt_sigsuspend
rt_sigtimedwait - rt_sigtimedwait 4 __syscall_rt_sigtimedwait
s_execve execve execve 3 __syscall_execve
+s_fstat64 fxstat64 fstat64 2 __syscall_fstat64
+s_ftruncate64 ftruncate64 ftruncate64 3 __syscall_ftruncate64
s_getcwd getcwd getcwd 2 __syscall_getcwd
s_getdents getdents getdents 3 __syscall_getdents
s_getpriority getpriority getpriority 2 __syscall_getpriority
s_getresgid getresgid getresgid 3 __syscall_getresgid
s_getresuid getresuid getresuid 3 __syscall_getresuid
s_getrlimit getrlimit getrlimit 2 __syscall_getrlimit
+s_lstat64 lxstat64 lstat64 2 __syscall_lstat64
+s_mmap2 mmap64 mmap2 6 __syscall_mmap2
s_poll poll poll 3 __syscall_poll
s_pread64 pread64 pread 5 __syscall_pread
s_ptrace ptrace ptrace 4 __syscall_ptrace
@@ -38,8 +42,9 @@ s_sigaction sigaction sigaction 3 __syscall_sigaction
s_sigpending sigpending sigpending 1 __syscall_sigpending
s_sigprocmask sigprocmask sigprocmask 3 __syscall_sigprocmask
s_sigsuspend sigsuspend sigsuspend 3 __syscall_sigsuspend
+s_stat64 xstat64 stat64 2 __syscall_stat64
s_sysctl sysctl _sysctl 1 __syscall__sysctl
-s_ugetrlimit getrlimit ugetrlimit 2 __syscall_ugetrlimit
+s_truncate64 truncate64 truncate64 3 __syscall_truncate64
s_ustat ustat ustat 2 __syscall_ustat
sys_fstat fxstat fstat 2 __syscall_fstat
sys_lstat lxstat lstat 2 __syscall_lstat
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c b/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c
new file mode 100644
index 0000000000..9eff9ebeb7
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/fxstat64.c
@@ -0,0 +1 @@
+/* fxstat64 is in fxstat.c */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
index dd509a7e8a..05457fc78e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/kernel_stat.h
@@ -20,3 +20,5 @@ struct kernel_stat
#define _HAVE___UNUSED1
#define _HAVE___UNUSED2
+
+#define XSTAT_IS_XSTAT64 1
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c b/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c
new file mode 100644
index 0000000000..bb5dbd0fff
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/lxstat64.c
@@ -0,0 +1 @@
+/* lxstat64 is in lxstat.c */
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
index c857cf880f..8fc6c933f4 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/syscalls.list
@@ -1,15 +1,13 @@
# File name Caller Syscall name # args Strong name Weak names
# Whee! 64-bit systems naturally implement llseek.
-llseek EXTRA lseek 3 __llseek llseek __lseek64 lseek64
-pread - pread 4 __pread pread __pread64 pread64
-pwrite - pwrite 4 __pwrite pwrite __pwrite64 pwrite64
+llseek EXTRA lseek 3 __llseek llseek __libc_lseek64 __lseek64 lseek64
+pread - pread 4 __libc_pread __libc_pread64 __pread pread __pread64 pread64
+pwrite - pwrite 4 __libc_pwrite __libc_pwrite64 __pwrite pwrite __pwrite64 pwrite64
fstatfs - fstatfs 2 __fstatfs fstatfs fstatfs64
statfs - statfs 2 __statfs statfs statfs64
getrlimit - getrlimit 2 __getrlimit getrlimit getrlimit64
setrlimit - setrlimit 2 setrlimit setrlimit64
-oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0 getrlimit64@GLIBC_2.1
-oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0 setrlimit64@GLIBC_2.1
ftruncate - ftruncate 2 __ftruncate ftruncate ftruncate64
truncate - truncate 2 truncate truncate64
mmap - mmap 6 __mmap mmap __mmap64 mmap64
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c b/sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c
new file mode 100644
index 0000000000..e7acd3b45e
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/sparc/sparc64/xstat64.c
@@ -0,0 +1 @@
+/* xstat64 is in xstat.c */