mirror of
https://github.com/jedisct1/libsodium.git
synced 2024-12-24 04:25:10 -07:00
Remove all use of booleans. Because MSVC < 2013. Sigh.
This commit is contained in:
parent
390f9acc1d
commit
f9aff06dc0
@ -228,6 +228,3 @@ endif
|
||||
|
||||
SUBDIRS = \
|
||||
include
|
||||
|
||||
EXTRA_DIST = \
|
||||
quirks/windows/stdbool.h
|
||||
|
@ -1,18 +0,0 @@
|
||||
|
||||
#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
|
@ -8,7 +8,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -46,7 +45,7 @@ typedef struct Salsa20Random_ {
|
||||
HCRYPTPROV hcrypt_prov;
|
||||
#endif
|
||||
int random_data_source_fd;
|
||||
bool initialized;
|
||||
int initialized;
|
||||
} Salsa20Random;
|
||||
|
||||
static Salsa20Random stream = {
|
||||
|
@ -8,7 +8,6 @@
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -31,7 +30,7 @@ typedef struct SysRandom_ {
|
||||
HCRYPTPROV hcrypt_prov;
|
||||
#endif
|
||||
int random_data_source_fd;
|
||||
bool initialized;
|
||||
int initialized;
|
||||
} SysRandom;
|
||||
|
||||
static SysRandom stream = {
|
||||
|
@ -1,11 +1,9 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "core.h"
|
||||
#include "crypto_onetimeauth.h"
|
||||
#include "randombytes.h"
|
||||
|
||||
static bool initialized;
|
||||
static int initialized;
|
||||
|
||||
int
|
||||
sodium_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user