This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11093] New: <poll.h> does not define POLL[RD|WR]* macros with _POSIX_C_SOURCE="200809L"


As of POSIX.1-2008, the <poll.h> header was moved completely to the base
specification [1]. Therefore, a definition of _POSIX_C_SOURCE to 200809L alone
should be enough to get all definitions in <poll.h> specified by POSIX.1-2008.
Currently, however, the POLLRDNORM, POLLRDBAND, POLLWRNORM and POLLWRBAND depend
on _XOPEN_SOURCE.

Test program:

#define _POSIX_C_SOURCE 200809L

#include <poll.h>

int main (void)
{
	struct pollfd fds[] = {
		{
			.fd     = 0,
			.events = POLLIN | POLLRDNORM | POLLRDBAND
		},
		{
			.fd     = 1,
			.events = POLLOUT | POLLWRNORM | POLLWRBAND
		}
	};

	(void)fds;
}

[1] http://www.opengroup.org/onlinepubs/9699919799/basedefs/poll.h.html

-- 
           Summary: <poll.h> does not define POLL[RD|WR]* macros with
                    _POSIX_C_SOURCE="200809L"
           Product: glibc
           Version: 2.9
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: drepper at redhat dot com
        ReportedBy: andrey dot vihrov at gmail dot com
                CC: glibc-bugs at sources dot redhat dot com
 GCC build triplet: x86_64-pc-linux-gnu
  GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=11093

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]