about summary refs log tree commit diff
path: root/scripts/gen-posix-conf-vars.awk
Commit message (Collapse)AuthorAgeFilesLines
* Remove uses of sprintf in gen-posix-conf-vars.awkSiddhesh Poyarekar2015-01-021-5/+2
| | | | Simply some code by replacing sprintf in the awk script.
* Use one-dimension arrays in gen-posix-conf-vars.awkSiddhesh Poyarekar2014-12-311-23/+23
| | | | | | | | | | | | 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.
* Make type for spec variable size as size_tSiddhesh Poyarekar2014-12-291-1/+1
|
* Use posix-conf-vars.list to generate spec arraySiddhesh Poyarekar2014-12-291-0/+28
| | | | | | | | | | | | | | | | | | 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.
* Remove Wundef warnings for specification macrosSiddhesh Poyarekar2014-12-291-0/+61
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.