stddef.h & ptrdiff_t summary
| From: | Yasuo Ohgaki | Date: | Mon, 18 Mar 2002 03:28:15 +0000 |
| Subject: | stddef.h & ptrdiff_t summary | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-10317@lists.php.net to get a copy of this message | ||
Hi all,
I did a little research on this. Conclusion are:
---------------
stddef.h is defined in C89. Therefore, it's ANSI C
compliant. (Accoding to Jim)
Older BSD had broken ANSI C support for stddef.h
(and other standard headers) Therefore, use of stddef.h
was not portable used to be. That's the reason why some
open source projects does not use stddef.h's ptrdiff_t.
My books and broken BSD mislead me stddef.h is not part
of ANSI C standard :(
Current code should be ok. User should use ANSI C
complaint C compiler to compile PHP.
We might want to let PHP fail to confiure if stddef.h
is not available to avoid bug reports.
For example, some linux distro may not have stddef.h,
unless user installs kernel headers.
------------------
Anyway, thanks to Jim, my long time curiousty about
stddef.h is resolved finally :)
BTW, I don't know how old BSD is broken, since
I'm not BSD user.
--
Yasuo Ohgaki