This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.23-509-g78c1208
- From: siddhesh at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 23 Jun 2016 20:31:02 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.23-509-g78c1208
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 78c12083068bc0390048b590e7e2fa837032c30c (commit)
via d7e64365fea8d9223a233487de1e1d6e3d21c553 (commit)
from db3476aff19b75c4fdefbe65fcd5f0a90588ba51 (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=78c12083068bc0390048b590e7e2fa837032c30c
commit 78c12083068bc0390048b590e7e2fa837032c30c
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Fri Jun 24 01:59:04 2016 +0530
Fix up ChangeLog
diff --git a/ChangeLog b/ChangeLog
index 66bb323..d0ec96e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -644,7 +644,7 @@
(old__malloc_initialize_hook): Rename from
__malloc_initialize_hook to evade poisoning. Turn into compat
symbol.
- * malloc/mcheck-init.c (old__malloc_initialize_hook): Rename from
+ * malloc/mcheck-init.c (old__malloc_initialize_hook): Rename from
__malloc_initialize_hook.
* malloc/Makefile (poisoned_apis, unpoisoned_api_defines): New.
(mallo.c, mcheck-init.c): Compile with unpoisoned symbol.
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d7e64365fea8d9223a233487de1e1d6e3d21c553
commit d7e64365fea8d9223a233487de1e1d6e3d21c553
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date: Fri Jun 24 01:58:44 2016 +0530
Avoid attempt for runtime checks if all environments are defined
getconf has the capability to do a runtime check for environment
support in cases where there is optional support for an environment
(_POSIX_V7_ILP32_OFF32 on x86_64 for example) and this is indicated by
not defining the _POSIX_V7_ILP32_OFF32 macro, which results in getconf
doing an additional execve of _POSIX_V7_ILP32_OFF32 in the
$GETCONF_DIR.
The default bits/environments.h however does not leave any environment
macros undefined, which means that no such additional execve is
needed. gcc trunk catches this as a build failure since it finds that
the code block inside switch(specs[i].num) is not reachable. Avoid
this error by not bothering about the additional exec (and looking in
specific environments) when all environments are defined.
Tested on aarch64.
* posix/getconf.c: Define ALL_ENVIRONMENTS_DEFINED if all
environment macros are defined.
(main): Avoid execve if ALL_ENVIRONMENTS_DEFINED is defined.
diff --git a/ChangeLog b/ChangeLog
index ce5070f..66bb323 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-23 Siddhesh Poyarekar <siddhesh@sourceware.org>
+
+ * posix/getconf.c: Define ALL_ENVIRONMENTS_DEFINED if all
+ environment macros are defined.
+ (main): Avoid execve if ALL_ENVIRONMENTS_DEFINED is defined.
+
2016-06-23 Florian Weimer <fweimer@redhat.com>
[BZ #20191]
diff --git a/posix/getconf.c b/posix/getconf.c
index 3e03396..5a65df8 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -29,6 +29,23 @@
#define NEED_SPEC_ARRAY 1
#include <posix-conf-vars.h>
+/* If all of the environments are defined in environments.h, then we don't need
+ to bother with doing a runtime check for a specific environment. */
+#if (defined _SC_V6_ILP32_OFF32 \
+ && defined _SC_V7_LPBIG_OFFBIG \
+ && defined _SC_XBS5_LP64_OFF64 \
+ && defined _SC_V6_LP64_OFF64 \
+ && defined _SC_V7_ILP32_OFFBIG \
+ && defined _SC_V6_LPBIG_OFFBIG \
+ && defined _SC_V7_LP64_OFF64 \
+ && defined _SC_V7_ILP32_OFF32 \
+ && defined _SC_XBS5_LPBIG_OFFBIG \
+ && defined _SC_XBS5_ILP32_OFFBIG \
+ && defined _SC_V6_ILP32_OFFBIG \
+ && defined _SC_XBS5_ILP32_OFF32)
+# define ALL_ENVIRONMENTS_DEFINED 1
+#endif
+
struct conf
{
const char *name;
@@ -488,6 +505,24 @@ environment SPEC.\n\n"));
return 0;
}
+#ifdef ALL_ENVIRONMENTS_DEFINED
+ if (argc > 1 && strncmp (argv[1], "-v", 2) == 0)
+ {
+ if (argv[1][2] == '\0')
+ {
+ if (argc < 3)
+ usage ();
+
+ argv += 2;
+ argc -= 2;
+ }
+ else
+ {
+ argv += 1;
+ argc += 1;
+ }
+ }
+#else
const char *getconf_dir = getenv ("GETCONF_DIR") ?: GETCONF_DIR;
size_t getconf_dirlen = strlen (getconf_dir);
@@ -538,42 +573,42 @@ environment SPEC.\n\n"));
switch (specs[i].num)
{
-#ifndef _XBS5_ILP32_OFF32
+# ifndef _XBS5_ILP32_OFF32
case _SC_XBS5_ILP32_OFF32:
-#endif
-#ifndef _XBS5_ILP32_OFFBIG
+# endif
+# ifndef _XBS5_ILP32_OFFBIG
case _SC_XBS5_ILP32_OFFBIG:
-#endif
-#ifndef _XBS5_LP64_OFF64
+# endif
+# ifndef _XBS5_LP64_OFF64
case _SC_XBS5_LP64_OFF64:
-#endif
-#ifndef _XBS5_LPBIG_OFFBIG
+# endif
+# ifndef _XBS5_LPBIG_OFFBIG
case _SC_XBS5_LPBIG_OFFBIG:
-#endif
-#ifndef _POSIX_V6_ILP32_OFF32
+# endif
+# ifndef _POSIX_V6_ILP32_OFF32
case _SC_V6_ILP32_OFF32:
-#endif
-#ifndef _POSIX_V6_ILP32_OFFBIG
+# endif
+# ifndef _POSIX_V6_ILP32_OFFBIG
case _SC_V6_ILP32_OFFBIG:
-#endif
-#ifndef _POSIX_V6_LP64_OFF64
+# endif
+# ifndef _POSIX_V6_LP64_OFF64
case _SC_V6_LP64_OFF64:
-#endif
-#ifndef _POSIX_V6_LPBIG_OFFBIG
+# endif
+# ifndef _POSIX_V6_LPBIG_OFFBIG
case _SC_V6_LPBIG_OFFBIG:
-#endif
-#ifndef _POSIX_V7_ILP32_OFF32
+# endif
+# ifndef _POSIX_V7_ILP32_OFF32
case _SC_V7_ILP32_OFF32:
-#endif
-#ifndef _POSIX_V7_ILP32_OFFBIG
+# endif
+# ifndef _POSIX_V7_ILP32_OFFBIG
case _SC_V7_ILP32_OFFBIG:
-#endif
-#ifndef _POSIX_V7_LP64_OFF64
+# endif
+# ifndef _POSIX_V7_LP64_OFF64
case _SC_V7_LP64_OFF64:
-#endif
-#ifndef _POSIX_V7_LPBIG_OFFBIG
+# endif
+# ifndef _POSIX_V7_LPBIG_OFFBIG
case _SC_V7_LPBIG_OFFBIG:
-#endif
+# endif
{
const char *args[argc + 3];
size_t spec_len = strlen (spec);
@@ -592,6 +627,7 @@ environment SPEC.\n\n"));
break;
}
}
+#endif
if (argc > 1 && strcmp (argv[1], "-a") == 0)
{
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++-
posix/getconf.c | 84 +++++++++++++++++++++++++++++++++++++++---------------
2 files changed, 67 insertions(+), 25 deletions(-)
hooks/post-receive
--
GNU C Library master sources