This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: sysdeps/unix/sysv/linux/mq_* uses NULL but doesn't include appropriate headers?
- From: Jakub Jelinek <jakub at redhat dot com>
- To: "Carlos O'Donell" <carlos at baldric dot uwo dot ca>
- Cc: libc-alpha <libc-alpha at sources dot redhat dot com>
- Date: Thu, 29 Apr 2004 06:38:23 +0200
- Subject: Re: sysdeps/unix/sysv/linux/mq_* uses NULL but doesn't include appropriate headers?
- References: <20040429062832.GA3417@baldric.uwo.ca>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Thu, Apr 29, 2004 at 02:28:32AM -0400, Carlos O'Donell wrote:
>
> 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.
All the sources include sysdep.h, which on most of the architectures
includes indirectly stddef.h (any arch with tls support (even with
--without-tls) includes tls.h from <sysdep.h> which in turn
includes <stddef.h>), which is why nobody noticed this.
The patch is fine (well, maybe you can put the headers before sysdep.h,
so that they are kept sorted).
> 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.
Jakub