Skip to content

Commit

Permalink
- Removed __orxRASPBERRY_PI__ as it should be covered by linux/arm
Browse files Browse the repository at this point in the history
  • Loading branch information
iarwain committed Oct 15, 2017
1 parent 2556bed commit ba5d2c1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 27 deletions.
4 changes: 0 additions & 4 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -1031,10 +1031,6 @@ <h3>
<td>orx is being compiled for Android Native</td>
</tr>
<tr>
<td align="center"><code>__orxRASPBERRY_PI__</code></td>
<td>orx is being compiled for Raspberry Pi</td>
</tr>
<tr>
<td align="center"><code>__orxCPP__</code></td>
<td>orx is being compiled with a C++ compiler</td>
</tr>
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,6 @@ for which you're compiling. Here's a quick list of these flags:
`__orxIOS__` | orx is being compiled for iOS
`__orxANDROID__` | orx is being compiled for Android
`__orxANDROID_NATIVE__` | orx is being compiled for Android Native
`__orxRASPBERRY_PI__` | orx is being compiled for Raspberry Pi
`__orxCPP__` | orx is being compiled with a C++ compiler
`__orxOBJC__` | orx is being compiled with an Objective-C compiler
`__orxFREEBASIC__` | orx is being compiled for FreeBasic, WIP
Expand Down
25 changes: 10 additions & 15 deletions code/include/base/orxDecl.h
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@
#endif /* __orxX86_64__ || __orxPPC64__ || __orxARM64__ */

/* No platform defines? */
#if !defined(__orxWINDOWS__) && !defined(__orxMAC__) && !defined(__orxLINUX__) && !defined(__orxIOS__) && !defined(__orxANDROID__) && !defined(__orxANDROID_NATIVE__)&& !defined(__orxRASPBERRY_PI__)
#if !defined(__orxWINDOWS__) && !defined(__orxMAC__) && !defined(__orxLINUX__) && !defined(__orxIOS__) && !defined(__orxANDROID__) && !defined(__orxANDROID_NATIVE__)

/* Windows? */
#if defined(_WIN32) || defined(WIN32)
Expand All @@ -202,11 +202,6 @@

#define __orxANDROID_NATIVE__

/* Raspberry Pi */
#elif defined(__orxARM__)

#define __orxRASPBERRY_PI__

/* Linux? */
#elif defined(linux) || defined(__linux__)

Expand All @@ -221,11 +216,11 @@

#else

#error "Couldn't guess platform define. Please provide it (__orxWINDOWS__/__orxMAC__/__orxLINUX__/__orxIOS__/__orxANDROID__/__orxANDROID_NATIVE__/__orxRASPBERRY_PI__)"
#error "Couldn't guess platform define. Please provide it (__orxWINDOWS__/__orxMAC__/__orxLINUX__/__orxIOS__/__orxANDROID__/__orxANDROID_NATIVE__)"

#endif

#endif /* !__orxWINDOWS__ && !__orxMAC__ && !__orxLINUX__ && !__orxIOS__ && !__orxANDROID__ && !__orxANDROID_NATIVE__ && !__orxRASPBERRY_PI__ */
#endif /* !__orxWINDOWS__ && !__orxMAC__ && !__orxLINUX__ && !__orxIOS__ && !__orxANDROID__ && !__orxANDROID_NATIVE__ */


#ifdef __cplusplus
Expand Down Expand Up @@ -305,15 +300,15 @@
/* Linux / Mac / iOS / Android */
#if defined(__orxLINUX__) || defined(__orxMAC__) || defined(__orxIOS__) || defined(__orxANDROID__) || defined(__orxANDROID_NATIVE__)

#if defined(__orxARM__) || defined(__orxLLVM__) || defined(__orxPPC__) || defined(__orxPPC64__) || defined(__orxX86_64__) || defined(__orxIOS__) || defined(__orxANDROID__) || defined(__orxANDROID_NATIVE__) || defined(__orxRASPBERRY_PI__) || defined(__orxARM64__)
#if defined(__orxARM__) || defined(__orxLLVM__) || defined(__orxPPC__) || defined(__orxPPC64__) || defined(__orxX86_64__) || defined(__orxIOS__) || defined(__orxANDROID__) || defined(__orxANDROID_NATIVE__) || defined(__orxARM64__)

#define orxFASTCALL

#define orxSTDCALL

#define orxCDECL

#else /* __orxARM__ || __orxLLVM__ || __orxPPC__ || __orxPPC64__ || __orxX86_64__ || __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ || __orxRASPBERRY_PI__ || __orxARM64__ */
#else /* __orxARM__ || __orxLLVM__ || __orxPPC__ || __orxPPC64__ || __orxX86_64__ || __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ || __orxARM64__ */

