Debian Bug report logs - #25017
libc6-dev: Misuse of _XOPEN_SOURCE_EXTENDED

version graph

Package: libc6-dev; Maintainer for libc6-dev is GNU Libc Maintainers <debian-glibc@lists.debian.org>; Source for libc6-dev is src:glibc (PTS, buildd, popcon).

Reported by: <kai@khms.westfalen.de>

Date: Sat, 25 Jul 1998 16:48:01 UTC

Severity: normal

Found in version 2.0.7pre1-4

Done: Ben Collins <bcollins@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Dale Scheetz <dwarf@polaris.net>:
Bug#25017; Package libc6-dev. (full text, mbox, link).


Acknowledgement sent to <kai@khms.westfalen.de>:
New bug report received and forwarded. Copy sent to Dale Scheetz <dwarf@polaris.net>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: <kai@khms.westfalen.de>
To: submit@bugs.debian.org
Subject: libc6-dev: Misuse of _XOPEN_SOURCE_EXTENDED
Date: Sat, 25 Jul 1998 18:33:29 +0200
Package: libc6-dev
Version: 2.0.7pre1-4

ecvt and fcvt are only visible under _XOPEN_SOURCE_EXTENDED, not under
_XOPEN_SOURCE. This is wrong.

The SUSv2 has this to say wrt. _XOPEN_SOURCE_EXTENDED:


susv2/xcurses/curses.h.html:

[...]
These attribute flags need not be distinct
&nbsp;except when _XOPEN_CURSES is defined and the application sets
_XOPEN_SOURCE_EXTENDED to 1.
[...]

susv2/xcurses/u018f.htm:
[...]
<p>On environments supporting System Interfaces and Headers,
Issue 5 change the following text within the &lt;curses.h&gt;
manual page:</p>

<p><em>From:</em></p>

<p>These attribute flags need not be distinct [EC shading on]
except when _XOPEN_CURSES is defined and the application sets
_XOPEN_SOURCE_EXTENDED to 1. [EC shading off]</p>

<p><em>To:</em></p>

<p>These attribute flags need not be distinct [EC shading on]
except when _XOPEN_CURSES is defined and the application sets
_XOPEN_SOURCE=500. [EC shading off]</p>

[...]

susv2/xcurses/implement.html:
[...]
If the implementation defines _XOPEN_CURSES and if the application defines the
_XOPEN_SOURCE_EXTENDED feature test macro, then
<B>-l curses</B>
also makes visible all library functions referenced in this specification and
labelled ENHANCED CURSES and portions marked with the <SMALL>EC</SMALL> margin legend.
<p>
</dl>
<p>
It is unspecified whether the library
<B>libcurses.a</B>
exists as a regular file.
<p>
An application that uses any API specified as ENHANCED CURSES or relies on
any portion of this specification marked with the <SMALL>EC</SMALL> margin legend
must define _XOPEN_SOURCE_EXTENDED = 1 in each source file or as part of its
compilation environment.  When _XOPEN_SOURCE_EXTENDED = 1 is defined in a
source file, it must appear before any header is included.
[...]

I take this to mean that _XOPEN_SOURCE_EXTENDED is only ever meaningful in the
context of curses. AFAICT, libc6 doesn't implement curses anyway, so it
shouldn't use this symbol at all.

For the web version of the spec, see

<a href="http://www.UNIX-systems.org/online.html">Online Single UNIX Specification</a>

-- System Information
Debian Release: 2.0
Kernel Version: Linux khms.westfalen.de 2.0.33 #8 Sat Jan 31 15:31:16 CET 1998 i486 unknown

Versions of the packages libc6-dev depends on:
ii  libc6           2.0.7pre1-4    The GNU C library version 2 (run-time files)
ii  kernel-headers- 2.0.32-5       Linux kernel headers.
ii  gcc             2.7.2.3-4      The GNU C compiler.


Information forwarded to debian-bugs-dist@lists.debian.org, Dale Scheetz <dwarf@polaris.net>:
Bug#25017; Package libc6-dev. (full text, mbox, link).


Acknowledgement sent to root <root@khms.westfalen.de>:
Extra info received and forwarded to list. Copy sent to Dale Scheetz <dwarf@polaris.net>. (full text, mbox, link).


Message #10 received at 25017@bugs.debian.org (full text, mbox, reply):

From: root <root@khms.westfalen.de>
To: 25017@bugs.debian.org
Subject: header<->Standard mismatches
Date: Sat, 25 Jul 1998 23:48:34 +0200 (CEST)
A tool to check for this type of problem is hdrchk, available from
<a href="http://www.opengroup.org/testing/downloads.html">Test Tool - Downloads </a>
For example, the output while testing for "POSIX96 realtime" is as follows:

/****** This file contains definitions for those elements which    ******/
/****** 'incrpt' found to be missing from the system include files ******/

/****** <aio.h> - Missing include file ******/
/****** Start of Definitions for file aio.h ******/
#define AIO_ALLDONE	(-1)
#define AIO_CANCELED	(-1)
#define AIO_NOTCANCELED	(-1)
#define LIO_NOP	(-1)
#define LIO_NOWAIT	(-1)
#define LIO_READ	(-1)
#define LIO_WAIT	(-1)
#define LIO_WRITE	(-1)
extern int  aio_cancel();
symbol matching /aio_error/
extern int  aio_fsync();
extern int  aio_read();
extern ssize_t aio_return();
extern int  aio_suspend();
extern int aio_write();
extern int lio_listio();
struct aiocb { <members> };
/****** End of Definitions for file aio.h ******/

