public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Fix sparc32 getpagesize ()
@ 2004-03-23 18:52 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2004-03-23 18:52 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

Hi!

2004-03-22  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c
	(__getpagesize): Avoid warning about writing into read-only memory.

--- libc/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c.jj	2004-03-06 03:07:13.000000000 -0500
+++ libc/sysdeps/unix/sysv/linux/sparc/sparc32/getpagesize.c	2004-03-22 18:06:44.000000000 -0500
@@ -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)

	Jakub

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-03-22 18:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-23 18:52 [PATCH] Fix sparc32 getpagesize () Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).