[m-dev.] cleanup of runtime/*

Fergus Henderson fjh at cs.mu.oz.au
Mon Feb 10 13:25:24 AEDT 1997


Bert Thompson, you wrote:
> 
> Here are my suggestions:
> 
> - Using #include <...> rather than #include "..." is preferable since
>   it means the directory hierarchies can be rearranged without to
>   much pain. (This is general point and not relevant to your changes.)

I don't believe this is correct in general.  At least with gcc the `-I'
options apply to #include "..." as well as to #include <...>.
I find it useful to syntactically separate system header files from
user header files, so I think we should continue to use <...>
for system header files and "..." for user header files.

> - Should add typedefs for ulong, uchar, ushort, uint to std.h since 
>   they are well-established C idioms.

Actually that's a bad idea.  We used to use `uint', but it caused
portability problems.  See the following old log message from July 1995:

	runtime/{memory.c,wrapper.h,wrapper.mod}:
		Use `unsigned' rather than `uint', since `uint' requires
		<sys/types.h> and !defined(_POSIX_C_SOURCE), which would
		reduce portability.

Adding uint to std.h would reduce portability the other way around:
if <sys/types.h> were included, and _POSIX_C_SOURCE was not defined,
then the typedefs in <sys/types.h> and "std.h" would conflict.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3         |     -- the last words of T. S. Garp.



More information about the developers mailing list