diff options
author | Nils Durner <durner@gnunet.org> | 2010-10-08 17:01:33 +0000 |
---|---|---|
committer | Nils Durner <durner@gnunet.org> | 2010-10-08 17:01:33 +0000 |
commit | 60d8d0fe3dcc6cca06ac73cc63c7c348021413e2 (patch) | |
tree | f85a69ef5a7f4c7b38eaf5de4650617364c15230 /src/include/plibc.h | |
parent | 194224be3b68264c4147857604bed570bf3e8e36 (diff) | |
download | gnunet-60d8d0fe3dcc6cca06ac73cc63c7c348021413e2.tar.gz gnunet-60d8d0fe3dcc6cca06ac73cc63c7c348021413e2.zip |
define pid_t as HANDLE
Diffstat (limited to 'src/include/plibc.h')
-rw-r--r-- | src/include/plibc.h | 33 |
1 files changed, 11 insertions, 22 deletions
diff --git a/src/include/plibc.h b/src/include/plibc.h index c348d5d04..82225019d 100644 --- a/src/include/plibc.h +++ b/src/include/plibc.h | |||
@@ -22,7 +22,7 @@ | |||
22 | * @brief PlibC header | 22 | * @brief PlibC header |
23 | * @attention This file is usually not installed under Unix, | 23 | * @attention This file is usually not installed under Unix, |
24 | * so ship it with your application | 24 | * so ship it with your application |
25 | * @version $Revision: 65 $ | 25 | * @version $Revision: 55 $ |
26 | */ | 26 | */ |
27 | 27 | ||
28 | #ifndef _PLIBC_H_ | 28 | #ifndef _PLIBC_H_ |
@@ -51,8 +51,7 @@ extern "C" { | |||
51 | #endif | 51 | #endif |
52 | 52 | ||
53 | #include <windows.h> | 53 | #include <windows.h> |
54 | #include <ws2tcpip.h> | 54 | #include <Ws2tcpip.h> |
55 | #include <sys/types.h> | ||
56 | #include <time.h> | 55 | #include <time.h> |
57 | #include <stdio.h> | 56 | #include <stdio.h> |
58 | #include <sys/types.h> | 57 | #include <sys/types.h> |
@@ -71,6 +70,12 @@ extern "C" { | |||
71 | #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \ | 70 | #define Li2Double(x) ((double)((x).HighPart) * 4.294967296E9 + \ |
72 | (double)((x).LowPart)) | 71 | (double)((x).LowPart)) |
73 | 72 | ||
73 | #define socklen_t int | ||
74 | #define ssize_t int | ||
75 | #define off_t int | ||
76 | #define int64_t long long | ||
77 | #define int32_t long | ||
78 | |||
74 | struct stat64 | 79 | struct stat64 |
75 | { | 80 | { |
76 | _dev_t st_dev; | 81 | _dev_t st_dev; |
@@ -86,15 +91,8 @@ struct stat64 | |||
86 | __time64_t st_ctime; | 91 | __time64_t st_ctime; |
87 | }; | 92 | }; |
88 | 93 | ||
89 | typedef unsigned int sa_family_t; | ||
90 | |||
91 | struct sockaddr_un { | ||
92 | short sun_family; /*AF_UNIX*/ | ||
93 | char sun_path[108]; /*path name */ | ||
94 | }; | ||
95 | |||
96 | #ifndef pid_t | 94 | #ifndef pid_t |
97 | #define pid_t int | 95 | #define pid_t HANDLE |
98 | #endif | 96 | #endif |
99 | 97 | ||
100 | #ifndef error_t | 98 | #ifndef error_t |
@@ -109,12 +107,6 @@ struct sockaddr_un { | |||
109 | #define MSG_DONTWAIT 0 | 107 | #define MSG_DONTWAIT 0 |
110 | #endif | 108 | #endif |
111 | 109 | ||
112 | enum | ||
113 | { | ||
114 | _SC_PAGESIZE = 30, | ||
115 | _SC_PAGE_SIZE = 30 | ||
116 | }; | ||
117 | |||
118 | /* Thanks to the Cygwin project */ | 110 | /* Thanks to the Cygwin project */ |
119 | #define ENOCSI 43 /* No CSI structure available */ | 111 | #define ENOCSI 43 /* No CSI structure available */ |
120 | #define EL2HLT 44 /* Level 2 halted */ | 112 | #define EL2HLT 44 /* Level 2 halted */ |
@@ -396,7 +388,6 @@ int _win_remove(const char *path); | |||
396 | int _win_rename(const char *oldname, const char *newname); | 388 | int _win_rename(const char *oldname, const char *newname); |
397 | int _win_stat(const char *path, struct stat *buffer); | 389 | int _win_stat(const char *path, struct stat *buffer); |
398 | int _win_stat64(const char *path, struct stat64 *buffer); | 390 | int _win_stat64(const char *path, struct stat64 *buffer); |
399 | long _win_sysconf(int name); | ||
400 | int _win_unlink(const char *filename); | 391 | int _win_unlink(const char *filename); |
401 | int _win_write(int fildes, const void *buf, size_t nbyte); | 392 | int _win_write(int fildes, const void *buf, size_t nbyte); |
402 | int _win_read(int fildes, void *buf, size_t nbyte); | 393 | int _win_read(int fildes, void *buf, size_t nbyte); |
@@ -471,7 +462,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
471 | #define DIR_SEPARATOR '/' | 462 | #define DIR_SEPARATOR '/' |
472 | #define DIR_SEPARATOR_STR "/" | 463 | #define DIR_SEPARATOR_STR "/" |
473 | #define PATH_SEPARATOR ';' | 464 | #define PATH_SEPARATOR ';' |
474 | #define PATH_SEPARATOR_STR ":" | 465 | #define PATH_SEPARATOR_STR ";" |
475 | #define NEWLINE "\n" | 466 | #define NEWLINE "\n" |
476 | 467 | ||
477 | #ifdef ENABLE_NLS | 468 | #ifdef ENABLE_NLS |
@@ -498,7 +489,6 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
498 | #define RENAME(o, n) rename(o, n) | 489 | #define RENAME(o, n) rename(o, n) |
499 | #define STAT(p, b) stat(p, b) | 490 | #define STAT(p, b) stat(p, b) |
500 | #define STAT64(p, b) stat64(p, b) | 491 | #define STAT64(p, b) stat64(p, b) |
501 | #define SYSCONF(n) sysconf(n) | ||
502 | #define UNLINK(f) unlink(f) | 492 | #define UNLINK(f) unlink(f) |
503 | #define WRITE(f, b, n) write(f, b, n) | 493 | #define WRITE(f, b, n) write(f, b, n) |
504 | #define READ(f, b, n) read(f, b, n) | 494 | #define READ(f, b, n) read(f, b, n) |
@@ -565,7 +555,7 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
565 | #define DIR_SEPARATOR '\\' | 555 | #define DIR_SEPARATOR '\\' |
566 | #define DIR_SEPARATOR_STR "\\" | 556 | #define DIR_SEPARATOR_STR "\\" |
567 | #define PATH_SEPARATOR ':' | 557 | #define PATH_SEPARATOR ':' |
568 | #define PATH_SEPARATOR_STR ";" | 558 | #define PATH_SEPARATOR_STR ":" |
569 | #define NEWLINE "\r\n" | 559 | #define NEWLINE "\r\n" |
570 | 560 | ||
571 | #ifdef ENABLE_NLS | 561 | #ifdef ENABLE_NLS |
@@ -593,7 +583,6 @@ char *strcasestr(const char *haystack_start, const char *needle_start); | |||
593 | #define RENAME(o, n) _win_rename(o, n) | 583 | #define RENAME(o, n) _win_rename(o, n) |
594 | #define STAT(p, b) _win_stat(p, b) | 584 | #define STAT(p, b) _win_stat(p, b) |
595 | #define STAT64(p, b) _win_stat64(p, b) | 585 | #define STAT64(p, b) _win_stat64(p, b) |
596 | #define SYSCONF(n) _win_sysconf(n) | ||
597 | #define UNLINK(f) _win_unlink(f) | 586 | #define UNLINK(f) _win_unlink(f) |
598 | #define WRITE(f, b, n) _win_write(f, b, n) | 587 | #define WRITE(f, b, n) _win_write(f, b, n) |
599 | #define READ(f, b, n) _win_read(f, b, n) | 588 | #define READ(f, b, n) _win_read(f, b, n) |