Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Jul 2011 18:26:57 +1000 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Kevin Lo <kevlo@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r223904 - head/lib/libstand
Message-ID:  <20110710181242.K2019@besplex.bde.org>
In-Reply-To: <201107100714.p6A7EXHZ034797@svn.freebsd.org>
References:  <201107100714.p6A7EXHZ034797@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110710181242.K2019>