Skip to content

Display and control your Android device

Regroup Windows-ifdefs in command.h

Romain Vimont6c40dbd27dbc
diff --git a/app/src/command.h b/app/src/command.h
index 98b3a881..6264adf4 100644
--- a/app/src/command.h
+++ b/app/src/command.h
@@ -3,33 +3,33 @@
#include <inttypes.h>
#include <SDL2/SDL_stdinc.h>
-#include <SDL2/SDL_platform.h>
-// <https://stackoverflow.com/a/44383330/1987178>
#ifdef _WIN32
+
+# include <winsock2.h> // not needed here, but must never be included AFTER windows.h
+# include <windows.h>
# define PRIexitcode "lu"
+// <https://stackoverflow.com/a/44383330/1987178>
# ifdef _WIN64
# define PRIsizet PRIu64
# else
# define PRIsizet PRIu32
# endif
-#else
-# define PRIsizet "zu"
-# define PRIexitcode "d"
-#endif
-
-#ifdef __WINDOWS__
-# include <winsock2.h> // not needed here, but must never be included AFTER windows.h
-# include <windows.h>
# define PROCESS_NONE NULL
typedef HANDLE process_t;
typedef DWORD exit_code_t;
+
#else
+
# include <sys/types.h>
+# define PRIsizet "zu"
+# define PRIexitcode "d"
# define PROCESS_NONE -1
typedef pid_t process_t;
typedef int exit_code_t;
+
#endif
+
# define NO_EXIT_CODE -1
enum process_result {