Package: manpages-dev
Version: 3.22-1
Severity: normal

When _XOPEN_SOURCE is defined the glibc headers no longer define MAP_ANON or
MAP_ANONYMOUS (because _BSD_SOURCE is no longer defined by default).

So if I want to  use both pread(2) and mmap(2) in same C source file,
I have to define both _XOPEN_SOURCE and _BSD_SOURCE to get the prototype
for pread *and* MAP_ANON for mmap(2).

The manpage of pread(2) does say that _XOPEN_SOURCE 500 is needed, but doesn't
say that this breaks mmap. mmap's manpage doesn't say that some constants
may not be available under _XOPEN_SOURCE.

Why is _XOPEN_SOURCE 500 even needed for pread? It is a POSIX function,
and defining _XOPEN_SOURCE is not needed for other POSIX functions.
Also the POSIX manpage for pread(3p) doesn't say that _XOPEN_SOURCE is needed,
so this seems like an unnecessary complication on Linux.
If pread(2) was available w/o _XOPEN_SOURCE being defined, then the problem
with using pread and mmap would no longer exist. I think this is rather a
question for glibc though.

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.30.4 (SMP w/4 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages manpages-dev depends on:
ii  manpages                      3.22-1     Manual pages about using a GNU/Lin

manpages-dev recommends no packages.

Versions of packages manpages-dev suggests:
ii  konqueror [man-browser]       4:4.3.0-1  KDE 4's advanced file manager, web
ii  man-db [man-browser]          2.5.5-3    on-line manual pager

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to