svn commit: r223904 - head/lib/libstand

Bruce Evans brde at optusnet.com.au
Sun Jul 10 08:27:01 UTC 2011


On Sun, 10 Jul 2011, Kevin Lo wrote:

> Log:
>  style(9) cleanup
>
> Modified:
>  head/lib/libstand/zalloc_defs.h
>
> Modified: head/lib/libstand/zalloc_defs.h
> ==============================================================================
> --- head/lib/libstand/zalloc_defs.h	Sun Jul 10 06:57:00 2011	(r223903)
> +++ head/lib/libstand/zalloc_defs.h	Sun Jul 10 07:14:32 2011	(r223904)
> @@ -38,8 +38,8 @@
> #define DMALLOCDEBUG		/* add debugging code to gather stats */
> #define ZALLOCDEBUG
>
> -#include <string.h>
> #include <sys/stdint.h>
> +#include <string.h>
> #include "stand.h"
>
> typedef uintptr_t iaddr_t;	/* unsigned int same size as pointer	*/
>

It still uses a wrong path to stdint.h, sigh.  It needs to be a bit
careful to avoid any libc features, but there are unlikely to be any
in <stdint.h> and in practice there cannot be any since <stdint.h>
is just a like to <sys/stdint.h>.  Similarly for a few other includes,
especially in bzipfs.c.  There's a <sys/errno.h> instead of the standard
and in practice identical <errno.h>, and a <sys/fcntl.h>...  The only
other dubious <sys> includes in libstand are of <sys/dirent.h> and
<sys/unistd.h>.  For these, the standard includes are less obviously
correct since they are intentionally not just symlinks to the <sys>
ones.

It happens that the new order is still correct when there is no bogus
<sys> group of includes.  sys/stdint.h was also unsorted internally
(d was after r but should be before).

Bruce


More information about the svn-src-head mailing list