- Timestamp:
- 01/30/13 13:12:40 (11 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cf_file.c
r4 r5 6 6 #ifdef _WIN32 7 7 # include <io.h> 8 # include <stdio.h> 8 9 #else // #ifdef _WIN32 9 10 # include <unistd.h> -
trunk/src/cf_socket.c
r4 r5 7 7 #ifdef _WIN32 8 8 # include <WinSock2.h> 9 # pragma comment (lib, "ws2_32.lib") 10 # define close(__sock) closesocket(__sock) 11 # define sa_family_t unsigned short 9 12 #else 10 13 # include <netinet/in.h> … … 74 77 CHECK_INVALID_SOCKET (sock); 75 78 76 result = /* continued */ 77 #ifdef _WIN32 78 closesocket (socket); 79 #else 80 close (sock); 81 #endif 79 result = close (sock); 82 80 83 81 if (result != 0) … … 143 141 int result = 0; 144 142 145 CHECK_INVALID_SOCKET (sock); 146 147 if (timeout < 0) 148 return CF_ERROR_SOCKET_INVALID_ARGS; 149 150 #ifndef _WIN32 143 #ifdef _WIN32 144 int time_ms = timeout * 1000; 145 #else 151 146 struct timeval timeval; 152 147 timeval.tv_sec = timeout; 153 148 timeval.tv_usec= 0; 154 #else 155 int time_ms = timeout * 1000; 156 #endif 149 #endif 150 151 CHECK_INVALID_SOCKET (sock); 152 153 if (timeout < 0) 154 return CF_ERROR_SOCKET_INVALID_ARGS; 157 155 158 156 result = CF_Socket_SetOption (sock, -
trunk/src/cf_thread.c
r4 r5 39 39 40 40 int 41 CF_Thread_Create (CF_Thread * threadID,42 CF_T HREAD_RETURNcallback,43 void * arg)41 CF_Thread_Create (CF_Thread * threadID, 42 CF_Thread_Function callback, 43 void * arg) 44 44 { 45 45 int result = 0; … … 86 86 87 87 #ifdef _WIN32 88 WaitForSingleObject ((THREAD_TYPE) *threa ID, INFINITE);88 WaitForSingleObject ((THREAD_TYPE) *threadID, INFINITE); 89 89 #else 90 90 int status;
Note:
See TracChangeset
for help on using the changeset viewer.