#ifdef __orxFREEBASIC__

Expand All @@ -329,7 +324,7 @@

#define orxCDECL __attribute__ ((cdecl))

#endif /* __orxARM__ || __orxLLVM__ || __orxPPC__ || __orxPPC64__ || __orxX86_64__ || __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ || __orxRASPBERRY_PI__ || __orxARM64__ */
#endif /* __orxARM__ || __orxLLVM__ || __orxPPC__ || __orxPPC64__ || __orxX86_64__ || __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ || __orxARM64__ */

/** The symbol will be exported (dll compilation) */
#define orxDLLEXPORT __attribute__ ((visibility("default")))
Expand All @@ -352,17 +347,17 @@
/** The null address */
#define orxNULL (0)

#if defined(__orxIOS__) || defined(__orxANDROID__) || defined(__orxANDROID_NATIVE__) || defined(__orxRASPBERRY_PI__)
#if defined(__orxIOS__) || defined(__orxANDROID__) || defined(__orxANDROID_NATIVE__)

/* iOS versions can only be embedded due to the lack of dlfcn presence */
#define __orxEMBEDDED__

/* always use static on iOS, Android and Raspberry */
/* Always use static on iOS and Android */
#define __orxSTATIC__

#endif /* __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ || __orxRASPBERRY_PI__ */
#endif /* __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ */

#endif /* __orxLINUX__ || __orxMAC__ || __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ || __orxRASPBERRY_PI__ */
#endif /* __orxLINUX__ || __orxMAC__ || __orxIOS__ || __orxANDROID__ || __orxANDROID_NATIVE__ */

#endif /* __orxWINDOWS__ */

Expand Down
8 changes: 4 additions & 4 deletions code/src/core/orxThread.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@
#include <sys/types.h>
#include <unistd.h>

#if defined(__orxLINUX__) || defined(__orxRASPBERRY_PI__)
#if defined(__orxLINUX__)

#include <sched.h>

#endif /* __orxLINUX__ || __orxRASPBERRY_PI__ */
#endif /* __orxLINUX__ */

#if defined (__orxANDROID__) || defined(__orxANDROID_NATIVE__)

Expand Down Expand Up @@ -341,7 +341,7 @@ orxSTATUS orxFASTCALL orxThread_Init()
sstThread.astThreadInfoList[orxTHREAD_KU32_MAIN_THREAD_ID].hThread = pthread_self();
sstThread.astThreadInfoList[orxTHREAD_KU32_MAIN_THREAD_ID].u32Flags = orxTHREAD_KU32_INFO_FLAG_INITIALIZED;

#if defined(__orxLINUX__) || defined(__orxRASPBERRY_PI__)
#if defined(__orxLINUX__)

{
cpu_set_t stSet;
Expand All @@ -354,7 +354,7 @@ orxSTATUS orxFASTCALL orxThread_Init()
pthread_setaffinity_np(sstThread.astThreadInfoList[orxTHREAD_KU32_MAIN_THREAD_ID].hThread, sizeof(cpu_set_t), &stSet);
}

#endif /* __orxLINUX__ || __orxRASPBERRY_PI__ */
#endif /* __orxLINUX__ */

#endif /* __orxWINDOWS__ */

Expand Down
6 changes: 3 additions & 3 deletions code/src/io/orxFile.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
*/
#define orxFILE_KU32_BUFFER_SIZE 512 /**< Buffer size */

#if defined(__orxLINUX__) || defined(__orxRASPBERRY_PI__)
#if defined(__orxLINUX__)

#define orxFILE_KZ_APPLICATION_FOLDER ".local/share"

Expand Down Expand Up @@ -314,7 +314,7 @@ const orxSTRING orxFASTCALL orxFile_GetHomeDirectory(const orxSTRING _zSubPath)
}
}

#elif defined(__orxLINUX__) || defined(__orxMAC__) || defined(__orxRASPBERRY_PI__)
#elif defined(__orxLINUX__) || defined(__orxMAC__)

{
const orxCHAR *zHome;
Expand Down Expand Up @@ -400,7 +400,7 @@ const orxSTRING orxFASTCALL orxFile_GetApplicationSaveDirectory(const orxSTRING
}
}

#elif defined(__orxLINUX__) || defined(__orxMAC__) || defined(__orxRASPBERRY_PI__)
#elif defined(__orxLINUX__) || defined(__orxMAC__)

{
const orxCHAR *zHome;
Expand Down

0 comments on commit ba5d2c1

Please sign in to comment.