Browse Source

public: fix build

pull/2/head
Alibek Omarov 2 years ago
parent
commit
113904ea91
  1. 10
      engine/common/lib_common.c
  2. 6
      public/build.c
  3. 2
      public/build.h
  4. 4
      public/buildenums.h

10
engine/common/lib_common.c

@ -126,16 +126,6 @@ dll_user_t *FS_FindLibrary( const char *dllname, qboolean directpath )
============================================================================= =============================================================================
*/ */
enum
{
};
static void COM_GenerateCommonLibraryName( const char *name, const char *ext, int os, int cpu, char *out, size_t size )
{
}
static void COM_GenerateCommonLibraryName( const char *name, const char *ext, char *out, size_t size ) static void COM_GenerateCommonLibraryName( const char *name, const char *ext, char *out, size_t size )
{ {
#if ( XASH_WIN32 || XASH_LINUX || XASH_APPLE ) && XASH_X86 #if ( XASH_WIN32 || XASH_LINUX || XASH_APPLE ) && XASH_X86

6
public/build.c

@ -74,12 +74,14 @@ int Q_buildnum_compat( void )
/* /*
============ ============
Q_buildos_ Q_GetPlatformStringByID
Returns name of operating system by ID. Without any spaces. Returns name of operating system by ID. Without any spaces.
TODO: add platform-dependent ABI variants, for example, different libc on Linux
============ ============
*/ */
const char *Q_GetPlatformStringByID( const int platform ) const char *Q_PlatformStringByID( const int platform )
{ {
switch( platform ) switch( platform )
{ {

2
public/build.h

@ -137,7 +137,7 @@ Then you can use another oneliner to query all variables:
#define XASH_LITTLE_ENDIAN 1 #define XASH_LITTLE_ENDIAN 1
#elif __BIG_ENDIAN__ #elif __BIG_ENDIAN__
#define XASH_BIG_ENDIAN 1 #define XASH_BIG_ENDIAN 1
#elif defined__BYTE_ORDER__) && defined__ORDER_BIG_ENDIAN__) && defined__ORDER_LITTLE_ENDIAN__) // some compilers define this #elif defined __BYTE_ORDER__ && defined __ORDER_BIG_ENDIAN__ && defined __ORDER_LITTLE_ENDIAN__ // some compilers define this
#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ #if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
#define XASH_BIG_ENDIAN 1 #define XASH_BIG_ENDIAN 1
#elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ #elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__

4
public/buildenums.h

@ -126,8 +126,6 @@ GNU General Public License for more details.
#define ARCHITECTURE_RISCV_FP_SOFT 0 #define ARCHITECTURE_RISCV_FP_SOFT 0
#define ARCHITECTURE_RISCV_FP_SINGLE 1 #define ARCHITECTURE_RISCV_FP_SINGLE 1
#define ARCHITECTURE_RISCV_FP_DOUBLE 2 #define ARCHITECTURE_RISCV_FP_DOUBLE 2
#define ARCHITECTURE_RISCV_FP_MASK ( BIT( 2 ) - 1 )
#define ARCHITECTURE_RISCV_FP_SHIFT 0
#if XASH_ARCHITECTURE == ARCHITECTURE_ARM #if XASH_ARCHITECTURE == ARCHITECTURE_ARM
#if XASH_ARM_HARDFP #if XASH_ARM_HARDFP
@ -145,6 +143,8 @@ GNU General Public License for more details.
#else #else
#error #error
#endif #endif
#else
#define XASH_ARCHITECTURE_ABI 0 // unused
#endif #endif

Loading…
Cancel
Save