summaryrefslogtreecommitdiff
path: root/include/inttypes.h
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2022-07-31 01:27:32 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2022-07-31 01:27:32 +0000
commit0357f59313c04f71c6e63cec724ddfdc29ea51b2 (patch)
tree52cb98c357c819e78b85be6e70e19733db847736 /include/inttypes.h
parentc657b4527f71e16864c8f6155d67241d2c4dfbef (diff)
POSIX 2008 TC2 requires <inttypes.h> to provide wchar_t
ok kettenis@ espie@
Diffstat (limited to 'include/inttypes.h')
-rw-r--r--include/inttypes.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/inttypes.h b/include/inttypes.h
index b8f45071bbb..4f604e94f95 100644
--- a/include/inttypes.h
+++ b/include/inttypes.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: inttypes.h,v 1.13 2019/01/25 00:19:25 millert Exp $ */
+/* $OpenBSD: inttypes.h,v 1.14 2022/07/31 01:27:31 guenther Exp $ */
/*
* Copyright (c) 1997, 2005 Todd C. Miller <millert@openbsd.org>
@@ -23,6 +23,9 @@
#ifdef __cplusplus
#define __wchar_t wchar_t
+#elif __POSIX_VISIBLE >= 200809 && !defined(_WCHAR_T_DEFINED_)
+#define _WCHAR_T_DEFINED_
+typedef __wchar_t wchar_t;
#endif
/*