mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-25 08:37:13 +09:00
Add stdbool.h for old MSVC.
This commit is contained in:
@@ -228,3 +228,6 @@ endif
|
||||
|
||||
SUBDIRS = \
|
||||
include
|
||||
|
||||
EXTRA_DIST = \
|
||||
quirks/windows/stdbool.h
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
|
||||
#ifndef __STDBOOL_H__
|
||||
#define __STDBOOL_H__
|
||||
|
||||
#if defined(__cplusplus) || !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
|
||||
typedef signed char _Bool;
|
||||
# undef bool
|
||||
# define bool _Bool
|
||||
|
||||
# ifndef __bool_true_false_are_defined
|
||||
# undef false
|
||||
# define false 0
|
||||
# undef true
|
||||
# define true 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user