tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Definitions of types also as macros



I wanna do this, looks good?

Index: stdint.h
===================================================================
RCS file: /cvsroot/src/sys/sys/stdint.h,v
retrieving revision 1.7
diff -u -r1.7 stdint.h
--- stdint.h	22 Apr 2013 21:26:48 -0000	1.7
+++ stdint.h	4 Nov 2018 09:35:54 -0000
@@ -35,54 +35,54 @@
 #include <sys/cdefs.h>
 #include <machine/int_types.h>
 
-#ifndef	int8_t
+#ifndef	_BSD_INT8_T_
 typedef	__int8_t	int8_t;
-#define	int8_t		__int8_t
+#define	_BSD_INT8_T_
 #endif
 
-#ifndef	uint8_t
+#ifndef	_BSD_UINT8_T_
 typedef	__uint8_t	uint8_t;
-#define	uint8_t		__uint8_t
+#define	_BSD_UINT8_T_
 #endif
 
-#ifndef	int16_t
+#ifndef	_BSD_INT16_T_
 typedef	__int16_t	int16_t;
-#define	int16_t		__int16_t
+#define	_BSD_INT16_T_
 #endif
 
-#ifndef	uint16_t
+#ifndef	_BSD_UINT16_T_
 typedef	__uint16_t	uint16_t;
-#define	uint16_t	__uint16_t
+#define	_BSD_UINT16_T_
 #endif
 
-#ifndef	int32_t
+#ifndef	_BSD_INT32_T_
 typedef	__int32_t	int32_t;
-#define	int32_t		__int32_t
+#define	_BSD_INT32_T_
 #endif
 
-#ifndef	uint32_t
+#ifndef	_BSD_UINT32_T_
 typedef	__uint32_t	uint32_t;
-#define	uint32_t	__uint32_t
+#define	_BSD_UINT32_T_
 #endif
 
-#ifndef	int64_t
+#ifndef	_BSD_INT64_T_
 typedef	__int64_t	int64_t;
-#define	int64_t		__int64_t
+#define	_BSD_INT64_T_
 #endif
 
-#ifndef	uint64_t
+#ifndef	_BSD_UINT64_T_
 typedef	__uint64_t	uint64_t;
-#define	uint64_t	__uint64_t
+#define	_BSD_UINT64_T_
 #endif
 
-#ifndef	intptr_t
+#ifndef	_BSD_INTPTR_T_
 typedef	__intptr_t	intptr_t;
-#define	intptr_t	__intptr_t
+#define	_BSD_INTPTR_T_
 #endif
 
-#ifndef	uintptr_t
+#ifndef	_BSD_UINTPTR_T_
 typedef	__uintptr_t	uintptr_t;
-#define	uintptr_t	__uintptr_t
+#define	_BSD_UINTPTR_T_
 #endif
 
 #include <machine/int_mwgwtypes.h>
Index: types.h
===================================================================
RCS file: /cvsroot/src/sys/sys/types.h,v
retrieving revision 1.101
diff -u -r1.101 types.h
--- types.h	10 Jul 2018 07:40:42 -0000	1.101
+++ types.h	4 Nov 2018 09:35:54 -0000
@@ -50,44 +50,44 @@
 
 #include <sys/ansi.h>
 
-#ifndef	int8_t
+#ifndef	_BSD_INT8_T_
 typedef	__int8_t	int8_t;
-#define	int8_t		__int8_t
+#define	_BSD_INT8_T_
 #endif
 
-#ifndef	uint8_t
+#ifndef	_BSD_UINT8_T_
 typedef	__uint8_t	uint8_t;
-#define	uint8_t		__uint8_t
+#define	_BSD_UINT8_T_
 #endif
 
-#ifndef	int16_t
+#ifndef	_BSD_INT16_T_
 typedef	__int16_t	int16_t;
-#define	int16_t		__int16_t
+#define	_BSD_INT16_T_
 #endif
 
-#ifndef	uint16_t
+#ifndef	_BSD_UINT16_T_
 typedef	__uint16_t	uint16_t;
-#define	uint16_t	__uint16_t
+#define	_BSD_UINT16_T_
 #endif
 
-#ifndef	int32_t
+#ifndef	_BSD_INT32_T_
 typedef	__int32_t	int32_t;
-#define	int32_t		__int32_t
+#define	_BSD_INT32_T_
 #endif
 
-#ifndef	uint32_t
+#ifndef	_BSD_UINT32_T_
 typedef	__uint32_t	uint32_t;
-#define	uint32_t	__uint32_t
+#define	_BSD_UINT32_T_
 #endif
 
-#ifndef	int64_t
+#ifndef	_BSD_INT64_T_
 typedef	__int64_t	int64_t;
-#define	int64_t		__int64_t
+#define	_BSD_INT64_T_
 #endif
 
-#ifndef	uint64_t
+#ifndef	_BSD_UINT64_T_
 typedef	__uint64_t	uint64_t;
-#define	uint64_t	__uint64_t
+#define	_BSD_UINT64_T_
 #endif
 
 typedef	uint8_t		u_int8_t;



Home | Main Index | Thread Index | Old Index