This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/19029] New: _XOPEN_VERSION and _XOPEN_UNIX not defined in XSI conformance mode
- From: "msebor at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Tue, 29 Sep 2015 21:58:03 +0000
- Subject: [Bug libc/19029] New: _XOPEN_VERSION and _XOPEN_UNIX not defined in XSI conformance mode
- Auto-submitted: auto-generated
https://sourceware.org/bugzilla/show_bug.cgi?id=19029
Bug ID: 19029
Summary: _XOPEN_VERSION and _XOPEN_UNIX not defined in XSI
conformance mode
Product: glibc
Version: 2.22
Status: NEW
Severity: normal
Priority: P2
Component: libc
Assignee: unassigned at sourceware dot org
Reporter: msebor at redhat dot com
CC: drepper.fsp at gmail dot com
Target Milestone: ---
In Section 2.1.4 XSI Conformance, the latest POSIX spec states:
XSI-conforming implementations shall set the symbolic constant _XOPEN_UNIX to a
value other than -1 and shall set the symbolic constant _XOPEN_VERSION to the
value 700.
The following test shows that the latest glibc fails to define either
_XOPEN_VERSION or _XOPEN_UNIX. This problem came up while developing a
portable application that relies on _XOPEN_NAME_MAX, which is also missing
(this is the subject of bug 18229.
#define _XOPEN_SOURCE 700
#include <limits.h>
#define A(expr) _Static_assert (expr, #expr)
A (_XOPEN_UNIX != -1);
A (_XOPEN_VERSION == _XOPEN_SOURCE)
A (_XOPEN_NAME_MAX == 255);
A (_XOPEN_PATH_MAX == 1024);
tst-xopen.c:7:4: error: â_XOPEN_UNIXâ undeclared here (not in a function)
A (_XOPEN_UNIX != -1);
^
tst-xopen.c:5:33: note: in definition of macro âAâ
#define A(expr) _Static_assert (expr, #expr)
^
tst-xopen.c:7:4: error: expression in static assertion is not an integer
A (_XOPEN_UNIX != -1);
^
tst-xopen.c:5:33: note: in definition of macro âAâ
#define A(expr) _Static_assert (expr, #expr)
^
tst-xopen.c:8:4: error: â_XOPEN_VERSIONâ undeclared here (not in a function)
A (_XOPEN_VERSION == _XOPEN_SOURCE)
^
tst-xopen.c:5:33: note: in definition of macro âAâ
#define A(expr) _Static_assert (expr, #expr)
^
tst-xopen.c:8:4: error: expression in static assertion is not an integer
A (_XOPEN_VERSION == _XOPEN_SOURCE)
^
tst-xopen.c:5:33: note: in definition of macro âAâ
#define A(expr) _Static_assert (expr, #expr)
^
tst-xopen.c:5:17: error: expected â;â before â_Static_assertâ
#define A(expr) _Static_assert (expr, #expr)
^
tst-xopen.c:9:1: note: in expansion of macro âAâ
A (_XOPEN_NAME_MAX == 255);
^
tst-xopen.c:10:4: error: â_XOPEN_PATH_MAXâ undeclared here (not in a function)
A (_XOPEN_PATH_MAX == 1024);
^
tst-xopen.c:5:33: note: in definition of macro âAâ
#define A(expr) _Static_assert (expr, #expr)
^
tst-xopen.c:10:4: error: expression in static assertion is not an integer
A (_XOPEN_PATH_MAX == 1024);
^
tst-xopen.c:5:33: note: in definition of macro âAâ
#define A(expr) _Static_assert (expr, #expr)
^
--
You are receiving this mail because:
You are on the CC list for the bug.