Date: Thu, 5 May 2011 14:45:25 +0000 (UTC) From: "David E. O'Brien" <obrien@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r221502 - in head: lib/libutil sys/sys Message-ID: <201105051445.p45EjPL2004080@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: obrien Date: Thu May 5 14:45:24 2011 New Revision: 221502 URL: http://svn.freebsd.org/changeset/base/221502 Log: Don't duplicate define the stdint types. Added: head/sys/sys/_stdint.h - copied, changed from r221139, head/sys/sys/stdint.h Modified: head/lib/libutil/libutil.h head/sys/sys/stdint.h head/sys/sys/types.h Modified: head/lib/libutil/libutil.h ============================================================================== --- head/lib/libutil/libutil.h Thu May 5 14:43:35 2011 (r221501) +++ head/lib/libutil/libutil.h Thu May 5 14:45:24 2011 (r221502) @@ -41,22 +41,13 @@ #include <sys/cdefs.h> #include <sys/_types.h> +#include <sys/_stdint.h> #ifndef _GID_T_DECLARED typedef __gid_t gid_t; #define _GID_T_DECLARED #endif -#ifndef _INT64_T_DECLARED -typedef __int64_t int64_t; -#define _INT64_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif - #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED Copied and modified: head/sys/sys/_stdint.h (from r221139, head/sys/sys/stdint.h) ============================================================================== --- head/sys/sys/stdint.h Wed Apr 27 20:42:30 2011 (r221139, copy source) +++ head/sys/sys/_stdint.h Thu May 5 14:45:24 2011 (r221502) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2011 David E. O'Brien <obrien@FreeBSD.org> * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> * All rights reserved. * @@ -26,13 +27,8 @@ * $FreeBSD$ */ -#ifndef _SYS_STDINT_H_ -#define _SYS_STDINT_H_ - -#include <sys/cdefs.h> -#include <sys/_types.h> - -#include <machine/_stdint.h> +#ifndef _SYS__STDINT_H_ +#define _SYS__STDINT_H_ #ifndef _INT8_T_DECLARED typedef __int8_t int8_t; @@ -74,33 +70,13 @@ typedef __uint64_t uint64_t; #define _UINT64_T_DECLARED #endif -typedef __int_least8_t int_least8_t; -typedef __int_least16_t int_least16_t; -typedef __int_least32_t int_least32_t; -typedef __int_least64_t int_least64_t; - -typedef __uint_least8_t uint_least8_t; -typedef __uint_least16_t uint_least16_t; -typedef __uint_least32_t uint_least32_t; -typedef __uint_least64_t uint_least64_t; - -typedef __int_fast8_t int_fast8_t; -typedef __int_fast16_t int_fast16_t; -typedef __int_fast32_t int_fast32_t; -typedef __int_fast64_t int_fast64_t; - -typedef __uint_fast8_t uint_fast8_t; -typedef __uint_fast16_t uint_fast16_t; -typedef __uint_fast32_t uint_fast32_t; -typedef __uint_fast64_t uint_fast64_t; - -typedef __intmax_t intmax_t; -typedef __uintmax_t uintmax_t; - #ifndef _INTPTR_T_DECLARED typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; #define _INTPTR_T_DECLARED #endif +#ifndef _UINTPTR_T_DECLARED +typedef __uintptr_t uintptr_t; +#define _UINTPTR_T_DECLARED +#endif -#endif /* !_SYS_STDINT_H_ */ +#endif /* !_SYS__STDINT_H_ */ Modified: head/sys/sys/stdint.h ============================================================================== --- head/sys/sys/stdint.h Thu May 5 14:43:35 2011 (r221501) +++ head/sys/sys/stdint.h Thu May 5 14:45:24 2011 (r221502) @@ -33,46 +33,7 @@ #include <sys/_types.h> #include <machine/_stdint.h> - -#ifndef _INT8_T_DECLARED -typedef __int8_t int8_t; -#define _INT8_T_DECLARED -#endif - -#ifndef _INT16_T_DECLARED -typedef __int16_t int16_t; -#define _INT16_T_DECLARED -#endif - -#ifndef _INT32_T_DECLARED -typedef __int32_t int32_t; -#define _INT32_T_DECLARED -#endif - -#ifndef _INT64_T_DECLARED -typedef __int64_t int64_t; -#define _INT64_T_DECLARED -#endif - -#ifndef _UINT8_T_DECLARED -typedef __uint8_t uint8_t; -#define _UINT8_T_DECLARED -#endif - -#ifndef _UINT16_T_DECLARED -typedef __uint16_t uint16_t; -#define _UINT16_T_DECLARED -#endif - -#ifndef _UINT32_T_DECLARED -typedef __uint32_t uint32_t; -#define _UINT32_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif +#include <sys/_stdint.h> typedef __int_least8_t int_least8_t; typedef __int_least16_t int_least16_t; @@ -94,13 +55,13 @@ typedef __uint_fast16_t uint_fast16_t; typedef __uint_fast32_t uint_fast32_t; typedef __uint_fast64_t uint_fast64_t; +#ifndef _INTMAX_T_DECLARED typedef __intmax_t intmax_t; +#define _INTMAX_T_DECLARED +#endif +#ifndef _UINTMAX_T_DECLARED typedef __uintmax_t uintmax_t; - -#ifndef _INTPTR_T_DECLARED -typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; -#define _INTPTR_T_DECLARED +#define _UINTMAX_T_DECLARED #endif #endif /* !_SYS_STDINT_H_ */ Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Thu May 5 14:43:35 2011 (r221501) +++ head/sys/sys/types.h Thu May 5 14:45:24 2011 (r221502) @@ -60,51 +60,7 @@ typedef unsigned int uint; /* Sys V com /* * XXX POSIX sized integrals that should appear only in <sys/stdint.h>. */ -#ifndef _INT8_T_DECLARED -typedef __int8_t int8_t; -#define _INT8_T_DECLARED -#endif - -#ifndef _INT16_T_DECLARED -typedef __int16_t int16_t; -#define _INT16_T_DECLARED -#endif - -#ifndef _INT32_T_DECLARED -typedef __int32_t int32_t; -#define _INT32_T_DECLARED -#endif - -#ifndef _INT64_T_DECLARED -typedef __int64_t int64_t; -#define _INT64_T_DECLARED -#endif - -#ifndef _UINT8_T_DECLARED -typedef __uint8_t uint8_t; -#define _UINT8_T_DECLARED -#endif - -#ifndef _UINT16_T_DECLARED -typedef __uint16_t uint16_t; -#define _UINT16_T_DECLARED -#endif - -#ifndef _UINT32_T_DECLARED -typedef __uint32_t uint32_t; -#define _UINT32_T_DECLARED -#endif - -#ifndef _UINT64_T_DECLARED -typedef __uint64_t uint64_t; -#define _UINT64_T_DECLARED -#endif - -#ifndef _INTPTR_T_DECLARED -typedef __intptr_t intptr_t; -typedef __uintptr_t uintptr_t; -#define _INTPTR_T_DECLARED -#endif +#include <sys/_stdint.h> typedef __uint8_t u_int8_t; /* unsigned integrals (deprecated) */ typedef __uint16_t u_int16_t;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201105051445.p45EjPL2004080>