aboutsummaryrefslogtreecommitdiff
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
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.
-rw-r--r--ChangeLog66
-rw-r--r--localedata/ChangeLog2
-rw-r--r--localedata/SUPPORTED3
-rw-r--r--localedata/locales/en_BW55
-rw-r--r--localedata/locales/en_ZW55
-rw-r--r--sysdeps/generic/glob.c14
-rw-r--r--sysdeps/sparc/fpu/ftestexcept.c2
-rw-r--r--sysdeps/unix/sysv/linux/alpha/syscalls.list6
-rw-r--r--sysdeps/unix/sysv/linux/ftruncate64.c9
-rw-r--r--sysdeps/unix/sysv/linux/fxstat64.c4
-rw-r--r--sysdeps/unix/sysv/linux/kernel-features.h8
-rw-r--r--sysdeps/unix/sysv/linux/lxstat64.c4
-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
-rw-r--r--sysdeps/unix/sysv/linux/truncate64.c5
-rw-r--r--sysdeps/unix/sysv/linux/xstat64.c6
21 files changed, 311 insertions, 22 deletions
diff --git a/ChangeLog b/ChangeLog
index 6ecc3cff0a..3cac10bf26 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,69 @@
+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.
+
1999-12-21 Shinya Hanataka <hanataka@abyss.rim.or.jp>
* locale/lc-time.c: Extend structure era_entry.
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 0a30d2c256..0d3a2a3b37 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,5 +1,7 @@
1999-12-23 Ulrich Drepper <drepper@cygnus.com>
+ * SUPPORTED: Add af_ZA, en_BW, and en_ZW.
+
* locale/en_BW: New file.
* locale/en_ZW: New file.
Contributed by Schalk W. Cronjé <schalkc@ntaba.co.za>.
diff --git a/localedata/SUPPORTED b/localedata/SUPPORTED
index c8f7a6a2f7..103068212d 100644
--- a/localedata/SUPPORTED
+++ b/localedata/SUPPORTED
@@ -1,6 +1,7 @@
# This file names the currently supported and somewhat tested locales.
# If you have any additions please use the glibcbug script to send an
# appropriate message.
+af_ZA ISO-8859-1
ca_ES ISO-8859-1
cs_CZ ISO-8859-2
da_DK ISO-8859-1
@@ -11,11 +12,13 @@ de_DE ISO-8859-1
de_LU ISO-8859-1
el_GR ISO-8859-7
en_AU ISO-8859-1
+en_BW ISO-8859-1
en_CA ISO-8859-1
en_DK ISO-8859-1
en_GB ISO-8859-1
en_IE ISO-8859-1
en_US ISO-8859-1
+en_ZW ISO-8859-1
es_ES ISO-8859-1
et_EE ISO-8859-1
eu_ES ISO-8859-1
diff --git a/localedata/locales/en_BW b/localedata/locales/en_BW
new file mode 100644
index 0000000000..2965b7411e
--- /dev/null
+++ b/localedata/locales/en_BW
@@ -0,0 +1,55 @@
+escape_char /
+comment_char %
+
+% English language locale for Botswana
+% Source: RAP
+% Email: Schalk W. Cronje <schalkc@ntaba.co.za>
+% Tel: +27 83 2797047
+% Fax: +27 838 2797047
+% Language: en
+% Territory: BW
+% Revision: 1.0
+% Date: 1999-12-23
+% Users: general
+% Repertoiremap: mnemonic,ds
+% Charset: ISO-8859-1
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_CTYPE
+copy "en_ZA"
+END LC_CTYPE
+
+LC_COLLATE
+copy "en_ZA"
+END LC_COLLATE
+
+LC_MONETARY
+int_curr_symbol "<B><W><P><SP>"
+currency_symbol "<P><u>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign ""
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sep_by_space 0
+n_cs_precedes 1
+n_sep_by_space 0
+p_sign_posn 1
+n_sign_posn 1
+END LC_MONETARY
+
+LC_NUMERIC
+copy "en_ZA"
+END LC_NUMERIC
+
+LC_TIME
+copy "en_ZA"
+END LC_TIME
+
+LC_MESSAGES
+copy "en_ZA"
+END LC_MESSAGES
diff --git a/localedata/locales/en_ZW b/localedata/locales/en_ZW
new file mode 100644
index 0000000000..aaf6c37c57
--- /dev/null
+++ b/localedata/locales/en_ZW
@@ -0,0 +1,55 @@
+escape_char /
+comment_char %
+
+% English language locale for Zimbabwe
+% Source: RAP
+% Email: Schalk W. Cronje <schalkc@ntaba.co.za>
+% Tel: +27 83 2797047
+% Fax: +27 838 2797047
+% Language: en
+% Territory: ZW
+% Revision: 1.0
+% Date: 1999-12-23
+% Users: general
+% Repertoiremap: mnemonic,ds
+% Charset: ISO-8859-1
+% Distribution and use is free, also
+% for commercial purposes.
+
+LC_CTYPE
+copy "en_ZA"
+END LC_CTYPE
+
+LC_COLLATE
+copy "en_ZA"
+END LC_COLLATE
+
+LC_MONETARY
+int_curr_symbol "<Z><W><D><SP>"
+currency_symbol "<Z><DO>"
+mon_decimal_point "<.>"
+mon_thousands_sep "<,>"
+mon_grouping 3;3
+positive_sign ""
+negative_sign "<->"
+int_frac_digits 2
+frac_digits 2
+p_cs_precedes 1
+p_sep_by_space 0
+n_cs_precedes 1
+n_sep_by_space 0
+p_sign_posn 1
+n_sign_posn 1
+END LC_MONETARY
+
+LC_NUMERIC
+copy "en_ZA"
+END LC_NUMERIC
+
+LC_TIME
+copy "en_ZA"
+END LC_TIME
+
+LC_MESSAGES
+copy "en_ZA"
+END LC_MESSAGES
diff --git a/sysdeps/generic/glob.c b/sysdeps/generic/glob.c
index 65055fb7f8..e52afc8c1b 100644
--- a/sysdeps/generic/glob.c
+++ b/sysdeps/generic/glob.c
@@ -841,8 +841,20 @@ glob (pattern, flags, errfunc, pglob)
glob_t dirs;
register int i;
+ if ((flags & GLOB_ALTDIRFUNC) != 0)
+ {
+ /* Use the alternative access functions also in the recursive
+ call. */
+ dirs.gl_opendir = pglob->gl_opendir;
+ dirs.gl_readdir = pglob->gl_readdir;
+ dirs.gl_closedir = pglob->gl_closedir;
+ dirs.gl_stat = pglob->gl_stat;
+ dirs.gl_lstat = pglob->gl_lstat;
+ }
+
status = glob (dirname,
- ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE))
+ ((flags & (GLOB_ERR | GLOB_NOCHECK | GLOB_NOESCAPE
+ | GLOB_ALTDIRFUNC))
| GLOB_NOSORT | GLOB_ONLYDIR),
errfunc, &dirs);
if (status != 0)
diff --git a/sysdeps/sparc/fpu/ftestexcept.c b/sysdeps/sparc/fpu/ftestexcept.c
index 3efe9e896b..7efd228f8d 100644
--- a/sysdeps/sparc/fpu/ftestexcept.c
+++ b/sysdeps/sparc/fpu/ftestexcept.c
@@ -22,7 +22,7 @@
int
fetestexcept (int excepts)
{
- int tmp;
+ fenv_t tmp;
__fenv_stfsr (tmp);
diff --git a/sysdeps/unix/sysv/linux/alpha/syscalls.list b/sysdeps/unix/sysv/linux/alpha/syscalls.list
index 49f2b11a50..03030b6c45 100644
--- a/sysdeps/unix/sysv/linux/alpha/syscalls.list
+++ b/sysdeps/unix/sysv/linux/alpha/syscalls.list
@@ -22,9 +22,9 @@ vfork - vfork 0 __vfork vfork
getpeername - getpeername 3 __getpeername getpeername
getpriority - getpriority 2 __getpriority getpriority
mmap - mmap 6 __mmap mmap __mmap64 mmap64
-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 __libc_lseek64 __llseek llseek __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
diff --git a/sysdeps/unix/sysv/linux/ftruncate64.c b/sysdeps/unix/sysv/linux/ftruncate64.c
index 47df34ec7e..49133e8dd0 100644
--- a/sysdeps/unix/sysv/linux/ftruncate64.c
+++ b/sysdeps/unix/sysv/linux/ftruncate64.c
@@ -26,7 +26,10 @@
#include "kernel-features.h"
#ifdef __NR_ftruncate64
-static int have_no_ftruncate64;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls. */
+extern int have_no_truncate64;
+#endif
extern int __syscall_ftruncate64 (int fd, int high_length, int low_length);
@@ -38,7 +41,7 @@ ftruncate64 (fd, length)
off64_t length;
{
#ifndef __ASSUME_TRUNCATE64_SYSCALL
- if (! have_no_ftruncate64)
+ if (! have_no_truncate64)
#endif
{
unsigned int low = length & 0xffffffff;
@@ -55,7 +58,7 @@ ftruncate64 (fd, length)
#ifndef __ASSUME_TRUNCATE64_SYSCALL
__set_errno (saved_errno);
- have_no_ftruncate64 = 1;
+ have_no_truncate64 = 1;
#endif
}
diff --git a/sysdeps/unix/sysv/linux/fxstat64.c b/sysdeps/unix/sysv/linux/fxstat64.c
index e2fce6d466..a08f91526c 100644
--- a/sysdeps/unix/sysv/linux/fxstat64.c
+++ b/sysdeps/unix/sysv/linux/fxstat64.c
@@ -45,7 +45,7 @@ int
__fxstat64 (int vers, int fd, struct stat64 *buf)
{
#if __ASSUME_STAT64_SYSCALL > 0
- return INLINE_SYSCALL (fstat64, 2, fd, &buf);
+ return INLINE_SYSCALL (fstat64, 2, fd, buf);
#else
int result;
struct kernel_stat kbuf;
@@ -53,7 +53,7 @@ __fxstat64 (int vers, int fd, struct stat64 *buf)
if (! have_no_stat64)
{
int saved_errno = errno;
- result = INLINE_SYSCALL (fstat64, 2, fd, &buf);
+ result = INLINE_SYSCALL (fstat64, 2, fd, buf);
if (result != -1 || errno != ENOSYS)
return result;
diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
index 36cd46aa94..c22b9d101d 100644
--- a/sysdeps/unix/sysv/linux/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/kernel-features.h
@@ -94,3 +94,11 @@
#if __LINUX_KERNEL_VERSION >= 131874 && defined __i386__
# define __ASSUME_STAT64_SYSCALL 1
#endif
+
+/* On sparc the truncate64/ftruncate64/mmap2/stat64/lstat64/fstat64
+ syscalls were introduced in 2.3.35. */
+#if __LINUX_KERNEL_VERSION >= 131875 && defined __sparc__
+# define __ASSUME_TRUNCATE64_SYSCALL 1
+# define __ASSUME_MMAP2_SYSCALL 1
+# define __ASSUME_STAT64_SYSCALL 1
+#endif
diff --git a/sysdeps/unix/sysv/linux/lxstat64.c b/sysdeps/unix/sysv/linux/lxstat64.c
index 79a29fb894..fc7828ad4f 100644
--- a/sysdeps/unix/sysv/linux/lxstat64.c
+++ b/sysdeps/unix/sysv/linux/lxstat64.c
@@ -45,7 +45,7 @@ int
__lxstat64 (int vers, const char *name, struct stat64 *buf)
{
#ifdef __ASSUME_STAT64_SYSCALL
- return INLINE_SYSCALL (lstat64, 2, name, &buf);
+ return INLINE_SYSCALL (lstat64, 2, name, buf);
#else
struct kernel_stat kbuf;
int result;
@@ -53,7 +53,7 @@ __lxstat64 (int vers, const char *name, struct stat64 *buf)
if (! have_no_stat64)
{
int saved_errno = errno;
- result = INLINE_SYSCALL (lstat64, 2, name, &kbuf);
+ result = INLINE_SYSCALL (lstat64, 2, name, buf);
if (result != -1 || errno != ENOSYS)
return result;
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 */
diff --git a/sysdeps/unix/sysv/linux/truncate64.c b/sysdeps/unix/sysv/linux/truncate64.c
index 4fe446475a..d08adff5b6 100644
--- a/sysdeps/unix/sysv/linux/truncate64.c
+++ b/sysdeps/unix/sysv/linux/truncate64.c
@@ -26,7 +26,10 @@
#include "kernel-features.h"
#ifdef __NR_truncate64
-static int have_no_truncate64;
+#ifndef __ASSUME_TRUNCATE64_SYSCALL
+/* The variable is shared between all wrappers around *truncate64 calls. */
+int have_no_truncate64;
+#endif
extern int __syscall_truncate64 (int fd, int high_length, int low_length);
diff --git a/sysdeps/unix/sysv/linux/xstat64.c b/sysdeps/unix/sysv/linux/xstat64.c
index b2a83e6530..f0136db2b1 100644
--- a/sysdeps/unix/sysv/linux/xstat64.c
+++ b/sysdeps/unix/sysv/linux/xstat64.c
@@ -33,7 +33,7 @@
extern int __syscall_stat (const char *, struct kernel_stat *);
#ifdef __NR_stat64
-extern int __syscall_fstat64 (int, struct stat64 *);
+extern int __syscall_stat64 (const char *, struct stat64 *);
# if __ASSUME_STAT64_SYSCALL == 0
/* The variable is shared between all wrappers around *stat64 calls.
This is the definition. */
@@ -47,7 +47,7 @@ int
__xstat64 (int vers, const char *name, struct stat64 *buf)
{
#if __ASSUME_STAT64_SYSCALL > 0
- return INLINE_SYSCALL (stat64, 2, name, &buf);
+ return INLINE_SYSCALL (stat64, 2, name, buf);
#else
struct kernel_stat kbuf;
int result;
@@ -55,7 +55,7 @@ __xstat64 (int vers, const char *name, struct stat64 *buf)
if (! have_no_stat64)
{
int saved_errno = errno;
- result = INLINE_SYSCALL (stat64, 2, name, &buf);
+ result = INLINE_SYSCALL (stat64, 2, name, buf);
if (result != -1 || errno != ENOSYS)
return result;