Last change
on this file since 25492 was 25492, checked in by ak19, 12 years ago |
Joshua Scarsbrook found that compilation failed on Macs (he was compiling GS3, but the compilation failed in GS2 code) and that this had to do with unix not being defined on macs, so that the compiler went on to the Windows part of the hash-definition and then failed. Dr Bainbridge found there was an equivalent APPLE definition which would be true for all Mac operating systems (including iPhones).
|
File size:
700 bytes
|
Line | |
---|
1 | #ifndef MGLONG_H
|
---|
2 | #define MGLONG_H
|
---|
3 |
|
---|
4 | // See http://stackoverflow.com/questions/6802903/c-ifdef-mac-os-x-question
|
---|
5 | // and http://stackoverflow.com/questions/5919996/how-to-detect-reliably-mac-os-x-ios-linux-windows-in-c-preprocessor
|
---|
6 | #if defined __unix__ || defined __APPLE__
|
---|
7 | #include <stdint.h>
|
---|
8 | #else
|
---|
9 | typedef __int8 int8_t;
|
---|
10 | typedef __int16 int16_t;
|
---|
11 | typedef __int32 int32_t;
|
---|
12 | typedef __int64 int64_t;
|
---|
13 | typedef unsigned __int8 uint8_t;
|
---|
14 | typedef unsigned __int16 uint16_t;
|
---|
15 | typedef unsigned __int32 uint32_t;
|
---|
16 | typedef unsigned __int64 uint64_t;
|
---|
17 | #endif
|
---|
18 |
|
---|
19 | #ifndef mg_u_long
|
---|
20 | #define mg_u_long uint32_t
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | #ifndef mg_s_long
|
---|
24 | #define mg_s_long int32_t
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.