#include <pthread.h>
#endif
#ifdef __WIN32__
+ #include <synchapi.h>
+/*
#define _WINSOCKAPI_ // make windows.h happy about winsock.
// winsock support...
// #undef FD_SETSIZE
// if you don't set this, you can only select on a default of 64 sockets.
#include <winsock2.h>
#include <windows.h>
+ */
#endif
namespace basis {
ret = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP);
#endif
if (ret != 0) {
- printf("failed to initialize mutex attributes!\n"); fflush(NIL);
+ printf("failed to initialize mutex attributes!\n"); fflush(NULL_POINTER);
}
c_os_mutex = (pthread_mutex_t *)malloc(sizeof(pthread_mutex_t));
pthread_mutex_init((pthread_mutex_t *)c_os_mutex, &attr);