This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch, master, updated. glibc-2.14-342-g110946e


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  110946e473b38fc3896212e416d9d7064fecd5b7 (commit)
       via  506042209575f1da21e5bdd2fd32a4ef4760adea (commit)
       via  c658d255e919d40619cc2a5730d502c7777830cc (commit)
      from  7edb55ce06ab1fa716a062cd1cb6682585bb449d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=110946e473b38fc3896212e416d9d7064fecd5b7

commit 110946e473b38fc3896212e416d9d7064fecd5b7
Author: Roland McGrath <mcgrathr@chromium.org>
Date:   Mon Sep 19 11:32:27 2011 -0700

    Clean up locarchive mmap reservation code.

diff --git a/ChangeLog b/ChangeLog
index df89ebe..e70edd1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-10-08  Roland McGrath  <roland@hack.frob.com>
 
+	* locale/programs/locarchive.c (prepare_address_space): New function.
+	(create_archive, enlarge_archive, open_archive): Use it.
+
 	* sysdeps/unix/sysv/linux/x86_64/time.c: Move #include <dl-vdso.h>
 	inside [SHARED], where it is used.
 
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index 770a731..5069265 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -74,6 +74,29 @@ static const char *locnames[] =
 /* Size of the reserved address space area.  */
 #define RESERVE_MMAP_SIZE	512 * 1024 * 1024
 
+/* To prepare for enlargements of the mmaped area reserve some address
+   space.  On some machines, being a file mapping rather than an anonymous
+   mapping affects the address selection.  So do this mapping from the
+   actual file, even though it's only a dummy to reserve address space.  */
+static void *
+prepare_address_space (int fd, size_t total, size_t *reserved, int *xflags)
+{
+  if (total < RESERVE_MMAP_SIZE)
+    {
+      void *p = mmap64 (NULL, RESERVE_MMAP_SIZE, PROT_NONE, MAP_SHARED, fd, 0);
+      if (p != MAP_FAILED)
+        {
+          *reserved = RESERVE_MMAP_SIZE;
+          *xflags = MAP_FIXED;
+          return p;
+        }
+    }
+
+  *reserved = total;
+  *xflags = 0;
+  return NULL;
+}
+
 
 static void
 create_archive (const char *archivefname, struct locarhandle *ah)
@@ -81,7 +104,6 @@ create_archive (const char *archivefname, struct locarhandle *ah)
   int fd;
   char fname[strlen (archivefname) + sizeof (".XXXXXX")];
   struct locarhead head;
-  void *p;
   size_t total;
 
   strcpy (stpcpy (fname, archivefname), ".XXXXXX");
@@ -129,19 +151,9 @@ create_archive (const char *archivefname, struct locarhandle *ah)
       error (EXIT_FAILURE, errval, _("cannot resize archive file"));
     }
 
-  /* To prepare for enlargements of the mmaped area reserve some
-     address space.  */
-  size_t reserved = RESERVE_MMAP_SIZE;
-  int xflags = 0;
-  if (total < reserved
-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
-		       -1, 0)) != MAP_FAILED))
-    xflags = MAP_FIXED;
-  else
-    {
-      p = NULL;
-      reserved = total;
-    }
+  size_t reserved;
+  int xflags;
+  void *p = prepare_address_space (fd, total, &reserved, &xflags);
 
   /* Map the header and all the administration data structures.  */
   p = mmap64 (p, total, PROT_READ | PROT_WRITE, MAP_SHARED | xflags, fd, 0);
@@ -297,7 +309,6 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
   int fd;
   struct locarhead newhead;
   size_t total;
-  void *p;
   unsigned int cnt, loccnt;
   struct namehashent *oldnamehashtab;
   struct locarhandle new_ah;
@@ -390,19 +401,9 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
       error (EXIT_FAILURE, errval, _("cannot resize archive file"));
     }
 
-  /* To prepare for enlargements of the mmaped area reserve some
-     address space.  */
-  size_t reserved = RESERVE_MMAP_SIZE;
-  int xflags = 0;
-  if (total < reserved
-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
-		       -1, 0)) != MAP_FAILED))
-    xflags = MAP_FIXED;
-  else
-    {
-      p = NULL;
-      reserved = total;
-    }
+  size_t reserved;
+  int xflags;
+  void *p = prepare_address_space (fd, total, &reserved, &xflags);
 
   /* Map the header and all the administration data structures.  */
   p = mmap64 (p, total, PROT_READ | PROT_WRITE, MAP_SHARED | xflags, fd, 0);
@@ -605,20 +606,9 @@ open_archive (struct locarhandle *ah, bool readonly)
   ah->fd = fd;
   ah->mmaped = st.st_size;
 
-  /* To prepare for enlargements of the mmaped area reserve some
-     address space.  */
-  size_t reserved = RESERVE_MMAP_SIZE;
-  int xflags = 0;
-  void *p;
-  if (st.st_size < reserved
-      && ((p = mmap64 (NULL, reserved, PROT_NONE, MAP_PRIVATE | MAP_ANON,
-		       -1, 0)) != MAP_FAILED))
-    xflags = MAP_FIXED;
-  else
-    {
-      p = NULL;
-      reserved = st.st_size;
-    }
+  size_t reserved;
+  int xflags;
+  void *p = prepare_address_space (fd, st.st_size, &reserved, &xflags);
 
   /* Map the entire file.  We might need to compare the category data
      in the file with the newly added data.  */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=506042209575f1da21e5bdd2fd32a4ef4760adea

