summaryrefslogtreecommitdiff
path: root/scripts/gen-posix-conf-vars.awk
AgeCommit message (Collapse)Author
2015-01-02Remove uses of sprintf in gen-posix-conf-vars.awkSiddhesh Poyarekar
Simply some code by replacing sprintf in the awk script.
2014-12-31Use one-dimension arrays in gen-posix-conf-vars.awkSiddhesh Poyarekar
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.
2014-12-29Make type for spec variable size as size_tSiddhesh Poyarekar
2014-12-29Use posix-conf-vars.list to generate spec arraySiddhesh Poyarekar
This patch adds support to generate the spec array in getconf from the conf.list. The generated code is mostly unchanged. the only changes are due to the change in layout of the spec and val arrays in the ELF. The val array can also be auto-generated from posix-conf-vars.list once the remaining macros are added to it. * posix/posix-conf-vars.list (SPEC:XBS5): Add sysconf prefix. * posix/confstr.c: Define NEED_SPEC_ARRAY to 0. * posix/posix-envs.def: Likewise. * sysdeps/posix/sysconf.c: Likewise. * posix/getconf.c: Define NEED_SPEC_ARRAY to 1. (specs): Remove array. * scripts/gen-posix-conf-vars.awk: Support generation of specs array.
2014-12-29Remove Wundef warnings for specification macrosSiddhesh Poyarekar
This patch adds a file posix-conf-vars.list that is used to generate macros to determine if a macro is defined as set, unset or not defined. gen-posix-conf-vars.awk processes this file and generates a header (posix-conf-vars-def.h) with these macros. A new header posix-conf-vars.h includes this generated header and defines accessor macros for the generated macros. Tested on x86_64. * posix/Makefile (before-compile): Add posix-conf-vars-def.h. ($(objpfx)posix-conf-vars-def.h): New target. * posix/posix-conf-vars.list: New file. * posix/posix-conf-vars.h: New file. * posix/confstr.c: Include posix-conf-vars.h. (confstr): Use CONF_IS_* macros. * posix/posix-envs.def: Include posix-conf-vars.h. Use CONF_IS_* macros. * scripts/gen-posix-conf-vars.awk: New file.