/****** <errno.h> - Missing elements ******/
/****** Start of Definitions for file errno.h ******/
#define	ECANCELED	(-1)
/****** End of Definitions for file errno.h ******/

/****** <fcntl.h> - Missing elements ******/
/****** Start of Definitions for file fcntl.h ******/
#define	O_DSYNC	(-1)
#define	O_RSYNC	(-1)
/****** End of Definitions for file fcntl.h ******/

/****** <limits.h> - Missing elements ******/
/****** Start of Definitions for file limits.h ******/
#define	_POSIX_AIO_LISTIO_MAX	2
#define	_POSIX_AIO_MAX		1
#define	_POSIX_CLOCKRES_MIN	20000000
#define	_POSIX_DELAYTIMER_MAX	32
#define	_POSIX_MQ_OPEN_MAX	8
#define	_POSIX_MQ_PRIO_MAX	32
#define	_POSIX_RTSIG_MAX	8
#define	_POSIX_SEM_NSEMS_MAX	256
#define	_POSIX_SEM_VALUE_MAX	32767
#define	_POSIX_SIGQUEUE_MAX	32
#define	_POSIX_TIMER_MAX	32
/****** End of Definitions for file limits.h ******/

/****** <mqueue.h> - Missing include file ******/
/****** Start of Definitions for file mqueue.h ******/
extern int mq_close();
extern int mq_getattr();
extern int mq_notify();
extern mqd_t mq_open();
extern ssize_t mq_receive();
extern int mq_send();
extern int mq_setattr();
extern int mq_unlink();
typedef <type> mqd_t;
struct mq_attr { <members> };
struct sigevent { <members> };
/****** End of Definitions for file mqueue.h ******/

/****** <semaphore.h> - Missing elements ******/
/****** Start of Definitions for file semaphore.h ******/
#define SEM_FAILED (-1)
extern int  sem_close();
extern sem_t *sem_open();
extern int  sem_unlink();
/****** End of Definitions for file semaphore.h ******/

/****** <signal.h> - Missing elements ******/
/****** Start of Definitions for file signal.h ******/
#define	SIGEV_NONE	(-1)
#define	SIGEV_SIGNAL	(-1)
#define	SIGEV_THREAD	(-1)
#define	SIGRTMAX	(-1)
#define	SIGRTMIN	(-1)
#define	SI_ASYNCIO	(-1)
#define	SI_MESGQ	(-1)
#define	SI_QUEUE	(-1)
#define	SI_TIMER	(-1)
#define	SI_USER	(-1)
extern int	sigqueue();
extern int	sigtimedwait();
union sigval { int sival_int; void *sival_ptr; };
extern int	sigwaitinfo();
struct sigevent { <members> };
/****** End of Definitions for file signal.h ******/

/****** <sys/mman.h> - Missing elements ******/
/****** Start of Definitions for file sys/mman.h ******/
extern int shm_open();
extern int shm_unlink();
/****** End of Definitions for file sys/mman.h ******/

/****** <sys/stat.h> - Missing elements ******/
/****** Start of Definitions for file sys/stat.h ******/
#define	S_TYPEISMQ	(-1)
#define	S_TYPEISSEM	(-1)
#define	S_TYPEISSHM	(-1)
/****** End of Definitions for file sys/stat.h ******/

/****** <sys/types.h> - Missing elements ******/
/****** Start of Definitions for file sys/types.h ******/
typedef	<type>	clockid_t;
typedef	<type>	timer_t;
/****** End of Definitions for file sys/types.h ******/

/****** <time.h> - Missing elements ******/
/****** Start of Definitions for file time.h ******/
#define	CLOCK_REALTIME	(-1)
#define	TIMER_ABSTIME	(-1)
extern int	clock_getres();
extern int	clock_gettime();
extern int	clock_settime();
struct itimerspec { <members> };
extern int	timer_create();
extern int	timer_delete();
extern int	timer_getoverrun();
extern int	timer_gettime();
extern int	timer_settime();
/****** End of Definitions for file time.h ******/

/****** End of Definitions ******/


Reply sent to Ben Collins <bcollins@debian.org>:
You have taken responsibility. (full text, mbox, link).


Notification sent to <kai@khms.westfalen.de>:
Bug acknowledged by developer. (full text, mbox, link).


Message #15 received at 25017-done@bugs.debian.org (full text, mbox, reply):

From: Ben Collins <bcollins@debian.org>
To: 25017-done@bugs.debian.org
Subject: review of this bug report
Date: Fri, 5 Jan 2001 15:22:36 -0500
I reviewed your bug report and have concluded that you were confusing
two different defines. The XOPEN Curses spec talks about
_XOPEN_SOURCE_EXTENDED, which glibc uses _XOPEN_EXTENDED_SOURCE. The
latter is an internal glibc implementation for when to make certain
functions visible to source code including it, and not part of any
particular spec.

Ben

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'



Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 24 12:45:17 2024; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.