diff options
Diffstat (limited to '')
-rw-r--r-- | src/win32_compatibility.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/win32_compatibility.h b/src/win32_compatibility.h new file mode 100644 index 0000000..a1b9c97 --- /dev/null +++ b/src/win32_compatibility.h | |||
@@ -0,0 +1,27 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2007-2008 Xagasoft, All rights reserved. | ||
3 | * | ||
4 | * This file is part of the libbu++ library and is released under the | ||
5 | * terms of the license contained in the file LICENSE. | ||
6 | */ | ||
7 | |||
8 | #ifndef WIN32_COMPATIBILITY__H | ||
9 | #define WIN32_COMPATIBILITY__H | ||
10 | |||
11 | #ifdef WIN32 | ||
12 | |||
13 | #ifndef TEMP_FAILURE_RETRY | ||
14 | #define TEMP_FAILURE_RETRY(expression) \ | ||
15 | (__extension__ \ | ||
16 | ({ long int __result; \ | ||
17 | do __result = (long int) (expression); \ | ||
18 | while (__result == -1L && errno == EINTR); \ | ||
19 | __result; })) | ||
20 | #endif | ||
21 | |||
22 | //__extension__ typedef unsigned int socklen_t; | ||
23 | __extension__ typedef int socklen_t; | ||
24 | |||
25 | #endif /* WIN32 */ | ||
26 | #endif | ||
27 | |||