diff options
Diffstat (limited to 'tools/idevicecrashreport.c')
| -rw-r--r-- | tools/idevicecrashreport.c | 14 |
1 files changed, 7 insertions, 7 deletions
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; | |||
| 59 | static int file_exists(const char* path) | 59 | static 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 | ||
