mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
OpenBSD build fix from Brad Smith (plus a couple of irrelevant changes to the same file from my local tree)
git-svn-id: https://svn.eduke32.com/eduke32@2916 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
8d3db58950
commit
71fc24c0f7
1 changed files with 22 additions and 4 deletions
|
@ -146,12 +146,25 @@ static inline float nearbyintf(float x)
|
|||
# endif
|
||||
# define B_ENDIAN_C_INLINE 1
|
||||
|
||||
#elif defined(GEKKO)
|
||||
#elif defined(GEKKO) || defined(__ANDROID__)
|
||||
# define B_LITTLE_ENDIAN 0
|
||||
# define B_BIG_ENDIAN 1
|
||||
# define B_ENDIAN_C_INLINE 1
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
|
||||
#elif defined(__OpenBSD__)
|
||||
# include <machine/endian.h>
|
||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define B_LITTLE_ENDIAN 1
|
||||
# define B_BIG_ENDIAN 0
|
||||
# elif _BYTE_ORDER == _BIG_ENDIAN
|
||||
# define B_LITTLE_ENDIAN 0
|
||||
# define B_BIG_ENDIAN 1
|
||||
# endif
|
||||
# define B_SWAP64(x) __swap64(x)
|
||||
# define B_SWAP32(x) __swap32(x)
|
||||
# define B_SWAP16(x) __swap16(x)
|
||||
|
||||
#elif defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
# include <sys/endian.h>
|
||||
# if _BYTE_ORDER == _LITTLE_ENDIAN
|
||||
# define B_LITTLE_ENDIAN 1
|
||||
|
@ -352,8 +365,13 @@ static inline void dtol(double d, int32_t *a)
|
|||
# define BS_IRGRP S_IRGRP
|
||||
# define BS_IWGRP S_IWGRP
|
||||
# define BS_IEXEC S_IEXEC
|
||||
# define BS_IWRITE S_IWRITE
|
||||
# define BS_IREAD S_IREAD
|
||||
# ifdef __ANDROID__
|
||||
# define BS_IWRITE S_IWUSR
|
||||
# define BS_IREAD S_IRUSR
|
||||
# else
|
||||
# define BS_IWRITE S_IWRITE
|
||||
# define BS_IREAD S_IREAD
|
||||
# endif
|
||||
# define BS_IFIFO S_IFIFO
|
||||
# define BS_IFCHR S_IFCHR
|
||||
# define BS_IFBLK S_IFBLK
|
||||
|
|
Loading…
Reference in a new issue