Fix PowerPC support
[bertos.git] / bertos / cfg / os.h
index 041d591f978b8130fd1e6e43f40cc2c6e9c35b39..cc1ebe696989011005908e04b0c13de6ef9ca2a6 100644 (file)
@@ -41,8 +41,8 @@
 #define DEVLIB_OS_H
 
 /** Macro to include OS-specific versions of the headers. */
-#define OS_HEADER(module)  PP_STRINGIZE(PP_CAT3(module, _, OS_ID).h)
-#define OS_CSOURCE(module) PP_STRINGIZE(PP_CAT3(module, _, OS_ID).c)
+#define OS_HEADER(module)  PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).h)
+#define OS_CSOURCE(module) PP_STRINGIZE(emul/PP_CAT3(module, _, OS_ID).c)
 
 /*
  * OS autodetection (Some systems trigger multiple OS definitions)
 
        // FIXME: Maybe disable Win32 exceptions?
        typedef int cpuflags_t;
-       #define IRQ_DISABLE                /* FIXME */
-       #define IRQ_ENABLE                 /* FIXME */
-       #define IRQ_SAVE_DISABLE(old_sigs) /* FIXME */
-       #define IRQ_RESTORE(old_sigs)      /* FIXME */
+       #define IRQ_DISABLE                FIXME
+       #define IRQ_ENABLE                 FIXME
+       #define IRQ_SAVE_DISABLE(old_sigs) FIXME
+       #define IRQ_RESTORE(old_sigs)      FIXME
 
 #else
        #define OS_WIN32  0
 
        #define IRQ_ENABLED() \
        ({ \
-               sigset_t sigs; \
-               sigprocmask(SIG_SETMASK, NULL, &sigs); \
-               sigismember(&sigs, SIGALRM) ? false : true; \
+               sigset_t sigs__; \
+               sigprocmask(SIG_SETMASK, NULL, &sigs__); \
+               sigismember(&sigs__, SIGALRM) ? false : true; \
         })
 
 #else
  * We want Qt and other frameworks to look like OSes because you would
  * tipically want their portable abstractions if you're using one of these.
  */
-#if defined(_QT)
+#if defined(_QT) || (defined(ARCH_QT) && (ARCH & ARCH_QT))
        #define OS_QT 1
        #undef  OS_ID
        #define OS_ID qt