diff options
author | 2013-06-11 15:59:16 +0000 | |
---|---|---|
committer | 2013-06-11 15:59:16 +0000 | |
commit | 35bdce9da0d39b7fb19ed08e222d4b96829c54e8 (patch) | |
tree | 4686bc9d41e8d09dc543616af85e9b95894e99ce | |
parent | replace bcopy with memcpy in m_defrag. this is safe because the (diff) | |
download | wireguard-openbsd-35bdce9da0d39b7fb19ed08e222d4b96829c54e8.tar.xz wireguard-openbsd-35bdce9da0d39b7fb19ed08e222d4b96829c54e8.zip |
Contrary to C99's advice, C++ TR1 and C++ 11 require that <inttypes.h>
and <stdint.h> should unconditionally define all of their macros
regardless of whether the __STDC_*_MACROS macros are defined.
ok guenther, espie
bulk build tested by landry
-rw-r--r-- | include/inttypes.h | 5 | ||||
-rw-r--r-- | sys/sys/stdint.h | 8 |
2 files changed, 2 insertions, 11 deletions
diff --git a/include/inttypes.h b/include/inttypes.h index 8e26c3bf891..2b410419590 100644 --- a/include/inttypes.h +++ b/include/inttypes.h @@ -1,4 +1,4 @@ -/* $OpenBSD: inttypes.h,v 1.10 2009/01/13 18:13:51 kettenis Exp $ */ +/* $OpenBSD: inttypes.h,v 1.11 2013/06/11 15:59:16 matthew Exp $ */ /* * Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com> @@ -25,7 +25,6 @@ #define __wchar_t wchar_t #endif -#if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) /* * 7.8.1 Macros for format specifiers * @@ -244,8 +243,6 @@ #define SCNxMAX "jx" /* uintmax_t */ #define SCNxPTR "lx" /* uintptr_t */ -#endif /* __cplusplus || __STDC_FORMAT_MACROS */ - typedef struct { intmax_t quot; /* quotient */ intmax_t rem; /* remainder */ diff --git a/sys/sys/stdint.h b/sys/sys/stdint.h index 683d58e0246..a184b978d62 100644 --- a/sys/sys/stdint.h +++ b/sys/sys/stdint.h @@ -1,4 +1,4 @@ -/* $OpenBSD: stdint.h,v 1.7 2012/01/05 20:37:50 kettenis Exp $ */ +/* $OpenBSD: stdint.h,v 1.8 2013/06/11 15:59:16 matthew Exp $ */ /* * Copyright (c) 1997, 2005 Todd C. Miller <Todd.Miller@courtesan.com> @@ -95,7 +95,6 @@ typedef __uintptr_t uintptr_t; typedef __intmax_t intmax_t; typedef __uintmax_t uintmax_t; -#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) /* * 7.18.2 Limits of specified-width integer types. * @@ -200,9 +199,6 @@ typedef __uintmax_t uintmax_t; #define WINT_MIN INT32_MIN #define WINT_MAX INT32_MAX -#endif /* __cplusplus || __STDC_LIMIT_MACROS */ - -#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) /* * 7.18.4 Macros for integer constants. * @@ -228,6 +224,4 @@ typedef __uintmax_t uintmax_t; #define INTMAX_C(_c) __CONCAT(_c, LL) #define UINTMAX_C(_c) __CONCAT(_c, ULL) -#endif /* __cplusplus || __STDC_CONSTANT_MACROS */ - #endif /* _SYS_STDINT_H_ */ |