modified: myjupyterlab.sh
[GalaxyCodeBases.git] / etc / Windows / vlmcsd_old_vancepym / shared_globals.h
bloba59618cb1b276ecb8f81a6cc73f4ec4e77100848
1 #ifndef INCLUDED_SHARED_GLOBALS_H
2 #define INCLUDED_SHARED_GLOBALS_H
4 #ifndef CONFIG
5 #define CONFIG "config.h"
6 #endif // CONFIG
7 #include CONFIG
9 #include <sys/types.h>
11 #ifndef _WIN32
12 #include <sys/socket.h>
13 #include <netinet/in.h>
14 #include <arpa/inet.h>
15 #include <netdb.h>
16 #include <pwd.h>
17 #include <grp.h>
18 #include <syslog.h>
19 #if (!defined(NO_LIMIT) || defined(USE_THREADS)) && !__minix__
20 #include <pthread.h>
21 #endif // (!defined(NO_LIMIT) || defined(USE_THREADS)) && !__minix__
22 #include <fcntl.h>
23 #include <sys/stat.h>
24 #if !defined(NO_LIMIT) && !__minix__
25 #include <semaphore.h>
26 #endif // !defined(NO_LIMIT) && !__minix__
27 #else
28 #ifndef USE_MSRPC
29 #include <winsock2.h>
30 #include <ws2tcpip.h>
31 #endif // USE_MSRPC
32 #include <windows.h>
33 #endif
35 #include <signal.h>
36 #include <unistd.h>
37 #include <time.h>
38 #include <stdio.h>
39 #include <stdlib.h>
40 #include <string.h>
41 #include <stdint.h>
42 #include <limits.h>
43 #include <ctype.h>
44 #include <stdarg.h>
45 #include <semaphore.h>
46 #include "types.h"
48 #define MAX_KMSAPPS 3
49 typedef struct
51 const char* Epid;
52 const BYTE* HwId;
53 #ifndef NO_LOG
54 const char* EpidSource;
55 #endif // NO_LOG
56 } KmsResponseParam_t, *PKmsResponseParam_t;
58 #if !defined(NO_LIMIT) && !__minix__
59 #ifndef SEM_VALUE_MAX // Android does not define this
60 #ifdef __ANDROID__
61 #define SEM_VALUE_MAX 0x3fffffff
62 #elif !defined(_WIN32)
63 #define SEM_VALUE_MAX 0x7fffffff
64 #else
65 #define SEM_VALUE_MAX 0x7fff // Be cautious if unknown
66 #endif // __ANDROID__
67 #endif // !defined(SEM_VALUE_MAX)
68 #endif // !defined(NO_LIMIT) && !__minix__
70 extern const char *const Version;
72 //Fix for stupid eclipse parser
73 #ifndef UINT_MAX
74 #define UINT_MAX 4294967295
75 #endif
78 extern int global_argc, multi_argc;
79 extern CARGV global_argv, multi_argv;
80 extern int_fast8_t nodaemon;
81 extern DWORD VLActivationInterval;
82 extern DWORD VLRenewalInterval;
83 extern int_fast8_t DisconnectImmediately;
84 extern KmsResponseParam_t KmsResponseParameters[MAX_KMSAPPS];
85 extern const char *const cIPv4;
86 extern const char *const cIPv6;
87 extern int_fast8_t InetdMode;
89 #ifndef USE_MSRPC
90 extern int_fast8_t UseMultiplexedRpc;
91 extern int_fast8_t UseRpcNDR64;
92 extern int_fast8_t UseRpcBTFN;
93 #endif // USE_MSRPC
95 #ifndef NO_SOCKETS
96 extern const char *defaultport;
97 #endif // NO_SOCKETS
99 #if !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
100 extern int_fast8_t IsRestarted;
101 #endif // !defined(NO_SOCKETS) && !defined(NO_SIGHUP) && !defined(_WIN32)
103 #if !defined(NO_TIMEOUT) && !__minix__
104 extern DWORD ServerTimeout;
105 #endif // !defined(NO_TIMEOUT) && !__minix__
107 #if !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
108 extern uint32_t MaxTasks;
109 #endif // !defined(NO_LIMIT) && !defined (NO_SOCKETS) && !__minix__
111 #ifndef NO_LOG
112 extern char *fn_log;
113 extern int_fast8_t logstdout;
114 #ifndef NO_VERBOSE_LOG
115 extern int_fast8_t logverbose;
116 #endif
117 #endif
119 #ifndef NO_RANDOM_EPID
120 extern int_fast8_t RandomizationLevel;
121 extern uint16_t Lcid;
122 #endif
124 #if !defined(NO_SOCKETS) && !defined(USE_MSRPC)
125 extern SOCKET *SocketList;
126 extern int numsockets;
128 #if !defined(NO_LIMIT) && !__minix__
130 #ifndef _WIN32
131 extern sem_t *Semaphore;
132 #else // _WIN32
133 extern HANDLE Semaphore;
134 #endif // _WIN32
136 #endif // !defined(NO_LIMIT) && !__minix__
138 #endif // !defined(NO_SOCKETS) && !defined(USE_MSRPC)
140 #ifdef _NTSERVICE
141 extern int_fast8_t IsNTService;
142 extern int_fast8_t ServiceShutdown;
143 #endif
145 #ifndef NO_LOG
146 #ifdef USE_THREADS
147 #if !defined(_WIN32) && !defined(__CYGWIN__)
148 extern pthread_mutex_t logmutex;
149 #else
150 extern CRITICAL_SECTION logmutex;
151 #endif // _WIN32
152 #endif // USE_THREADS
153 #endif // NO_LOG
156 #endif // INCLUDED_SHARED_GLOBALS_H