b0563a493c
* Add support for Maxmind GeoIP2 database files (#913). * Copy/paste error. * Mark GeoipCode3 as deprecated. * Fix build when compiling with AMBuild. * Replace loose libmaxminddb files with submodule. * Fix Linux build. * One more hack for submodule. * Actually fix Linux build. * GeoIP2 extension to sourcemod * Update basevotes When a player leaves during a voteban, he will be banned anyway. Also added a cvar with a ban time setting. * Update basevotes.sp * Update AMBuilder * ke::AString to std::string * Update extension.cpp * Update AMBuilder * Added coordination natives Added GeoipLatitude, GeoipLongitude, GeoipDistance natives. * Create osdefs.h * Update maxminddb_config.h * Update extension.cpp * Update extension.cpp * Added automatic search for database file * Fix automatic search for database file * Update extension.cpp * Update geoip.inc * .gitmodules revert * Update geoip.inc * Update libmaxminddb to version 1.5.2 * Update extension.cpp * Check language in the DB * Removed langCount variable * Determination of the client's language * Update geoip.inc * Update geoip.inc * Update extension.cpp * Update geoip.inc * Update extension.cpp * space instead of tab in .inc * Update extension.cpp * Update geoip.inc * Optimizing length measurement region code * Update package script to fetch the new GeoLite2 database This package is the last CC-BY-SA licensed GeoLite2-City database extracted from https://src.fedoraproject.org/rpms/geolite2 from december 2019. This doubles the download size for SM packages, but it's what we have to deal with atm :( * Fix potentially returning uninitialized memory in GeoipRegionCode If the lookup failed, we'd copy back whatever is on the stack in the ccode buffer. Co-authored-by: Nick Hastings <nshastings@gmail.com> Co-authored-by: Headline <michaelwflaherty@me.com> Co-authored-by: Accelerator74 <dmitry@447751-accele74.tmweb.ru> Co-authored-by: Peace-Maker <peace-maker@wcfan.de>
65 lines
1.5 KiB
C++
65 lines
1.5 KiB
C++
/* __MSDOS__ set when compiling for DOS (not Windows)
|
|
* _Windows set when compiling for any version of Microsoft Windows
|
|
* __WIN32__ set when compiling for Windows95 or WindowsNT (32 bit mode)
|
|
* __32BIT__ set when compiling in 32-bit "flat" mode (DOS or Windows)
|
|
*
|
|
* Copyright 1998-2002, ITB CompuPhase, The Netherlands.
|
|
* info@compuphase.com.
|
|
*/
|
|
|
|
#ifndef _OSDEFS_H
|
|
#define _OSDEFS_H
|
|
|
|
/* Every compiler uses different "default" macros to indicate the mode
|
|
* it is in. Throughout the source, we use the Borland C++ macros, so
|
|
* the macros of Watcom C/C++ and Microsoft Visual C/C++ are mapped to
|
|
* those of Borland C++.
|
|
*/
|
|
#if defined(__WATCOMC__)
|
|
# if defined(__WINDOWS__) || defined(__NT__)
|
|
# define _Windows 1
|
|
# endif
|
|
# ifdef __386__
|
|
# define __32BIT__ 1
|
|
# endif
|
|
# if defined(_Windows) && defined(__32BIT__)
|
|
# define __WIN32__ 1
|
|
# endif
|
|
#elif defined(_MSC_VER)
|
|
# if defined(_WINDOWS) || defined(_WIN32)
|
|
# define _Windows 1
|
|
# endif
|
|
# ifdef _WIN32
|
|
# define __WIN32__ 1
|
|
# define __32BIT__ 1
|
|
# endif
|
|
#endif
|
|
|
|
#if defined __linux__
|
|
#include <endian.h>
|
|
#endif
|
|
|
|
#if defined __APPLE__
|
|
#include <sys/types.h>
|
|
#endif
|
|
|
|
/* Linux NOW has these */
|
|
#if !defined BIG_ENDIAN
|
|
#define BIG_ENDIAN 4321
|
|
#endif
|
|
#if !defined LITTLE_ENDIAN
|
|
#define LITTLE_ENDIAN 1234
|
|
#endif
|
|
|
|
/* educated guess, BYTE_ORDER is undefined, i386 is common => little endian */
|
|
#if !defined BYTE_ORDER
|
|
#if defined UCLINUX
|
|
#define BYTE_ORDER BIG_ENDIAN
|
|
#else
|
|
#define BYTE_ORDER LITTLE_ENDIAN
|
|
#endif
|
|
#endif
|
|
|
|
#endif /* _OSDEFS_H */
|
|
|