[10119] in Athena Bugs
decmips 7.4G:
daemon@ATHENA.MIT.EDU (bert@Athena.MIT.EDU)
Tue Dec 8 13:14:06 1992
From: bert@Athena.MIT.EDU
To: bugs@Athena.MIT.EDU
Date: Tue, 08 Dec 92 13:13:56 EST
System name: hodge
Type and version: KN01 7.4G (2 update(s) to same version)
Display type: PMAX-MFB
What were you trying to do?
#include <X11/Intrinsic.h>
What's wrong:
<X11/Intrinsic> causes <stddef.h> and <string.h> to be included.
<stddef.h> checks if NULL is defined and define it if it isn't.
<string.h> just defines NULL. This is *wrong*, and will cause some
compilers to spew warnings.
There is no way of controlling the inclusion of the files.
What should have happened:
<string.h>/<strings.h> should be POSIX compliant and consistent
with the rest of the universe, and check if NULL is precviously
defined:
#ifndef NULL
#define NULL 0
#endif
Also, embedding the whole file in
#ifndef __STRINGS_H
#define __STRINGS_H
...
#endif
would make it more civilized (although the contents
can safely be #include'd multiple times).
Please describe any relevant documentation references:
POSIX and ANSI C standard documents