Email List: Xaustin-review-lX
[All Lists]

Defect in XCU getconf

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XCU getconf
From: yyy@xxxxxxxxxxxxx (Geoff Clare)
Date: Sun, 28 Apr 2002 20:40:44 +0100
@ page 482 line 18565-18607 section getconf objection [gwc getconf variables]

Problem:

Defect code :  1. Error

There have been some changes to the variable names used with getconf
since POSIX.2, which I think were probably unintentional.

POSIX.2 defined the variable names to be used by reference to specific
columns of certain tables in POSIX.2 and in POSIX.1-1990.

XCU6 just has a vague reference to "all of the variables" in the
sysconf(), pathconf() and confstr() functions, plus a table giving
system_var values that can be used for each confstr() Name Value.
In XSH6 the sysconf() and [f]pathconf() pages contain tables with
a column headed "Variable", so it is a reasonable assumption that
these are the variables to be used as system_var and path_var, but
this ought to be stated explicitly, in a form which includes the text
"without the enclosing braces" that appeared in POSIX.2.  For confstr()
there is nothing comparable in XSH6 which could be taken to be a list of
the variable names to be used, so the reference to the description of
confstr() here is confusing.  At first I thought it should be removed,
leaving the system_var names listed on the getconf page as the way to
access confstr() variables, but I see that there are some other places
where "getconf _CS_PATH" is mentioned, so I assume that the requirement
to support the _CS_* names is an intentional addition to what was
required by POSIX.2.

Disregarding confstr(), here is an analysis of the changes from
POSIX.2 for each table it referenced:

system_var

    - Name column of Table 2-17 (Utility Limit Minimum Values)

        The POSIX2_*_MAX variables have been lost.  POSIX2_VERSION is
        covered by the reference to sysconf() but as _POSIX2_VERSION
        (with an underscore on the front).

    - Name column of Table 2-18 (Symbolic Utility Limits)

        No differences.  (Covered by the reference to sysconf().)

    - Name column of Table 2-19 (Optional Facility Configuration Values)

        These are covered by the reference to sysconf(), but with
        an underscore added on the front of each name.

    - Name column of Table 2-3 (Minimum Values) of POSIX.1 {8}

        These have all been lost.

    - Name column of Table 2-4 (Run-Time Increasable Values) of POSIX.1 {8}

        No differences.  (Covered by the reference to sysconf().)

    - Variable column of Table 4-2 (Configurable System Variables) of
    POSIX.1 {8} (except CLK_TCK need not be supported), without the
    enclosing braces

        No differences.  (Covered by the reference to sysconf().)

path_var

    - Variable column of Table 5-2 (Configurable Pathname Variables)
    of POSIX.1 {8}, without the enclosing braces

        No differences.  (Covered by the reference to pathconf().)


The text in XCU6 was derived from XCU5.  However, XCU5 deferred to
POSIX.2, so any difference between them (other than extensions) must
have been unintentional.

The way to correct most of these differences is simple and obvious.
However, the issue of added underscores is problematic.  The best
solution is probably to require the affected names to be supported
both with and without the leading underscore.  (Without the
underscore for compatibility with POSIX.2 apps; with the underscore
for consistency with the other names used from the sysconf() table.)
Support for the old names could be deprecated.

Action:

Replace lines 18565-18567 with the following:

   path_var    A name of a configuration variable. All of the variables
               in the Variable column of the table in the description
               of the fpathconf() function in the System Interfaces
               volume of IEEE Std 1003.1-2001, without the enclosing
               braces, shall be supported.  The implementation may add
               other local variables.


Replace lines 18569-18607 with the following:

   system_var  A name of a configuration variable. All of the following
               variables shall be supported:

               - The names in the Variable column of the table in the
                 description of the sysconf() function in the System
                 Interfaces volume of IEEE Std 1003.1-2001 (except
                 for the entries corresponding to _SC_CLK_TCK,
                 _SC_GETGR_R_SIZE_MAX and _SC_GETPW_R_SIZE_MAX),
                 without the enclosing braces.

                 For compatibility with older versions of this
                 specification, the following variable names shall
                 also be supported:

                    POSIX2_VERSION, POSIX2_C_BIND, POSIX2_C_DEV,
                    POSIX2_CHAR_TERM, POSIX2_FORT_DEV,
                    POSIX2_FORT_RUN, POSIX2_LOCALEDEF, POSIX2_SW_DEV,
                    POSIX2_UPE

                 and shall be equivalent to the same name prefixed with
                 an underscore.  This requirement may be removed in a
                 future revision.

               - The names of the symbolic constants used as the name
                 argument of the confstr() function in the System
                 Interfaces volume of IEEE Std 1003.1-2001, both with
                 and without the _CS_ prefix.

               - The names of the symbolic constants listed under
                 the headings `Maximum Values' and `Minimum Values'
                 in the description of the <limits.h> header in the
                 Base Definitions volume of IEEE Std 1003.1-2001,
                 without the enclosing braces.

                 For compatibility with older versions of this
                 specification, the following variable names shall
                 also be supported:

                    POSIX2_BC_BASE_MAX, POSIX2_BC_DIM_MAX,
                    POSIX2_BC_SCALE_MAX, POSIX2_BC_STRING_MAX,
                    POSIX2_COLL_WEIGHTS_MAX, POSIX2_EXPR_NEST_MAX,
                    POSIX2_LINE_MAX, POSIX2_RE_DUP_MAX

                 and shall be equivalent to the same name prefixed with
                 an underscore.  This requirement may be removed in a
                 future revision.

               The implementation may add other local values.


<Prev in Thread] Current Thread [Next in Thread>
  • Defect in XCU getconf, Geoff Clare <=