projects
/
NeonServV5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed WIN32 support
[NeonServV5.git]
/
src
/
main.h
diff --git
a/src/main.h
b/src/main.h
index 6a2a99f575a38f666adb593a2a1b4d9f38b45684..d14869e11564df1426fe6b2a56967b18659f8bd3 100644
(file)
--- a/
src/main.h
+++ b/
src/main.h
@@
-21,7
+21,6
@@
#define NEONSERV_VERSION "5.3"
#define VERSION_PATCHLEVEL 543
#define NEONSERV_VERSION "5.3"
#define VERSION_PATCHLEVEL 543
-#include <features.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@
-31,6
+30,7
@@
#include <winsock2.h>
#include <malloc.h>
#else
#include <winsock2.h>
#include <malloc.h>
#else
+#include <features.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
@@
-45,7
+45,11
@@
#include <time.h>
#ifdef HAVE_THREADS
#include <pthread.h>
#include <time.h>
#ifdef HAVE_THREADS
#include <pthread.h>
-#include <sys/syscall.h>
+#ifdef WIN32
+#define pthread_self_tid() pthread_self().p
+#else
+#define pthread_self_tid() pthread_self()
+#endif
#define THREAD_MUTEX_INIT(var) { \
pthread_mutexattr_t mutex_attr; \
pthread_mutexattr_init(&mutex_attr);\
#define THREAD_MUTEX_INIT(var) { \
pthread_mutexattr_t mutex_attr; \
pthread_mutexattr_init(&mutex_attr);\
@@
-136,6
+140,8
@@
extern int statistics_enabled;
extern int running_threads;
extern pthread_mutex_t cache_sync;
extern pthread_mutex_t whohandler_sync, whohandler_mass_sync;
extern int running_threads;
extern pthread_mutex_t cache_sync;
extern pthread_mutex_t whohandler_sync, whohandler_mass_sync;
+
+int getCurrentThreadID();
#endif
int stricmp (const char *s1, const char *s2);
#endif
int stricmp (const char *s1, const char *s2);