Added macro so that ConCommands created with the SDK's CON_COMMAND and CON_COMMAND_F macros can be properly registered and unregisterd
1 /* ======== SourceMM ========
2 * Copyright (C) 2004-2005 Metamod:Source Development Team
3 * No warranties of any kind
7 * Author(s): David "BAILOPAN" Anderson
8 * ============================
11 #ifndef _INCLUDE_OSLINK_H
12 #define _INCLUDE_OSLINK_H
15 * @brief Defines OS-independent information
19 #if defined __WIN32__ || defined _WIN32 || defined WIN32
20 #define WIN32_LEAN_AND_MEAN
25 #define mkdir(a) _mkdir(a)
26 #define dlmount(x) LoadLibrary(x)
27 #define dlsym(x, s) GetProcAddress(x, s)
28 #define dlclose(x) FreeLibrary(x)
29 const char* dlerror();
30 #elif defined __linux__
34 #include <sys/types.h>
36 #define dlmount(x) dlopen(x,RTLD_NOW)
37 typedef void* HINSTANCE;
45 #if defined __WIN32__ || defined _WIN32 || defined WIN32
46 #define SMM_API extern "C" __declspec(dllexport)
47 #elif defined __GNUC__
48 #define SMM_API extern "C"
51 #if defined __WIN32__ || defined _WIN32 || defined WIN32
52 typedef __int64 int64_t;
53 typedef unsigned __int64 uint64_t;
54 #elif defined __GNUC__
55 # if !__GLIBC_HAVE_LONG_LONG
56 typedef long long int64_t;
58 typedef unsigned long long uint64_t;
62 #define snprintf _snprintf
63 #define vsnprintf _vsnprintf
66 #endif //_INCLUDE_OSLINK_H