diff options
author | 2024-11-28 18:37:11 +0100 | |
---|---|---|
committer | 2024-11-29 04:26:16 +0100 | |
commit | cdede2b53effd8cb63f32606e93070091149c0af (patch) | |
tree | 6bf583f3c3f8639b02e7ced78f0e3948133763e0 /src/libusbmuxd.c | |
parent | dd0d0d4290b8db21397d817d34aab83cf21f07b2 (diff) | |
download | libusbmuxd-cdede2b53effd8cb63f32606e93070091149c0af.tar.gz libusbmuxd-cdede2b53effd8cb63f32606e93070091149c0af.tar.bz2 |
Change WIN32 to _WIN32
Diffstat (limited to 'src/libusbmuxd.c')
-rw-r--r-- | src/libusbmuxd.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/libusbmuxd.c b/src/libusbmuxd.c index 8329bef..0c30e3c 100644 --- a/src/libusbmuxd.c +++ b/src/libusbmuxd.c @@ -51,16 +51,15 @@ #define ECONNREFUSED 107 #endif -#include <unistd.h> -#include <signal.h> - -#ifdef WIN32 +#ifdef _WIN32 #include <winsock2.h> #include <windows.h> #ifndef HAVE_SLEEP #define sleep(x) Sleep(x*1000) #endif #else +#include <unistd.h> +#include <signal.h> #include <sys/socket.h> #include <arpa/inet.h> #if defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME) && !defined(HAVE_PROGRAM_INVOCATION_SHORT_NAME_ERRNO_H) @@ -164,7 +163,7 @@ static int connect_usbmuxd_socket() char *usbmuxd_socket_addr = getenv("USBMUXD_SOCKET_ADDRESS"); if (usbmuxd_socket_addr) { if (strncmp(usbmuxd_socket_addr, "UNIX:", 5) == 0) { -#if defined(WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) /* not supported, ignore */ #else if (usbmuxd_socket_addr[5] != '\0') { @@ -215,7 +214,7 @@ static int connect_usbmuxd_socket() } } } -#if defined(WIN32) || defined(__CYGWIN__) +#if defined(_WIN32) || defined(__CYGWIN__) res = socket_connect("127.0.0.1", USBMUXD_SOCKET_PORT); #else res = socket_connect_unix(USBMUXD_SOCKET_FILE); @@ -660,7 +659,7 @@ static void get_prog_name() if (pname) { prog_name = strdup(pname); } -#elif defined (WIN32) +#elif defined (_WIN32) TCHAR *_pname = malloc((MAX_PATH+1) * sizeof(TCHAR)); if (GetModuleFileName(NULL, _pname, MAX_PATH+1) > 0) { char* pname = NULL; |