Added support for Mac OS X and building with clang (bug 5601, r=dvander).

This commit is contained in:
Scott Ehlert
2013-02-13 01:14:37 -06:00
parent b0fe6c83e2
commit 40c1fee55a
191 changed files with 3835 additions and 1946 deletions

View File

@ -32,7 +32,7 @@
#ifndef AMXMODX_H
#define AMXMODX_H
#ifdef __linux__
#if defined(__linux__) || defined(__APPLE__)
#include <unistd.h>
#include <stdlib.h>
#include "sclinux.h"
@ -86,7 +86,7 @@ extern AMX_NATIVE_INFO vector_Natives[];
extern AMX_NATIVE_INFO g_SortNatives[];
extern AMX_NATIVE_INFO g_DataStructNatives[];
#ifndef __linux__
#if defined(_WIN32)
#define DLLOAD(path) (DLHANDLE)LoadLibrary(path)
#define DLPROC(m, func) GetProcAddress(m, func)
#define DLFREE(m) FreeLibrary(m)
@ -107,14 +107,14 @@ extern AMX_NATIVE_INFO g_DataStructNatives[];
#endif
#endif
#ifndef __linux__
#if defined(_WIN32)
typedef HINSTANCE DLHANDLE;
#else
typedef void* DLHANDLE;
#define INFINITE 0xFFFFFFFF
#endif
#ifndef __linux__
#if defined(_WIN32)
#define PATH_SEP_CHAR '\\'
#define ALT_SEP_CHAR '/'
#else
@ -139,7 +139,7 @@ int UTIL_ReadFlags(const char* c);
void UTIL_ClientPrint(edict_t *pEntity, int msg_dest, char *msg);
void UTIL_FakeClientCommand(edict_t *pEdict, const char *cmd, const char *arg1 = NULL, const char *arg2 = NULL);
void UTIL_GetFlags(char* flags, int flag);
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, char *pMessage);
void UTIL_HudMessage(edict_t *pEntity, const hudtextparms_t &textparms, const char *pMessage);
void UTIL_IntToString(int value, char *output);
void UTIL_ShowMOTD(edict_t *client, char *motd, int mlen, const char *name);
void UTIL_ShowMenu(edict_t* pEntity, int slots, int time, char *menu, int mlen);
@ -276,8 +276,8 @@ void modules_callPluginsUnloaded();
void modules_callPluginsUnloading();
cell* get_amxaddr(AMX *amx, cell amx_addr);
char* build_pathname(char *fmt, ...);
char* build_pathname_r(char *buffer, size_t maxlen, char *fmt, ...);
char* build_pathname(const char *fmt, ...);
char* build_pathname_r(char *buffer, size_t maxlen, const char *fmt, ...);
char* format_amxstring(AMX *amx, cell *params, int parm, int& len);
AMX* get_amxscript(int, void**, const char**);
const char* get_amxscriptname(AMX* amx);
@ -292,8 +292,8 @@ int unload_amxscript(AMX* amx, void** program);
void copy_amxmemory(cell* dest, cell* src, int len);
void get_modname(char*);
void print_srvconsole(char *fmt, ...);
void report_error(int code, char* fmt, ...);
void print_srvconsole(const char *fmt, ...);
void report_error(int code, const char* fmt, ...);
void* alloc_amxmemory(void**, int size);
void free_amxmemory(void **ptr);
// get_localinfo