X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fcfg%2Fos.h;h=41a1ef7a7be9ce6fd58e9cb435ffd123c2ce76ba;hb=78eea60c48fd902dd469654a69b1dcf5abb93f0c;hp=924daadea7f9c79e6e253b6d7fb00207186eebaf;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/cfg/os.h b/bertos/cfg/os.h index 924daade..41a1ef7a 100644 --- a/bertos/cfg/os.h +++ b/bertos/cfg/os.h @@ -34,15 +34,15 @@ * * \version $Id$ * - * \author Bernardo Innocenti + * \author Bernie Innocenti */ #ifndef DEVLIB_OS_H #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) @@ -53,10 +53,10 @@ // 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 @@ -109,9 +109,9 @@ #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 @@ -131,11 +131,14 @@ #define OS_DARWIN 0 #endif + +#include /* For ARCH_QT */ + /* * 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