1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2024-12-01 13:24:25 +01:00

Oh, maybe I should replace this too

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40222
This commit is contained in:
Scott Ehlert 2006-07-19 06:57:03 +00:00
parent a5ee696a81
commit b2947119cd

View File

@ -1,5 +1,5 @@
/* ======== SourceMM ======== /* ======== SourceMM ========
* Copyright (C) 2004-2005 Metamod:Source Development Team * Copyright (C) 2004-2006 Metamod:Source Development Team
* No warranties of any kind * No warranties of any kind
* *
* License: zlib/libpng * License: zlib/libpng
@ -19,14 +19,22 @@
#if defined __WIN32__ || defined _WIN32 || defined WIN32 #if defined __WIN32__ || defined _WIN32 || defined WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#define OS_WIN32 #define OS_WIN32
#if defined _MSC_VER && _MSC_VER >= 1400
#undef ARRAYSIZE
#else
#define mkdir _mkdir
#endif
#include <windows.h> #include <windows.h>
#include <io.h> #include <io.h>
#include <direct.h> #include <direct.h>
#define mkdir(a) _mkdir(a)
#define dlmount(x) LoadLibrary(x) #define dlmount(x) LoadLibrary(x)
#define dlsym(x, s) GetProcAddress(x, s) #define dlsym(x, s) GetProcAddress(x, s)
#define dlclose(x) FreeLibrary(x) #define dlclose(x) FreeLibrary(x)
const char* dlerror(); const char* dlerror();
#define PATH_SEP_STR "\\"
#define PATH_SEP_CHAR '\\'
#define ALT_SEP_CHAR '/'
#define SERVER_DLL "server.dll"
#elif defined __linux__ #elif defined __linux__
#define OS_LINUX #define OS_LINUX
#include <dlfcn.h> #include <dlfcn.h>
@ -35,6 +43,11 @@
#include <dirent.h> #include <dirent.h>
#define dlmount(x) dlopen(x,RTLD_NOW) #define dlmount(x) dlopen(x,RTLD_NOW)
typedef void* HINSTANCE; typedef void* HINSTANCE;
#define PATH_SEP_STR "/"
#define PATH_SEP_CHAR '/'
#define ALT_SEP_CHAR '\\'
#define stricmp strcasecmp
#define SERVER_DLL "server_i486.so"
#endif #endif
#if defined __linux__ #if defined __linux__
@ -42,6 +55,8 @@
int GetLastError(); int GetLastError();
#endif #endif
bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength);
#if defined __WIN32__ || defined _WIN32 || defined WIN32 #if defined __WIN32__ || defined _WIN32 || defined WIN32
#define SMM_API extern "C" __declspec(dllexport) #define SMM_API extern "C" __declspec(dllexport)
#elif defined __GNUC__ #elif defined __GNUC__
@ -52,11 +67,12 @@
typedef __int64 int64_t; typedef __int64 int64_t;
typedef unsigned __int64 uint64_t; typedef unsigned __int64 uint64_t;
#elif defined __GNUC__ #elif defined __GNUC__
# if !__GLIBC_HAVE_LONG_LONG #include <stdint.h>
#if !__GLIBC_HAVE_LONG_LONG
typedef long long int64_t; typedef long long int64_t;
# endif
typedef unsigned long long uint64_t; typedef unsigned long long uint64_t;
#endif #endif
#endif
#ifndef __linux__ #ifndef __linux__
#define snprintf _snprintf #define snprintf _snprintf