--- a/src/server/public/nsapi.h Sat Jan 14 11:27:55 2017 +0100 +++ b/src/server/public/nsapi.h Sun Jan 15 17:53:16 2017 +0100 @@ -369,6 +369,7 @@ #include <wtypes.h> #include <winbase.h> #include <direct.h> +#include <dirent.h> // TODO: works only with mingw #include <winsock.h> #endif /* XP_WIN32 */ @@ -380,6 +381,7 @@ #include <string.h> #include <errno.h> #include <time.h> +#include <inttypes.h> /* --- End native platform includes --- */ @@ -651,8 +653,9 @@ #endif #ifndef SEMAPHORE_T -typedef void *SEMAPHORE; -#define SEMAPHORE_T void * +// TODO: fix +//typedef void *SEMAPHORE; +//#define SEMAPHORE_T void * #endif /* !SEMAPHORE_T */ #define SESSION_HASHSIZE 5 @@ -699,13 +702,14 @@ * FuncPtr is a pointer to an NSAPI SAF function */ +// TODO: fix typedefs #ifdef XP_UNIX typedef int Func(pblock *, Session *, Request *); // new func executor typedef int FuncExec(FuncStruct *, pblock *, Session *, Request *); #else /* XP_WIN32 */ typedef int _cdecl Func(pblock *, Session *, Request *); -typedef int _cdecl uncExec(FuncStruct *, pblock *, Session *, Request *); +typedef int _cdecl FuncExec(FuncStruct *, pblock *, Session *, Request *); #endif /* XP_WIN32 */ typedef Func *FuncPtr; @@ -859,7 +863,12 @@ /* Define a handle for a thread */ //typedef void* SYS_THREAD; + +#ifdef XP_UNIX typedef pthread_t SYS_THREAD; +#else +typedef void* SYS_THREAD; +#endif /* Define an error value for the thread handle */ #define SYS_THREAD_ERROR NULL @@ -1534,7 +1543,7 @@ #ifdef XP_WIN32 -typedef HANDLE pid_t; +//typedef HANDLE pid_t; // TODO #define ERROR_PIPE \ (ERROR_BROKEN_PIPE | ERROR_BAD_PIPE | \ @@ -1557,20 +1566,20 @@ } #ifdef INTNSAPI -NSAPI_PUBLIC extern nsapi_dispatch_t *__nsapi30_table; +//NSAPI_PUBLIC extern nsapi_dispatch_t *__nsapi30_table; #if NSAPI_VERSION >= 302 -NSAPI_PUBLIC extern nsapi302_dispatch_t *__nsapi302_table; +//NSAPI_PUBLIC extern nsapi302_dispatch_t *__nsapi302_table; #endif /* NSAPI_VERSION >= 302 */ #if NSAPI_VERSION >= 303 -NSAPI_PUBLIC extern nsapi303_dispatch_t *__nsapi303_table; +//NSAPI_PUBLIC extern nsapi303_dispatch_t *__nsapi303_table; #endif /* NSAPI_VERSION >= 303 */ #else -__declspec(dllimport) nsapi_dispatch_t *__nsapi30_table; +//__declspec(dllimport) nsapi_dispatch_t *__nsapi30_table; #if NSAPI_VERSION >= 302 -__declspec(dllimport) nsapi302_dispatch_t *__nsapi302_table; +//__declspec(dllimport) nsapi302_dispatch_t *__nsapi302_table; #endif /* NSAPI_VERSION >= 302 */ #if NSAPI_VERSION >= 303 -__declspec(dllimport) nsapi303_dispatch_t *__nsapi303_table; +//__declspec(dllimport) nsapi303_dispatch_t *__nsapi303_table; #endif /* NSAPI_VERSION >= 303 */ #endif /* INTNSAPI */