summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/afcclient.c18
-rw-r--r--tools/idevicebackup.c6
-rw-r--r--tools/idevicebackup2.c22
-rw-r--r--tools/idevicebtlogger.c4
-rw-r--r--tools/idevicecrashreport.c14
-rw-r--r--tools/idevicedate.c6
-rw-r--r--tools/idevicedebug.c4
-rw-r--r--tools/idevicedebugserverproxy.c4
-rw-r--r--tools/idevicedevmodectl.c6
-rw-r--r--tools/idevicediagnostics.c4
-rw-r--r--tools/ideviceenterrecovery.c4
-rw-r--r--tools/ideviceimagemounter.c4
-rw-r--r--tools/ideviceinfo.c4
-rw-r--r--tools/idevicename.c4
-rw-r--r--tools/idevicenotificationproxy.c4
-rw-r--r--tools/idevicepair.c6
-rw-r--r--tools/ideviceprovision.c6
-rw-r--r--tools/idevicescreenshot.c4
-rw-r--r--tools/idevicesyslog.c4
19 files changed, 64 insertions, 64 deletions
diff --git a/tools/afcclient.c b/tools/afcclient.c
index 8f49831..1c14bf2 100644
--- a/tools/afcclient.c
+++ b/tools/afcclient.c
@@ -39,7 +39,7 @@
39#include <dirent.h> 39#include <dirent.h>
40#include <time.h> 40#include <time.h>
41 41
42#ifdef WIN32 42#ifdef _WIN32
43#include <windows.h> 43#include <windows.h>
44#include <sys/time.h> 44#include <sys/time.h>
45#include <conio.h> 45#include <conio.h>
@@ -95,7 +95,7 @@ static size_t curdir_len = 0;
95static int file_exists(const char* path) 95static int file_exists(const char* path)
96{ 96{
97 struct stat tst; 97 struct stat tst;
98#ifdef WIN32 98#ifdef _WIN32
99 return (stat(path, &tst) == 0); 99 return (stat(path, &tst) == 0);
100#else 100#else
101 return (lstat(path, &tst) == 0); 101 return (lstat(path, &tst) == 0);
@@ -105,7 +105,7 @@ static int file_exists(const char* path)
105static int is_directory(const char* path) 105static int is_directory(const char* path)
106{ 106{
107 struct stat tst; 107 struct stat tst;
108#ifdef WIN32 108#ifdef _WIN32
109 return (stat(path, &tst) == 0) && S_ISDIR(tst.st_mode); 109 return (stat(path, &tst) == 0) && S_ISDIR(tst.st_mode);
110#else 110#else
111 return (lstat(path, &tst) == 0) && S_ISDIR(tst.st_mode); 111 return (lstat(path, &tst) == 0) && S_ISDIR(tst.st_mode);
@@ -138,7 +138,7 @@ static void print_usage(int argc, char **argv, int is_error)
138} 138}
139 139
140#ifndef HAVE_READLINE 140#ifndef HAVE_READLINE
141#ifdef WIN32 141#ifdef _WIN32
142#define BS_CC '\b' 142#define BS_CC '\b'
143#else 143#else
144#define BS_CC 0x7f 144#define BS_CC 0x7f
@@ -175,7 +175,7 @@ int stop_requested = 0;
175static void handle_signal(int sig) 175static void handle_signal(int sig)
176{ 176{
177 stop_requested++; 177 stop_requested++;
178#ifdef WIN32 178#ifdef _WIN32
179 GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0); 179 GenerateConsoleCtrlEvent(CTRL_C_EVENT, 0);
180#else 180#else
181 kill(getpid(), SIGINT); 181 kill(getpid(), SIGINT);
@@ -483,7 +483,7 @@ static void print_file_info(afc_client_t afc, const char* path, int list_verbose
483 printf(" "); 483 printf(" ");
484 printf("%10lld", (long long)st.st_size); 484 printf("%10lld", (long long)st.st_size);
485 printf(" "); 485 printf(" ");
486#ifdef WIN32 486#ifdef _WIN32
487 strftime(timebuf, 64, "%d %b %Y %H:%M:%S", localtime(&t)); 487 strftime(timebuf, 64, "%d %b %Y %H:%M:%S", localtime(&t));
488#else 488#else
489 strftime(timebuf, 64, "%d %h %Y %H:%M:%S", localtime(&t)); 489 strftime(timebuf, 64, "%d %h %Y %H:%M:%S", localtime(&t));
@@ -774,7 +774,7 @@ static uint8_t get_single_file(afc_client_t afc, const char *srcpath, const char
774 774
775static int __mkdir(const char* path) 775static int __mkdir(const char* path)
776{ 776{
777#ifdef WIN32 777#ifdef _WIN32
778 return mkdir(path); 778 return mkdir(path);
779#else 779#else
780 return mkdir(path, 0755); 780 return mkdir(path, 0755);
@@ -1483,7 +1483,7 @@ int main(int argc, char** argv)
1483 }; 1483 };
1484 1484
1485 signal(SIGTERM, handle_signal); 1485 signal(SIGTERM, handle_signal);
1486#ifndef WIN32 1486#ifndef _WIN32
1487 signal(SIGQUIT, handle_signal); 1487 signal(SIGQUIT, handle_signal);
1488 signal(SIGPIPE, SIG_IGN); 1488 signal(SIGPIPE, SIG_IGN);
1489#endif 1489#endif
@@ -1561,7 +1561,7 @@ int main(int argc, char** argv)
1561 idevice_events_subscribe(&context, device_event_cb, NULL); 1561 idevice_events_subscribe(&context, device_event_cb, NULL);
1562 1562
1563 while (!connected && !stop_requested) { 1563 while (!connected && !stop_requested) {
1564#ifdef WIN32 1564#ifdef _WIN32
1565 Sleep(100); 1565 Sleep(100);
1566#else 1566#else
1567 usleep(100000); 1567 usleep(100000);
diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c
index c0537b8..5de2d68 100644
--- a/tools/idevicebackup.c
+++ b/tools/idevicebackup.c
@@ -51,7 +51,7 @@
51#define LOCK_ATTEMPTS 50 51#define LOCK_ATTEMPTS 50
52#define LOCK_WAIT 200000 52#define LOCK_WAIT 200000
53 53
54#ifdef WIN32 54#ifdef _WIN32
55#include <windows.h> 55#include <windows.h>
56#define sleep(x) Sleep(x*1000) 56#define sleep(x) Sleep(x*1000)
57#endif 57#endif
@@ -642,7 +642,7 @@ int main(int argc, char *argv[])
642 /* we need to exit cleanly on running backups and restores or we cause havok */ 642 /* we need to exit cleanly on running backups and restores or we cause havok */
643 signal(SIGINT, clean_exit); 643 signal(SIGINT, clean_exit);
644 signal(SIGTERM, clean_exit); 644 signal(SIGTERM, clean_exit);
645#ifndef WIN32 645#ifndef _WIN32
646 signal(SIGQUIT, clean_exit); 646 signal(SIGQUIT, clean_exit);
647 signal(SIGPIPE, SIG_IGN); 647 signal(SIGPIPE, SIG_IGN);
648#endif 648#endif
@@ -1352,7 +1352,7 @@ files_out:
1352 file_info_path = mobilebackup_build_path(backup_directory, hash, ".mddata"); 1352 file_info_path = mobilebackup_build_path(backup_directory, hash, ".mddata");
1353 1353
1354 /* determine file size */ 1354 /* determine file size */
1355#ifdef WIN32 1355#ifdef _WIN32
1356 struct _stati64 fst; 1356 struct _stati64 fst;
1357 if (_stati64(file_info_path, &fst) != 0) 1357 if (_stati64(file_info_path, &fst) != 0)
1358#else 1358#else
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index 19d21a6..804f9f4 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -54,7 +54,7 @@
54#define LOCK_ATTEMPTS 50 54#define LOCK_ATTEMPTS 50
55#define LOCK_WAIT 200000 55#define LOCK_WAIT 200000
56 56
57#ifdef WIN32 57#ifdef _WIN32
58#include <windows.h> 58#include <windows.h>
59#include <conio.h> 59#include <conio.h>
60#define sleep(x) Sleep(x*1000) 60#define sleep(x) Sleep(x*1000)
@@ -178,7 +178,7 @@ static void mobilebackup_afc_get_file_contents(afc_client_t afc, const char *fil
178 178
179static int __mkdir(const char* path, int mode) 179static int __mkdir(const char* path, int mode)
180{ 180{
181#ifdef WIN32 181#ifdef _WIN32
182 return mkdir(path); 182 return mkdir(path);
183#else 183#else
184 return mkdir(path, mode); 184 return mkdir(path, mode);
@@ -207,7 +207,7 @@ static int mkdir_with_parents(const char *dir, int mode)
207 return res; 207 return res;
208} 208}
209 209
210#ifdef WIN32 210#ifdef _WIN32
211static int win32err_to_errno(int err_value) 211static int win32err_to_errno(int err_value)
212{ 212{
213 switch (err_value) { 213 switch (err_value) {
@@ -224,7 +224,7 @@ static int win32err_to_errno(int err_value)
224static int remove_file(const char* path) 224static int remove_file(const char* path)
225{ 225{
226 int e = 0; 226 int e = 0;
227#ifdef WIN32 227#ifdef _WIN32
228 if (!DeleteFile(path)) { 228 if (!DeleteFile(path)) {
229 e = win32err_to_errno(GetLastError()); 229 e = win32err_to_errno(GetLastError());
230 } 230 }
@@ -239,7 +239,7 @@ static int remove_file(const char* path)
239static int remove_directory(const char* path) 239static int remove_directory(const char* path)
240{ 240{
241 int e = 0; 241 int e = 0;
242#ifdef WIN32 242#ifdef _WIN32
243 if (!RemoveDirectory(path)) { 243 if (!RemoveDirectory(path)) {
244 e = win32err_to_errno(GetLastError()); 244 e = win32err_to_errno(GetLastError());
245 } 245 }
@@ -773,7 +773,7 @@ static int mb2_handle_send_file(mobilebackup2_client_t mobilebackup2, const char
773 uint32_t bytes = 0; 773 uint32_t bytes = 0;
774 char *localfile = string_build_path(backup_dir, path, NULL); 774 char *localfile = string_build_path(backup_dir, path, NULL);
775 char buf[32768]; 775 char buf[32768];
776#ifdef WIN32 776#ifdef _WIN32
777 struct _stati64 fst; 777 struct _stati64 fst;
778#else 778#else
779 struct stat fst; 779 struct stat fst;
@@ -784,7 +784,7 @@ static int mb2_handle_send_file(mobilebackup2_client_t mobilebackup2, const char
784 int errcode = -1; 784 int errcode = -1;
785 int result = -1; 785 int result = -1;
786 uint32_t length; 786 uint32_t length;
787#ifdef WIN32 787#ifdef _WIN32
788 uint64_t total; 788 uint64_t total;
789 uint64_t sent; 789 uint64_t sent;
790#else 790#else
@@ -815,7 +815,7 @@ static int mb2_handle_send_file(mobilebackup2_client_t mobilebackup2, const char
815 goto leave_proto_err; 815 goto leave_proto_err;
816 } 816 }
817 817
818#ifdef WIN32 818#ifdef _WIN32
819 if (_stati64(localfile, &fst) < 0) 819 if (_stati64(localfile, &fst) < 0)
820#else 820#else
821 if (stat(localfile, &fst) < 0) 821 if (stat(localfile, &fst) < 0)
@@ -1348,7 +1348,7 @@ static void mb2_copy_directory_by_path(const char *src, const char *dst)
1348 } 1348 }
1349} 1349}
1350 1350
1351#ifdef WIN32 1351#ifdef _WIN32
1352#define BS_CC '\b' 1352#define BS_CC '\b'
1353#define my_getch getch 1353#define my_getch getch
1354#else 1354#else
@@ -1535,7 +1535,7 @@ int main(int argc, char *argv[])
1535 /* we need to exit cleanly on running backups and restores or we cause havok */ 1535 /* we need to exit cleanly on running backups and restores or we cause havok */
1536 signal(SIGINT, clean_exit); 1536 signal(SIGINT, clean_exit);
1537 signal(SIGTERM, clean_exit); 1537 signal(SIGTERM, clean_exit);
1538#ifndef WIN32 1538#ifndef _WIN32
1539 signal(SIGQUIT, clean_exit); 1539 signal(SIGQUIT, clean_exit);
1540 signal(SIGPIPE, SIG_IGN); 1540 signal(SIGPIPE, SIG_IGN);
1541#endif 1541#endif
@@ -2324,7 +2324,7 @@ checkpoint:
2324 /* device wants to know how much disk space is available on the computer */ 2324 /* device wants to know how much disk space is available on the computer */
2325 uint64_t freespace = 0; 2325 uint64_t freespace = 0;
2326 int res = -1; 2326 int res = -1;
2327#ifdef WIN32 2327#ifdef _WIN32
2328 if (GetDiskFreeSpaceEx(backup_directory, (PULARGE_INTEGER)&freespace, NULL, NULL)) { 2328 if (GetDiskFreeSpaceEx(backup_directory, (PULARGE_INTEGER)&freespace, NULL, NULL)) {
2329 res = 0; 2329 res = 0;
2330 } 2330 }
diff --git a/tools/idevicebtlogger.c b/tools/idevicebtlogger.c
index 8de6b22..ca68b59 100644
--- a/tools/idevicebtlogger.c
+++ b/tools/idevicebtlogger.c
@@ -36,7 +36,7 @@
36#include <assert.h> 36#include <assert.h>
37#include <fcntl.h> 37#include <fcntl.h>
38 38
39#ifdef WIN32 39#ifdef _WIN32
40#include <windows.h> 40#include <windows.h>
41#define sleep(x) Sleep(x*1000) 41#define sleep(x) Sleep(x*1000)
42#else 42#else
@@ -334,7 +334,7 @@ int main(int argc, char *argv[])
334 334
335 signal(SIGINT, clean_exit); 335 signal(SIGINT, clean_exit);
336 signal(SIGTERM, clean_exit); 336 signal(SIGTERM, clean_exit);
337#ifndef WIN32 337#ifndef _WIN32
338 signal(SIGQUIT, clean_exit); 338 signal(SIGQUIT, clean_exit);
339 signal(SIGPIPE, SIG_IGN); 339 signal(SIGPIPE, SIG_IGN);
340#endif 340#endif
diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c
index e900fe8..9814b79 100644
--- a/tools/idevicecrashreport.c
+++ b/tools/idevicecrashreport.c
@@ -31,7 +31,7 @@
31#include <string.h> 31#include <string.h>
32#include <unistd.h> 32#include <unistd.h>
33#include <getopt.h> 33#include <getopt.h>
34#ifndef WIN32 34#ifndef _WIN32
35#include <signal.h> 35#include <signal.h>
36#endif 36#endif
37#include <libimobiledevice-glue/utils.h> 37#include <libimobiledevice-glue/utils.h>
@@ -42,7 +42,7 @@
42#include <libimobiledevice/afc.h> 42#include <libimobiledevice/afc.h>
43#include <plist/plist.h> 43#include <plist/plist.h>
44 44
45#ifdef WIN32 45#ifdef _WIN32
46#include <windows.h> 46#include <windows.h>
47#define S_IFLNK S_IFREG 47#define S_IFLNK S_IFREG
48#define S_IFSOCK S_IFREG 48#define S_IFSOCK S_IFREG
@@ -59,7 +59,7 @@ static int remove_all = 0;
59static int file_exists(const char* path) 59static int file_exists(const char* path)
60{ 60{
61 struct stat tst; 61 struct stat tst;
62#ifdef WIN32 62#ifdef _WIN32
63 return (stat(path, &tst) == 0); 63 return (stat(path, &tst) == 0);
64#else 64#else
65 return (lstat(path, &tst) == 0); 65 return (lstat(path, &tst) == 0);
@@ -153,7 +153,7 @@ static int afc_client_copy_and_remove_crash_reports(afc_client_t afc, const char
153 strcpy(((char*)source_filename) + device_directory_length, list[k]); 153 strcpy(((char*)source_filename) + device_directory_length, list[k]);
154 154
155 /* assemble absolute target filename */ 155 /* assemble absolute target filename */
156#ifdef WIN32 156#ifdef _WIN32
157 /* replace every ':' with '-' since ':' is an illegal character for file names in windows */ 157 /* replace every ':' with '-' since ':' is an illegal character for file names in windows */
158 char* current_pos = strchr(list[k], ':'); 158 char* current_pos = strchr(list[k], ':');
159 while (current_pos) { 159 while (current_pos) {
@@ -212,7 +212,7 @@ static int afc_client_copy_and_remove_crash_reports(afc_client_t afc, const char
212 remove(target_filename); 212 remove(target_filename);
213 } 213 }
214 214
215#ifndef WIN32 215#ifndef _WIN32
216 /* use relative filename */ 216 /* use relative filename */
217 char* b = strrchr(fileinfo[i+1], '/'); 217 char* b = strrchr(fileinfo[i+1], '/');
218 if (b == NULL) { 218 if (b == NULL) {
@@ -240,7 +240,7 @@ static int afc_client_copy_and_remove_crash_reports(afc_client_t afc, const char
240 /* recurse into child directories */ 240 /* recurse into child directories */
241 if (S_ISDIR(stbuf.st_mode)) { 241 if (S_ISDIR(stbuf.st_mode)) {
242 if (!remove_all) { 242 if (!remove_all) {
243#ifdef WIN32 243#ifdef _WIN32
244 mkdir(target_filename); 244 mkdir(target_filename);
245#else 245#else
246 mkdir(target_filename, 0755); 246 mkdir(target_filename, 0755);
@@ -375,7 +375,7 @@ int main(int argc, char* argv[])
375 { NULL, 0, NULL, 0} 375 { NULL, 0, NULL, 0}
376 }; 376 };
377 377
378#ifndef WIN32 378#ifndef _WIN32
379 signal(SIGPIPE, SIG_IGN); 379 signal(SIGPIPE, SIG_IGN);
380#endif 380#endif
381 381
diff --git a/tools/idevicedate.c b/tools/idevicedate.c
index d05f63e..31b0cf7 100644
--- a/tools/idevicedate.c
+++ b/tools/idevicedate.c
@@ -33,7 +33,7 @@
33#if HAVE_LANGINFO_CODESET 33#if HAVE_LANGINFO_CODESET
34#include <langinfo.h> 34#include <langinfo.h>
35#endif 35#endif
36#ifndef WIN32 36#ifndef _WIN32
37#include <signal.h> 37#include <signal.h>
38#endif 38#endif
39 39
@@ -43,7 +43,7 @@
43#ifdef _DATE_FMT 43#ifdef _DATE_FMT
44#define DATE_FMT_LANGINFO nl_langinfo (_DATE_FMT) 44#define DATE_FMT_LANGINFO nl_langinfo (_DATE_FMT)
45#else 45#else
46#ifdef WIN32 46#ifdef _WIN32
47#define DATE_FMT_LANGINFO "%a %b %#d %H:%M:%S %Z %Y" 47#define DATE_FMT_LANGINFO "%a %b %#d %H:%M:%S %Z %Y"
48#else 48#else
49#define DATE_FMT_LANGINFO "%a %b %e %H:%M:%S %Z %Y" 49#define DATE_FMT_LANGINFO "%a %b %e %H:%M:%S %Z %Y"
@@ -104,7 +104,7 @@ int main(int argc, char *argv[])
104 { NULL, 0, NULL, 0} 104 { NULL, 0, NULL, 0}
105 }; 105 };
106 106
107#ifndef WIN32 107#ifndef _WIN32
108 signal(SIGPIPE, SIG_IGN); 108 signal(SIGPIPE, SIG_IGN);
109#endif 109#endif
110 /* parse cmdline args */ 110 /* parse cmdline args */
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c
index 36c594e..3f2e289 100644
--- a/tools/idevicedebug.c
+++ b/tools/idevicedebug.c
@@ -34,7 +34,7 @@
34#include <libgen.h> 34#include <libgen.h>
35#include <getopt.h> 35#include <getopt.h>
36 36
37#ifdef WIN32 37#ifdef _WIN32
38#include <windows.h> 38#include <windows.h>
39#define sleep(x) Sleep(x*1000) 39#define sleep(x) Sleep(x*1000)
40#endif 40#endif
@@ -239,7 +239,7 @@ int main(int argc, char *argv[])
239 /* map signals */ 239 /* map signals */
240 signal(SIGINT, on_signal); 240 signal(SIGINT, on_signal);
241 signal(SIGTERM, on_signal); 241 signal(SIGTERM, on_signal);
242#ifndef WIN32 242#ifndef _WIN32
243 signal(SIGQUIT, on_signal); 243 signal(SIGQUIT, on_signal);
244 signal(SIGPIPE, SIG_IGN); 244 signal(SIGPIPE, SIG_IGN);
245#endif 245#endif
diff --git a/tools/idevicedebugserverproxy.c b/tools/idevicedebugserverproxy.c
index 9fe7051..fb082b3 100644
--- a/tools/idevicedebugserverproxy.c
+++ b/tools/idevicedebugserverproxy.c
@@ -32,7 +32,7 @@
32#include <getopt.h> 32#include <getopt.h>
33#include <errno.h> 33#include <errno.h>
34#include <signal.h> 34#include <signal.h>
35#ifdef WIN32 35#ifdef _WIN32
36#include <winsock2.h> 36#include <winsock2.h>
37#include <windows.h> 37#include <windows.h>
38#else 38#else
@@ -219,7 +219,7 @@ int main(int argc, char *argv[])
219 { NULL, 0, NULL, 0} 219 { NULL, 0, NULL, 0}
220 }; 220 };
221 221
222#ifndef WIN32 222#ifndef _WIN32
223 struct sigaction sa; 223 struct sigaction sa;
224 struct sigaction si; 224 struct sigaction si;
225 memset(&sa, '\0', sizeof(struct sigaction)); 225 memset(&sa, '\0', sizeof(struct sigaction));
diff --git a/tools/idevicedevmodectl.c b/tools/idevicedevmodectl.c
index bd1de6a..6bf1a1c 100644
--- a/tools/idevicedevmodectl.c
+++ b/tools/idevicedevmodectl.c
@@ -32,11 +32,11 @@
32#include <sys/stat.h> 32#include <sys/stat.h>
33#include <unistd.h> 33#include <unistd.h>
34#include <errno.h> 34#include <errno.h>
35#ifndef WIN32 35#ifndef _WIN32
36#include <signal.h> 36#include <signal.h>
37#endif 37#endif
38 38
39#ifdef WIN32 39#ifdef _WIN32
40#include <windows.h> 40#include <windows.h>
41#define __usleep(x) Sleep(x/1000) 41#define __usleep(x) Sleep(x/1000)
42#else 42#else
@@ -259,7 +259,7 @@ int main(int argc, char *argv[])
259 { NULL, 0, NULL, 0} 259 { NULL, 0, NULL, 0}
260 }; 260 };
261 261
262#ifndef WIN32 262#ifndef _WIN32
263 signal(SIGPIPE, SIG_IGN); 263 signal(SIGPIPE, SIG_IGN);
264#endif 264#endif
265 /* parse cmdline args */ 265 /* parse cmdline args */
diff --git a/tools/idevicediagnostics.c b/tools/idevicediagnostics.c
index e699bc4..365c0a4 100644
--- a/tools/idevicediagnostics.c
+++ b/tools/idevicediagnostics.c
@@ -31,7 +31,7 @@
31#include <getopt.h> 31#include <getopt.h>
32#include <errno.h> 32#include <errno.h>
33#include <time.h> 33#include <time.h>
34#ifndef WIN32 34#ifndef _WIN32
35#include <signal.h> 35#include <signal.h>
36#endif 36#endif
37 37
@@ -113,7 +113,7 @@ int main(int argc, char **argv)
113 { NULL, 0, NULL, 0} 113 { NULL, 0, NULL, 0}
114 }; 114 };
115 115
116#ifndef WIN32 116#ifndef _WIN32
117 signal(SIGPIPE, SIG_IGN); 117 signal(SIGPIPE, SIG_IGN);
118#endif 118#endif
119 /* parse cmdline args */ 119 /* parse cmdline args */
diff --git a/tools/ideviceenterrecovery.c b/tools/ideviceenterrecovery.c
index 29cc5c9..65eb882 100644
--- a/tools/ideviceenterrecovery.c
+++ b/tools/ideviceenterrecovery.c
@@ -30,7 +30,7 @@
30#include <stdlib.h> 30#include <stdlib.h>
31#include <getopt.h> 31#include <getopt.h>
32#include <errno.h> 32#include <errno.h>
33#ifndef WIN32 33#ifndef _WIN32
34#include <signal.h> 34#include <signal.h>
35#endif 35#endif
36 36
@@ -70,7 +70,7 @@ int main(int argc, char *argv[])
70 { NULL, 0, NULL, 0} 70 { NULL, 0, NULL, 0}
71 }; 71 };
72 72
73#ifndef WIN32 73#ifndef _WIN32
74 signal(SIGPIPE, SIG_IGN); 74 signal(SIGPIPE, SIG_IGN);
75#endif 75#endif
76 /* parse cmdline args */ 76 /* parse cmdline args */
diff --git a/tools/ideviceimagemounter.c b/tools/ideviceimagemounter.c
index 511583e..8d6fc95 100644
--- a/tools/ideviceimagemounter.c
+++ b/tools/ideviceimagemounter.c
@@ -36,7 +36,7 @@
36#include <time.h> 36#include <time.h>
37#include <sys/time.h> 37#include <sys/time.h>
38#include <inttypes.h> 38#include <inttypes.h>
39#ifndef WIN32 39#ifndef _WIN32
40#include <signal.h> 40#include <signal.h>
41#endif 41#endif
42 42
@@ -183,7 +183,7 @@ int main(int argc, char **argv)
183 size_t image_size = 0; 183 size_t image_size = 0;
184 char *image_sig_path = NULL; 184 char *image_sig_path = NULL;
185 185
186#ifndef WIN32 186#ifndef _WIN32
187 signal(SIGPIPE, SIG_IGN); 187 signal(SIGPIPE, SIG_IGN);
188#endif 188#endif
189 parse_opts(argc, argv); 189 parse_opts(argc, argv);
diff --git a/tools/ideviceinfo.c b/tools/ideviceinfo.c
index fd45763..20cc916 100644
--- a/tools/ideviceinfo.c
+++ b/tools/ideviceinfo.c
@@ -31,7 +31,7 @@
31#include <errno.h> 31#include <errno.h>
32#include <stdlib.h> 32#include <stdlib.h>
33#include <getopt.h> 33#include <getopt.h>
34#ifndef WIN32 34#ifndef _WIN32
35#include <signal.h> 35#include <signal.h>
36#endif 36#endif
37 37
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
152 { NULL, 0, NULL, 0} 152 { NULL, 0, NULL, 0}
153 }; 153 };
154 154
155#ifndef WIN32 155#ifndef _WIN32
156 signal(SIGPIPE, SIG_IGN); 156 signal(SIGPIPE, SIG_IGN);
157#endif 157#endif
158 158
diff --git a/tools/idevicename.c b/tools/idevicename.c
index 69b76f6..248bda3 100644
--- a/tools/idevicename.c
+++ b/tools/idevicename.c
@@ -30,7 +30,7 @@
30#include <unistd.h> 30#include <unistd.h>
31#include <stdlib.h> 31#include <stdlib.h>
32#include <getopt.h> 32#include <getopt.h>
33#ifndef WIN32 33#ifndef _WIN32
34#include <signal.h> 34#include <signal.h>
35#endif 35#endif
36 36
@@ -72,7 +72,7 @@ int main(int argc, char** argv)
72 const char* udid = NULL; 72 const char* udid = NULL;
73 int use_network = 0; 73 int use_network = 0;
74 74
75#ifndef WIN32 75#ifndef _WIN32
76 signal(SIGPIPE, SIG_IGN); 76 signal(SIGPIPE, SIG_IGN);
77#endif 77#endif
78 78
diff --git a/tools/idevicenotificationproxy.c b/tools/idevicenotificationproxy.c
index 00da916..192192a 100644
--- a/tools/idevicenotificationproxy.c
+++ b/tools/idevicenotificationproxy.c
@@ -33,7 +33,7 @@
33#include <errno.h> 33#include <errno.h>
34#include <signal.h> 34#include <signal.h>
35 35
36#ifdef WIN32 36#ifdef _WIN32
37#include <windows.h> 37#include <windows.h>
38#define sleep(x) Sleep(x*1000) 38#define sleep(x) Sleep(x*1000)
39#else 39#else
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
125 125
126 signal(SIGINT, clean_exit); 126 signal(SIGINT, clean_exit);
127 signal(SIGTERM, clean_exit); 127 signal(SIGTERM, clean_exit);
128#ifndef WIN32 128#ifndef _WIN32
129 signal(SIGQUIT, clean_exit); 129 signal(SIGQUIT, clean_exit);
130 signal(SIGPIPE, SIG_IGN); 130 signal(SIGPIPE, SIG_IGN);
131#endif 131#endif
diff --git a/tools/idevicepair.c b/tools/idevicepair.c
index 94d3f04..884c690 100644
--- a/tools/idevicepair.c
+++ b/tools/idevicepair.c
@@ -32,7 +32,7 @@
32#include <getopt.h> 32#include <getopt.h>
33#include <ctype.h> 33#include <ctype.h>
34#include <unistd.h> 34#include <unistd.h>
35#ifdef WIN32 35#ifdef _WIN32
36#include <windows.h> 36#include <windows.h>
37#include <conio.h> 37#include <conio.h>
38#else 38#else
@@ -50,7 +50,7 @@ static char *udid = NULL;
50 50
51#ifdef HAVE_WIRELESS_PAIRING 51#ifdef HAVE_WIRELESS_PAIRING
52 52
53#ifdef WIN32 53#ifdef _WIN32
54#define BS_CC '\b' 54#define BS_CC '\b'
55#define my_getch getch 55#define my_getch getch
56#else 56#else
@@ -293,7 +293,7 @@ int main(int argc, char **argv)
293 } 293 }
294 } 294 }
295 295
296#ifndef WIN32 296#ifndef _WIN32
297 signal(SIGPIPE, SIG_IGN); 297 signal(SIGPIPE, SIG_IGN);
298#endif 298#endif
299 299
diff --git a/tools/ideviceprovision.c b/tools/ideviceprovision.c
index 4080a28..97417eb 100644
--- a/tools/ideviceprovision.c
+++ b/tools/ideviceprovision.c
@@ -32,11 +32,11 @@
32#include <getopt.h> 32#include <getopt.h>
33#include <sys/stat.h> 33#include <sys/stat.h>
34#include <errno.h> 34#include <errno.h>
35#ifndef WIN32 35#ifndef _WIN32
36#include <signal.h> 36#include <signal.h>
37#endif 37#endif
38 38
39#ifdef WIN32 39#ifdef _WIN32
40#include <windows.h> 40#include <windows.h>
41#else 41#else
42#include <arpa/inet.h> 42#include <arpa/inet.h>
@@ -314,7 +314,7 @@ int main(int argc, char *argv[])
314 { NULL, 0, NULL, 0} 314 { NULL, 0, NULL, 0}
315 }; 315 };
316 316
317#ifndef WIN32 317#ifndef _WIN32
318 signal(SIGPIPE, SIG_IGN); 318 signal(SIGPIPE, SIG_IGN);
319#endif 319#endif
320 /* parse cmdline args */ 320 /* parse cmdline args */
diff --git a/tools/idevicescreenshot.c b/tools/idevicescreenshot.c
index 0e694c7..bfaa059 100644
--- a/tools/idevicescreenshot.c
+++ b/tools/idevicescreenshot.c
@@ -32,7 +32,7 @@
32#include <errno.h> 32#include <errno.h>
33#include <time.h> 33#include <time.h>
34#include <unistd.h> 34#include <unistd.h>
35#ifndef WIN32 35#ifndef _WIN32
36#include <signal.h> 36#include <signal.h>
37#endif 37#endif
38 38
@@ -142,7 +142,7 @@ int main(int argc, char **argv)
142 { NULL, 0, NULL, 0} 142 { NULL, 0, NULL, 0}
143 }; 143 };
144 144
145#ifndef WIN32 145#ifndef _WIN32
146 signal(SIGPIPE, SIG_IGN); 146 signal(SIGPIPE, SIG_IGN);
147#endif 147#endif
148 /* parse cmdline args */ 148 /* parse cmdline args */
diff --git a/tools/idevicesyslog.c b/tools/idevicesyslog.c
index a0e641d..dbd7b01 100644
--- a/tools/idevicesyslog.c
+++ b/tools/idevicesyslog.c
@@ -34,7 +34,7 @@
34#include <unistd.h> 34#include <unistd.h>
35#include <getopt.h> 35#include <getopt.h>
36 36
37#ifdef WIN32 37#ifdef _WIN32
38#include <windows.h> 38#include <windows.h>
39#define sleep(x) Sleep(x*1000) 39#define sleep(x) Sleep(x*1000)
40#endif 40#endif
@@ -537,7 +537,7 @@ int main(int argc, char *argv[])
537 537
538 signal(SIGINT, clean_exit); 538 signal(SIGINT, clean_exit);
539 signal(SIGTERM, clean_exit); 539 signal(SIGTERM, clean_exit);
540#ifndef WIN32 540#ifndef _WIN32
541 signal(SIGQUIT, clean_exit); 541 signal(SIGQUIT, clean_exit);
542 signal(SIGPIPE, SIG_IGN); 542 signal(SIGPIPE, SIG_IGN);
543#endif 543#endif