This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
sysdeps/unix/sysv/linux/mq_* uses NULL but doesn't include appropriate headers?
- From: Carlos O'Donell <carlos at baldric dot uwo dot ca>
- To: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Thu, 29 Apr 2004 02:28:32 -0400
- Subject: sysdeps/unix/sysv/linux/mq_* uses NULL but doesn't include appropriate headers?
libc-alpha,
A number of the mq_* functions use NULL, but I don't see where they
include the standard definitions for NULL. I can work around it by
including stddef.h or some other file that includes a definition for
NULL. What's the course of action here?
Do we have something fundamentally wrong with our system headers?
I can correct the build on hppa with the following patches.
c.
2004-04-28 Carlos O'Donell <carlos@baldric.uwo.ca>
* sysdeps/unix/sysv/linux/mq_getattr.c: Include stddef.h.
* sysdeps/unix/sysv/linux/mq_notify.c: Likewise.
* sysdeps/unix/sysv/linux/mq_open.c: Likewise.
* sysdeps/unix/sysv/linux/mq_receive.c: Likewise.
* sysdeps/unix/sysv/linux/mq_send.c: Likewise.
Index: sysdeps/unix/sysv/linux/mq_getattr.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mq_getattr.c,v
retrieving revision 1.1
diff -u -p -r1.1 mq_getattr.c
--- sysdeps/unix/sysv/linux/mq_getattr.c 13 Apr 2004 02:12:57 -0000 1.1
+++ sysdeps/unix/sysv/linux/mq_getattr.c 28 Apr 2004 23:31:05 -0000
@@ -19,6 +19,7 @@
#include <errno.h>
#include <mqueue.h>
#include <sysdep.h>
+#include <stddef.h>
#ifdef __NR_mq_getsetattr
Index: sysdeps/unix/sysv/linux/mq_notify.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mq_notify.c,v
retrieving revision 1.1
diff -u -p -r1.1 mq_notify.c
--- sysdeps/unix/sysv/linux/mq_notify.c 13 Apr 2004 02:13:08 -0000 1.1
+++ sysdeps/unix/sysv/linux/mq_notify.c 28 Apr 2004 23:31:05 -0000
@@ -19,6 +19,7 @@
#include <errno.h>
#include <mqueue.h>
#include <sysdep.h>
+#include <stddef.h>
#ifdef __NR_mq_notify
Index: sysdeps/unix/sysv/linux/mq_open.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mq_open.c,v
retrieving revision 1.1
diff -u -p -r1.1 mq_open.c
--- sysdeps/unix/sysv/linux/mq_open.c 13 Apr 2004 02:13:20 -0000 1.1
+++ sysdeps/unix/sysv/linux/mq_open.c 28 Apr 2004 23:31:05 -0000
@@ -20,6 +20,7 @@
#include <mqueue.h>
#include <stdarg.h>
#include <sysdep.h>
+#include <stddef.h>
#ifdef __NR_mq_open
Index: sysdeps/unix/sysv/linux/mq_receive.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mq_receive.c,v
retrieving revision 1.1
diff -u -p -r1.1 mq_receive.c
--- sysdeps/unix/sysv/linux/mq_receive.c 13 Apr 2004 02:13:32 -0000 1.1
+++ sysdeps/unix/sysv/linux/mq_receive.c 28 Apr 2004 23:31:05 -0000
@@ -19,6 +19,7 @@
#include <errno.h>
#include <mqueue.h>
#include <sysdep.h>
+#include <stddef.h>
#ifdef __NR_mq_timedreceive
Index: sysdeps/unix/sysv/linux/mq_send.c
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/mq_send.c,v
retrieving revision 1.1
diff -u -p -r1.1 mq_send.c
--- sysdeps/unix/sysv/linux/mq_send.c 13 Apr 2004 02:13:45 -0000 1.1
+++ sysdeps/unix/sysv/linux/mq_send.c 28 Apr 2004 23:31:05 -0000
@@ -19,6 +19,7 @@
#include <errno.h>
#include <mqueue.h>
#include <sysdep.h>
+#include <stddef.h>
#ifdef __NR_mq_timedsend