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.20-454-g195f3af


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  195f3afcbed4986beaecd5c28fdbe27ee0a402e0 (commit)
      from  7062bd4230a9b94adff4101af9ae6c6a0d53c6e6 (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=195f3afcbed4986beaecd5c28fdbe27ee0a402e0

commit 195f3afcbed4986beaecd5c28fdbe27ee0a402e0
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
Date:   Wed Dec 31 13:22:58 2014 +0530

    Use one-dimension arrays in gen-posix-conf-vars.awk
    
    True multi-dimensional arrays were introduced in awk 4.0 and we
    support awk versions as early as 3.12.  Use a single subscript of the
    form prefix_conf instead of two dimensions to work around this
    limitation.  We also need one additional array of just the conf names
    subscripted by the prefix_conf to print the names for the
    specifications.
    
    	* scripts/gen-posix-conf-vars.awk: Don't use multi-dimensional
    	arrays.

diff --git a/ChangeLog b/ChangeLog
index 70f8675..4597880 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-31  Siddhesh Poyarekar  <siddhesh@redhat.com>
+
+	* scripts/gen-posix-conf-vars.awk: Don't use multi-dimensional
+	arrays.
+
 2014-12-30  H.J. Lu  <hongjiu.lu@intel.com>
 
 	[BZ #17775]
diff --git a/scripts/gen-posix-conf-vars.awk b/scripts/gen-posix-conf-vars.awk
index 007cd74..220d0e8 100644
--- a/scripts/gen-posix-conf-vars.awk
+++ b/scripts/gen-posix-conf-vars.awk
@@ -42,36 +42,36 @@ $1 == "}" {
   # CONFSTR: A configuration string
   # SYSCONF: A numeric value
   # SPEC: A specification
-  sc_prefixes[prefix][$1] = sc_prefix
-  conf[prefix][$1] = type
+  c = prefix "_" $1
+  sc_prefixes[c] = sc_prefix
+  prefix_conf[c] = type
+  conf[c] = $1
 }
 
 END {
   print "/* AUTOGENERATED by gen-posix-conf-vars.awk.  DO NOT EDIT.  */\n"
 
   # Generate macros that specify if a sysconf macro is defined and/or set.
-  for (p in conf) {
-    for (c in conf[p]) {
-      printf "#ifndef _%s_%s\n", p, c
-      printf "# define CONF_DEF_%s_%s CONF_DEF_UNDEFINED\n", p, c
-      # CONFSTR have string values and they are not set or unset.
-      if (conf[p][c] != "CONFSTR") {
-	printf "#else\n"
-	printf "# if _%s_%s > 0\n", p, c
-	printf "#  define CONF_DEF_%s_%s CONF_DEF_DEFINED_SET\n", p, c
-	printf "# else\n"
-	printf "#  define CONF_DEF_%s_%s CONF_DEF_DEFINED_UNSET\n", p, c
-	printf "# endif\n"
-      }
-      printf "#endif\n\n"
+  for (c in prefix_conf) {
+    printf "#ifndef _%s\n", c
+    printf "# define CONF_DEF_%s CONF_DEF_UNDEFINED\n", c
+    # CONFSTR have string values and they are not set or unset.
+    if (prefix_conf[c] != "CONFSTR") {
+      printf "#else\n"
+      printf "# if _%s > 0\n", c
+      printf "#  define CONF_DEF_%s CONF_DEF_DEFINED_SET\n", c
+      printf "# else\n"
+      printf "#  define CONF_DEF_%s CONF_DEF_DEFINED_UNSET\n", c
+      printf "# endif\n"
+    }
+    printf "#endif\n\n"
 
-      # Build a name -> sysconf number associative array to print a C array at
-      # the end.
-      if (conf[p][c] == "SPEC") {
-	name = sprintf ("%s_%s", p, c)
-	num = sprintf ("%s_%s", sc_prefixes[p][c], c)
-	spec[name] = num
-      }
+    # Build a name -> sysconf number associative array to print a C array at
+    # the end.
+    if (prefix_conf[c] == "SPEC") {
+      name = sprintf ("%s", c)
+      num = sprintf ("%s_%s", sc_prefixes[c], conf[c])
+      spec[name] = num
     }
   }
 

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

Summary of changes:
 ChangeLog                       |    5 ++++
 scripts/gen-posix-conf-vars.awk |   46 +++++++++++++++++++-------------------
 2 files changed, 28 insertions(+), 23 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]