commit 506042209575f1da21e5bdd2fd32a4ef4760adea
Author: Roland McGrath <roland@hack.frob.com>
Date:   Sat Oct 8 15:28:21 2011 -0700

    Conditionalize unnecessary #include.

diff --git a/ChangeLog b/ChangeLog
index abb83dd..df89ebe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2011-10-08  Roland McGrath  <roland@hack.frob.com>
 
+	* sysdeps/unix/sysv/linux/x86_64/time.c: Move #include <dl-vdso.h>
+	inside [SHARED], where it is used.
+
 	* nscd/nscd_proto.h: Declare __nscd_setnetgrent.
 
 	* nss/getent.c (netgroup_keys): Remove unused variable.
diff --git a/sysdeps/unix/sysv/linux/x86_64/time.c b/sysdeps/unix/sysv/linux/x86_64/time.c
index c1c1a75..a613eb0 100644
--- a/sysdeps/unix/sysv/linux/x86_64/time.c
+++ b/sysdeps/unix/sysv/linux/x86_64/time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001,02, 2003, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2001,02,2003,2011 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
@@ -16,13 +16,11 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#ifdef SHARED
 #include <dl-vdso.h>
 
-
 #define VSYSCALL_ADDR_vtime	0xffffffffff600400
 
-
-#ifdef SHARED
 void *time_ifunc (void) __asm__ ("time");
 
 void *
@@ -34,7 +32,9 @@ time_ifunc (void)
   return _dl_vdso_vsym ("time", &linux26) ?: (void *) VSYSCALL_ADDR_vtime;
 }
 __asm (".type time, %gnu_indirect_function");
+
 #else
+
 # include <time.h>
 # include <sysdep.h>
 
@@ -44,6 +44,7 @@ time (time_t *t)
   INTERNAL_SYSCALL_DECL (err);
   return INTERNAL_SYSCALL (time, err, 1, t);
 }
+
 #endif
 
 strong_alias (time, __GI_time)

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c658d255e919d40619cc2a5730d502c7777830cc

commit c658d255e919d40619cc2a5730d502c7777830cc
Author: Roland McGrath <roland@hack.frob.com>
Date:   Sat Oct 8 15:25:08 2011 -0700

    Fix some nit warnings.

diff --git a/ChangeLog b/ChangeLog
index 57a72ca..abb83dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-08  Roland McGrath  <roland@hack.frob.com>
+
+	* nscd/nscd_proto.h: Declare __nscd_setnetgrent.
+
+	* nss/getent.c (netgroup_keys): Remove unused variable.
+	* sysdeps/ieee754/flt-32/s_isinf_nsf.c: Likewise.
+
 2011-10-08  Ulrich Drepper  <drepper@gmail.com>
 
 	* include/math.h: Declare __isinf_ns, __isinf_nsf, __isinf_nsl.
diff --git a/nscd/nscd_proto.h b/nscd/nscd_proto.h
index 8aa2973..742c154 100644
--- a/nscd/nscd_proto.h
+++ b/nscd/nscd_proto.h
@@ -74,5 +74,7 @@ extern int __nscd_getservbyport_r (int port, const char *proto,
 				   size_t buflen, struct servent **result);
 extern int __nscd_innetgr (const char *netgroup, const char *host,
 			   const char *user, const char *domain);
+extern int __nscd_setnetgrent (const char *group, struct __netgrent *datap);
+
 
 #endif /* _NSCD_PROTO_H */
diff --git a/nss/getent.c b/nss/getent.c
index b843433..7d94223 100644
--- a/nss/getent.c
+++ b/nss/getent.c
@@ -472,7 +472,6 @@ static int
 netgroup_keys (int number, char *key[])
 {
   int result = 0;
-  int i;
 
   if (number == 0)
     {
diff --git a/sysdeps/ieee754/flt-32/s_isinf_nsf.c b/sysdeps/ieee754/flt-32/s_isinf_nsf.c
index bc37785..1e46e2c 100644
--- a/sysdeps/ieee754/flt-32/s_isinf_nsf.c
+++ b/sysdeps/ieee754/flt-32/s_isinf_nsf.c
@@ -14,7 +14,7 @@
 int
 __isinf_nsf (float x)
 {
-	int32_t ix,t;
+	int32_t ix;
 	GET_FLOAT_WORD(ix,x);
 	return (ix & 0x7fffffff) == 0x7f800000;
 }

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                             |   13 ++++++
 locale/programs/locarchive.c          |   74 ++++++++++++++------------------
 nscd/nscd_proto.h                     |    2 +
 nss/getent.c                          |    1 -
 sysdeps/ieee754/flt-32/s_isinf_nsf.c  |    2 +-
 sysdeps/unix/sysv/linux/x86_64/time.c |    9 ++--
 6 files changed, 53 insertions(+), 48 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]