1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-22 17:39:53 +03:00

Mayaqua/MayaType.h: define our types to the ones from <stdint.h> on non-Windows

This commit is contained in:
Davide Beatrici 2020-08-15 09:12:12 +02:00
parent 09f24e46b3
commit 61ccaed4f6

View File

@ -8,6 +8,8 @@
#ifndef MAYATYPE_H #ifndef MAYATYPE_H
#define MAYATYPE_H #define MAYATYPE_H
#include <stdint.h>
// Check whether the windows.h header is included // Check whether the windows.h header is included
#ifndef WINDOWS_H #ifndef WINDOWS_H
#ifdef _WINDOWS_ #ifdef _WINDOWS_
@ -15,7 +17,6 @@
#endif // _WINDOWS_ #endif // _WINDOWS_
#endif // WINDOWS_H #endif // WINDOWS_H
#if !defined(ENCRYPT_C) #if !defined(ENCRYPT_C)
// Structure which is used by OpenSSL // Structure which is used by OpenSSL
typedef struct x509_st X509; typedef struct x509_st X509;
@ -171,32 +172,28 @@ typedef int PID;
typedef unsigned long PID; typedef unsigned long PID;
#endif // WINDOWS_H #endif // WINDOWS_H
// bool type // TODO: include <stdbool.h> instead of manually defining type
#ifndef WIN32COM_CPP #ifndef WIN32COM_CPP
typedef unsigned int bool; typedef unsigned int bool;
#define true 1 #define true 1
#define false 0 #define false 0
#endif // WIN32COM_CPP #endif // WIN32COM_CPP
// 32bit integer type typedef int64_t time_64t;
#ifndef WINDOWS_H
typedef unsigned int UINT; #ifndef _BASETSD_H_
typedef signed int INT; typedef int32_t INT;
typedef int64_t INT64;
typedef uint32_t UINT;
typedef uint64_t UINT64;
#endif #endif
// 16bit integer type #ifndef BASETYPES
typedef unsigned short USHORT; typedef uint8_t BYTE;
typedef uint8_t UCHAR;
// 8bit integer type typedef uint16_t USHORT;
typedef unsigned char BYTE; #endif
typedef unsigned char UCHAR;
// 64-bit integer type
typedef unsigned long long UINT64;
typedef signed long long INT64;
typedef signed long long time_64t;
#ifdef OS_UNIX #ifdef OS_UNIX
// Avoiding compile error // Avoiding compile error