refactor: rename WINDOWS_ENABLED into WIN32_ENABLED
This commit is contained in:
parent
0c5a88c192
commit
fe5c8bcdcb
|
@ -175,7 +175,7 @@ cahute_detect_serial(
|
|||
free(fullbuf);
|
||||
#endif
|
||||
|
||||
#if WINDOWS_ENABLED
|
||||
#if WIN32_ENABLED
|
||||
# define SERIAL_COMM_HKEY "HARDWARE\\DEVICEMAP\\SERIALCOMM"
|
||||
cahute_serial_detection_entry entry;
|
||||
char value[1024];
|
||||
|
|
|
@ -35,14 +35,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#if defined(_WIN16) || defined(_WIN32) || defined(_WIN64) \
|
||||
|| defined(__WINDOWS__)
|
||||
# define WINDOWS_ENABLED 1
|
||||
#if defined(_WIN32) || defined(_WIN64) || defined(__WINDOWS__)
|
||||
# define WIN32_ENABLED 1
|
||||
#else
|
||||
# define WINDOWS_ENABLED 0
|
||||
# define WIN32_ENABLED 0
|
||||
#endif
|
||||
|
||||
#if WINDOWS_ENABLED
|
||||
#if WIN32_ENABLED
|
||||
# define POSIX_ENABLED 0
|
||||
#elif defined(__unix__) && __unix__ \
|
||||
|| (defined(__APPLE__) || defined(__MACH__))
|
||||
|
@ -111,7 +110,7 @@ cahute_log_memory(
|
|||
return CAHUTE_ERROR_IMPL /* Comment to prevent match by hook. */; \
|
||||
}
|
||||
|
||||
#if WINDOWS_ENABLED
|
||||
#if WIN32_ENABLED
|
||||
/**
|
||||
* Log a Windows API error.
|
||||
*
|
||||
|
@ -166,7 +165,7 @@ CAHUTE_INLINE(void) log_windows_error(char const *func_name, DWORD code) {
|
|||
#if POSIX_ENABLED
|
||||
# define CAHUTE_LINK_MEDIUM_POSIX_SERIAL 1
|
||||
#endif
|
||||
#if WINDOWS_ENABLED
|
||||
#if WIN32_ENABLED
|
||||
# define CAHUTE_LINK_MEDIUM_WIN32_SERIAL 2
|
||||
# define CAHUTE_LINK_MEDIUM_WIN32_CESG 3
|
||||
#endif
|
||||
|
|
|
@ -389,7 +389,7 @@ CAHUTE_LOCAL(int) deinitialize_link_protocol(cahute_link *link) {
|
|||
return CAHUTE_OK;
|
||||
}
|
||||
|
||||
#if WINDOWS_ENABLED
|
||||
#if WIN32_ENABLED
|
||||
# include <initguid.h>
|
||||
# include <cfgmgr32.h>
|
||||
# include <usbiodef.h>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
#include "internals.h"
|
||||
|
||||
#if WINDOWS_ENABLED
|
||||
#if WIN32_ENABLED
|
||||
# include <windows.h>
|
||||
|
||||
CAHUTE_EXTERN(int) cahute_sleep(unsigned long ms) {
|
||||
|
|
Loading…
Reference in New Issue