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

The Open Brand -- Problem Reporting and Interpretations System


Problem Report 1654 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 1654.


Report 1654 Actions


    Problem Report Number 1654
    Submitter's Classification Specification problem
    State Resolved
    Resolution Temporary Interpretation (TIN)
    Problem Resolution ID TIN.X.0069
    Raised 1998-02-23 08:00
    Updated 2003-03-13 08:00
    Published 1998-02-27 08:00
    Product Standard Internationalised System Calls and Libraries Extended V2 (UNIX 98)
    Certification Program The Open Brand certification program
    Test Suite VSU version 5.0.2
    Test Identification CAPI.hdr/misc/time 4
    Specification System Interfaces and Headers Issue 5
    Location in Spec See Problem Text
    Problem Summary TIN4U.00001 Symbols defined in signal.h may be visible in the namespace when time.h is included, pending a POSIX interpretation.
    Problem Text
    (time.h, POSIX should allow symbols defined in
    signal.h to be visible in the namespace when time.h is included).

    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
    TEST CASE: time.h

    TEST PURPOSE #4
    The inclusion of time.h with _XOPEN_SOURCE defined
    with the value 500 shall only define or
    declare identifiers with external linkage, macros, and
    identifiers with file scope specified in the time.h
    header file section; macros and identifiers prefixed
    with 'tm_'; identifiers and macros suffixed with '_t';
    and identifiers and macros prefixed with underscore
    and either an alphanumeric character character or
    another underscore.
    ERROR: Invalid struct/union/enum tag 'sigval'
    ERROR: Invalid struct/union/enum tag 'sigevent'
    ERROR: Invalid symbol name 'ctime_r'
    ERROR: Invalid macro name 'sigev_signo'
    ERROR: Structure members not allowed by namespace
    rules are defined and are not protected from
    user-defined macros. The following compiler
    output resulted. With most compilers the
    output will include the string "name
    unprotected" for a member name at issue.
    "/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
    c89: acomp failed for smem.c
    4 FAIL

    Review Information

    Review Type TSMA Review
    Start Date null
    Completed null
    Status Complete
    Review Recommendation No Resolution Given
    Review Response
    A Temporary Interpretation 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