mirror of
https://github.com/SoftEtherVPN/SoftEtherVPN.git
synced 2025-07-06 15:54:57 +03:00
Use bool from stdbool.h, get rid of BOOL
BOOL was just an alias for bool, this commit replaces all instances of it for consistency.
For some reason bool was defined as a 4-byte integer instead of a 1-byte one, presumably to match WinAPI's definition: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types
Nothing should break now that bool is 1-byte, as no protocol code appears to be relying on the size of the data type.
PACK, for example, explicitly stores boolean values as 4-byte integers.
This commit can be seen as a follow-up to 61ccaed4f6
.
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
#ifndef MAYATYPE_H
|
||||
#define MAYATYPE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// Check whether the windows.h header is included
|
||||
@ -172,13 +173,6 @@ typedef int PID;
|
||||
typedef unsigned long PID;
|
||||
#endif // WINDOWS_H
|
||||
|
||||
// TODO: include <stdbool.h> instead of manually defining type
|
||||
#ifndef WIN32COM_CPP
|
||||
typedef unsigned int bool;
|
||||
#define true 1
|
||||
#define false 0
|
||||
#endif // WIN32COM_CPP
|
||||
|
||||
typedef int64_t time_64t;
|
||||
|
||||
#ifndef _BASETSD_H_
|
||||
|
Reference in New Issue
Block a user