From 50cbbaa935e92dc570fc899a17669cd6782b09cd Mon Sep 17 00:00:00 2001 From: Siddhesh Poyarekar Date: Mon, 29 Dec 2014 17:40:47 +0530 Subject: Use posix-conf-vars.list to generate spec array 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. --- posix/posix-conf-vars.list | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'posix/posix-conf-vars.list') diff --git a/posix/posix-conf-vars.list b/posix/posix-conf-vars.list index 3e7e7cdaa9..601bc2fd33 100644 --- a/posix/posix-conf-vars.list +++ b/posix/posix-conf-vars.list @@ -1,7 +1,8 @@ # Configuration variables identified by getconf. The heading of each section -# is of the format TYPE PREFIX with the opening curly brace on the same line. -# TYPE can either be SYSCONF, PATHCONF, CONFSTR or SPEC. Variable names are -# put one on each line with a curly brace on its own line ending the section. +# is of the format TYPE PREFIX SC_PREFIX with the opening curly brace on the +# same line. TYPE can either be SYSCONF, PATHCONF, CONFSTR or SPEC. In the +# absence of SC_PREFIX, _SC is used as the SC_PREFIX. Variable names are put +# one on each line with a curly brace on its own line ending the section. SPEC POSIX { V6_ILP32_OFF32 @@ -104,7 +105,7 @@ SYSCONF POSIX { RAW_SOCKETS } -SPEC XBS5 { +SPEC XBS5 _SC_XBS5 { ILP32_OFF32 ILP32_OFFBIG LP64_OFF64 -- cgit v1.2.3