diff options
author | David <david@xagasoft.com> | 2008-10-24 19:12:49 +0000 |
---|---|---|
committer | David <david@xagasoft.com> | 2008-10-24 19:12:49 +0000 |
commit | 566dd25530779388859f8a21191e60c62a21cd5f (patch) | |
tree | c46f7f93d7d1eefbec8df6c35d3ee95ac5156459 /src/win32_compatibility.h | |
parent | e7e521b0ddfdbae6407b77020824da614610a04c (diff) | |
download | libbu++-566dd25530779388859f8a21191e60c62a21cd5f.tar.gz libbu++-566dd25530779388859f8a21191e60c62a21cd5f.tar.bz2 libbu++-566dd25530779388859f8a21191e60c62a21cd5f.tar.xz libbu++-566dd25530779388859f8a21191e60c62a21cd5f.zip |
david - ok, fixed the compiler warnings in socket class. got serversocket compliling without warnings. added win32_compatibility.h along the same lines as osx_copatibility.h
Diffstat (limited to 'src/win32_compatibility.h')
-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 | |||