Commit Graph

16 Commits

Author SHA1 Message Date
Henrik Rydgård
6a1fa728d8 Remove Globals.h 2017-08-31 17:15:22 +02:00
Henrik Rydgard
5df4bac6d2 Delete some left behind unused code 2017-01-25 10:05:39 +01:00
latot
96f4eba6b0 Remove empty define 2016-12-04 01:08:01 -03:00
Florent Castelli
70593d1004 android: Change preprocessor define to standard __ANDROID__
ANDROID is only standard to the old Makefile buildsystem, not the platform.
2016-10-12 11:14:09 +02:00
Jan Beich
61c106c57f Common: avoid redefining bswap* via <sys/types.h> on BSDs
In file included from Common/CPUDetect.cpp:27:
In file included from Common/Common.h:139:
Common/Swap.h:76:23: error:
      C++ requires a type specifier for all declarations
inline unsigned short bswap16(unsigned short x) { return (x << 8) | (x >> 8); }
                      ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
                        ^
/usr/include/x86/endian.h:74:16: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(x) ? \
                      ^
In file included from Common/CPUDetect.cpp:27:
In file included from Common/Common.h:139:
Common/Swap.h:76:23: error:
      expected ')'
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
                        ^
/usr/include/x86/endian.h:74:40: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(x) ? \
                                              ^
Common/Swap.h:76:23: note:
      to match this '('
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
                        ^
/usr/include/x86/endian.h:74:15: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(x) ? \
                     ^
In file included from Common/CPUDetect.cpp:27:
In file included from Common/Common.h:139:
Common/Swap.h:76:59: error:
      use of undeclared identifier 'x'
inline unsigned short bswap16(unsigned short x) { return (x << 8) | (x >> 8); }
                                                          ^
Common/Swap.h:76:70: error:
      use of undeclared identifier 'x'
inline unsigned short bswap16(unsigned short x) { return (x << 8) | (x >> 8); }
                                                                     ^
Common/Swap.h:77:21: error:
      expected ')'
inline unsigned int bswap32(unsigned int x) { return (x >> 24) | ((x & 0xFF0...
                    ^
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
                        ^
/usr/include/x86/endian.h:77:27: note: expanded from macro '__bswap32'
        (__builtin_constant_p(x) ?      \
                                 ^
Common/Swap.h:77:21: note:
      to match this '('
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
                        ^
/usr/include/x86/endian.h:77:2: note: expanded from macro '__bswap32'
        (__builtin_constant_p(x) ?      \
        ^
In file included from Common/CPUDetect.cpp:27:
In file included from Common/Common.h:139:
Common/Swap.h:77:21: error:
      functions that differ only in their return type cannot be overloaded
inline unsigned int bswap32(unsigned int x) { return (x >> 24) | ((x & 0xFF0...
                    ^
/usr/include/sys/endian.h:60:20: note: expanded from macro 'bswap32'
                        ^
/usr/include/x86/endian.h:77:3: note: expanded from macro '__bswap32'
        (__builtin_constant_p(x) ?      \
         ^
native/base/basictypes.h:92:44: note:
      previous implicit declaration is here
inline uint16 swap16(uint16 _data) {return bswap16(_data);}
                                           ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
                        ^
/usr/include/x86/endian.h:74:16: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(x) ? \
                      ^
In file included from Common/CPUDetect.cpp:27:
In file included from Common/Common.h:139:
Common/Swap.h:78:27: error:
      expected ')'
inline unsigned long long bswap64(unsigned long long x) { return ((unsigned ...
                          ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
                        ^
/usr/include/x86/endian.h:80:27: note: expanded from macro '__bswap64'
        (__builtin_constant_p(x) ?      \
                                 ^
Common/Swap.h:78:27: note:
      to match this '('
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
                        ^
/usr/include/x86/endian.h:80:2: note: expanded from macro '__bswap64'
        (__builtin_constant_p(x) ?      \
        ^
In file included from Common/CPUDetect.cpp:27:
In file included from Common/Common.h:139:
Common/Swap.h:78:27: error:
      functions that differ only in their return type cannot be overloaded
inline unsigned long long bswap64(unsigned long long x) { return ((unsigned ...
                          ^
/usr/include/sys/endian.h:61:20: note: expanded from macro 'bswap64'
                        ^
/usr/include/x86/endian.h:80:3: note: expanded from macro '__bswap64'
        (__builtin_constant_p(x) ?      \
         ^
native/base/basictypes.h:92:44: note:
      previous implicit declaration is here
inline uint16 swap16(uint16 _data) {return bswap16(_data);}
                                           ^
/usr/include/sys/endian.h:59:20: note: expanded from macro 'bswap16'
                        ^
/usr/include/x86/endian.h:74:16: note: expanded from macro '__bswap16'
        ((__uint16_t)(__builtin_constant_p(x) ? \
                      ^
8 errors generated.
2015-05-26 15:20:11 +03:00
chinhodado
3a15da48ac Change to pass by reference 2014-11-14 22:26:28 -05:00
Henrik Rydgard
215abfb951 Some cleanup in /Common 2014-09-06 10:47:25 +02:00
Ced2911
1e1a2fec8b [Common] add unsigned long 2014-03-02 11:18:42 -08:00
Ced2911
ff65b30ee4 [Swap] more operator 2014-01-26 14:29:20 -08:00
Henrik Rydgård
e5e17fbc6e More include cleanup. Hoping for very slightly faster compile times.. 2013-12-30 10:49:05 +01:00
Henrik Rydgård
0e54e24b24 Revert "Use swap code from native instead. Remove all other versions of it."
Broke movie playback.

This reverts commit 9fcb08a326.

Conflicts:
	native
2013-10-28 17:24:03 +01:00
Sacha
9fcb08a326 Use swap code from native instead. Remove all other versions of it. 2013-10-28 03:07:32 +10:00
Ced2911
6296f2b75c fix endian struct 2013-08-16 20:44:23 +02:00
Ced2911
cc95cde450 fix swap type 2013-07-30 19:50:35 +02:00
Unknown W. Brackets
0b5bdeb1d3 Fix some compile failures under big endian. 2013-07-28 21:04:17 -07:00
Unknown W. Brackets
9ae32f641a Move swap_struct_t to its own file.
This way bswap32() and friends are already defined.  Otherwise there are
errors.
2013-07-28 21:03:44 -07:00