From 61645263d4b3c72c9a33659a0fcabe1dd2814a98 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 22 Mar 2004 19:54:06 +0000 Subject: Update. 2004-03-22 Jakub Jelinek * sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c (__getpagesize): Avoid warning about writing into read-only memory. * string/Makefile (routines): Add xpg-strerror. * string/string.h (strerror_r): If __USE_XOPEN2K but not __USE_GNU, redirect strerror_r to __xpg_strerror_r. * string/Versions (libc): Add __xpg_strerror_r@@GLIBC_2.3.4. * sysdeps/generic/xpg-strerror.c: New file. * sysdeps/mach/xpg-strerror.c: New file. --- sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sysdeps/unix/sysv/linux/sparc/sparc32') diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c b/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c index 00bbdc744f..4760daff24 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c @@ -31,12 +31,16 @@ int __getpagesize () { - if (GLRO(dl_pagesize) == 0) + int ret = GLRO(dl_pagesize); + if (ret == 0) { INTERNAL_SYSCALL_DECL (err); - GLRO(dl_pagesize) = INTERNAL_SYSCALL (getpagesize, err, 0); + ret = INTERNAL_SYSCALL (getpagesize, err, 0); +#ifndef SHARED + GLRO(dl_pagesize) = ret; +#endif } - return GLRO(dl_pagesize); + return ret; } libc_hidden_def (__getpagesize) weak_alias (__getpagesize, getpagesize) -- cgit v1.2.3