HomeAbout Us A-Z IndexSearch * Contact Us Register LoginPress Shop

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1916 Details

Help Show help | Quick Search | Submit a Test Suite Support Request | Click here to view your privileges

This page provides all information on Problem Report 1916.


Report 1916 Actions


    Problem Report Number 1916
    Submitter's Classification Specification problem
    State Resolved
    Resolution Temporary Interpretation (TIN)
    Problem Resolution ID TIN.X.0082
    Raised 1998-02-23 08:00
    Updated 2003-03-13 08:00
    Published 1998-02-26 08:00
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSX4 version 4.4.2
    Test Identification ANSI.hdr/misc/time 29
    Specification System Interfaces and Headers Issue 5
    Location in Spec See Problem Text
    Problem Summary TIN5.001 (time.h should allow symbols defined in signal.h to be visible in the namespace). The Base Working Group recommends a TIN on this issue while a PASC Interpretation request is filed with the recommenda...
    Problem Text
    (time.h should allow symbols defined in signal.h to be visible
    in the namespace).

    The Base Working Group recommends a TIN on this issue
    while a PASC Interpretation request is filed with the
    recommendation that POSIX.1 allow the symbols in the <signal.h>
    header to be visible when the <time.h> header is included.

    The text of the request to be put forward to POSIX
    follows:

    Interp 1.
    time.h should allow inclusion of signal.h
    -------------------------------------------

    Although the synopsis for timer_create() (POSIX.1-1996, P312, L138-141)
    shows that <signal.h> must be included before <time.h> to pick up the
    definition of struct sigevent, there are lots of synopses in
    POSIX.1-1996 that just specify <time.h>. When an application using
    routines defined in <time.h> that don't also require <signal.h> (e.g.
    clock_gettime()) is built, most compilers generate warnings about a
    dubious tag declaration for struct sigevent. This is because the
    specification for <time.h> does not require (or even allow) struct
    sigevent (and the union sigval needed to define its
    sigev_notify_function element) to be defined and does not reserve
    namespace to define elements of struct sigevent and union sigval when
    <time.h> is included. Even though these are warnings, not errors, our
    customers complain when they use standard functions from standard
    headers and don't get "clean compiles".

    In other places where this problem could occur, the C Standard and
    POSIX standards usually reserve the namespace or require that the
    needed elements be in both headers. Examples of these are:

    1. The description of <stdio.h> in the C Standard (ISO/IEC 9899-1990),
    P124, Section 7.9.1, 2nd and 3rd paragraphs requires that <stdio.h>
    define size_t and NULL in <stdio.h> as well as in <stddef.h>.

    2. The description of <mqueue.h> in POSIX.1-1996, P319, L2-4 says that
    including <mqueue.h> may essentially include <sys/types.h>,
    <fcntl.h>, <time.h>, and <signal.h> and L13-16 requires that struct
    sigevent be defined in <mqueue.h> as well as in <signal.h>.

    Was the intent here to require warnings about dubious structure tags
    for conforming applications using <time.h>, but not using
    timer_create()? Or, was it an oversight that the description of
    <time.h> did not specify that implementations were allowed to include
    <signal.h> as a side effect of including <time.h>?
    ================================================================================

    We propose the following solution:


    ================================================================================
    Add to the end of the paragraph on POSIX.1-1996, P309, L2-3
    (description of <time.h>):
    Inclusion of the <time.h> header may make visible symbols
    allowed by this part of ISO/IEC 9945 to be in the <signal.h>
    header.
    ================================================================================

    Test Output
    ************************************************************************
    /tset/ANSI.hdr/misc/time/T.time 29 Failed

    Test Description:
    For POSIX90 and FIPS modes:
    When _POSIX_SOURCE is defined and no other feature test macros are
    defined, no other symbols than those defined or reserved by
    POSIX.1-1990 are made visible.
    For POSIX96 mode:
    When _POSIX_C_SOURCE is defined with the value 199506L and no
    other feature test macros except _POSIX_SOURCE are defined, no
    other symbols than those defined or reserved by POSIX.1-1996 are
    made visible.
    For XPG4 mode:
    When _XOPEN_SOURCE is defined and no other feature test macros
    except _POSIX_SOURCE, _POSIX_C_SOURCE=1 or _POSIX_C_SOURCE=2 are
    defined, no other symbols than those defined or reserved by XPG4
    are made visible.
    For UNIX98 mode:
    When _XOPEN_SOURCE is defined with the value 500 and no other
    feature test macros except _POSIX_SOURCE or
    _POSIX_C_SOURCE<=199506L are defined, no other symbols than those
    defined or reserved by XSH5 are made visible.
    Posix Ref: Component C Language Definitions Assertion 2.7.2-05(B)

    Test Strategy:
    FOR each unreserved struct/union member made visible by the header
    DEFINE a macro which will cause an error if not protected from
    expansion
    UNDEFINE those macros which correspond to allowed member names
    INCLUDE a copy of the header file modified to identify #defines
    FOR each unreserved symbol made visible by the header
    VERIFY that the symbol name is in a list of allowed names

    Test Information:
    Compilation exited with non-zero value when expected to succeed
    Feature test macros: -D_XOPEN_SOURCE=500
    Compiler or run-time messages or results:
    "/usr/include/time.h", line 118: syntax error before or at: "sival_int
    unprotected"
    "/usr/include/time.h", line 118: warning: syntax requires ";" after
    last struct/union member
    "/usr/include/time.h", line 120: zero-sized struct/union
    "/usr/include/time.h", line 126: syntax error before or at:
    "sigev_notify unprotected"
    "/usr/include/time.h", line 126: warning: syntax requires ";" after
    last struct/union member
    "/usr/include/time.h", line 130: zero-sized struct/union
    "/usr/include/time.h", line 131: syntax error before or at:
    "sigev_value unprotected"
    "/usr/include/time.h", line 131: warning: syntax error: empty
    declaration
    "/usr/include/time.h", line 135: syntax error before or at: }
    "/usr/include/time.h", line 135: warning: syntax error: empty
    declaration
    "././ALLOW.h", line 95: cannot recover from previous errors
    c89: acomp failed for cc29es.c
    TEST INFORMATION TRUNCATED BY -t OPTION

    ************************************************************************

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    A Temporary Interpretation pending the PASC interpretation
    request is recommended.

    Review Type SA Review
    Start Date null
    Completed null
    Status Complete
    Review Resolution Temporary Interpretation (TIN)
    Review Conclusion
    A Temporary Interpretation is granted.

    Problem Reporting System Options:

     

    Back   


Contact the Certification Authority