]> rtime.felk.cvut.cz Git - frescor/fosa.git/blobdiff - include/fosa_opaque_types.h
AQuoSA: Avoid redefinition of preprocessor symbols if they were defined earlier
[frescor/fosa.git] / include / fosa_opaque_types.h
index bff0981162471fc08d14658a5a09daaf86277f52..6a8be30d55072a3bf8c1dab30866e8537d737148 100644 (file)
@@ -130,7 +130,7 @@ typedef pthread_cond_t FOSA_COND_T_OPAQUE;
 
 /* Local jump */
 /**************/
-#include "marte_non_local_jmp.h"
+#include "misc/marte_non_local_jmp.h"
 
 #define FOSA_LONG_JUMP_CONTEXT_T_OPAQUE  struct { \
   marte_nonlocaljmp_context_t marte_context;      \
@@ -259,18 +259,24 @@ typedef int FOSA_THREAD_SET_ID_T_OPAQUE
 #include <unistd.h>
 #include <linux/unistd.h>
 
+#ifndef _XOPEN_SOURCE
 #define _XOPEN_SOURCE 500
+#endif
+#ifndef __USE_UNIX98
 #define __USE_UNIX98
+#endif
 #include <pthread.h>
 
 #include <signal.h>
+#include <setjmp.h>
 #include <errno.h>
 #include <time.h>
 
-/* Time */
-/********/
-// typedef struct timespec fosa_rel_time_t;
-// typedef struct timespec fosa_abs_time_t;
+FOSA_CPP_BEGIN_DECLS
+
+/* Local Jump */
+/**************/
+typedef sigjmp_buf FOSA_LONG_JUMP_CONTEXT_T_OPAQUE;
 
 
 /* Threads and signals */
@@ -317,7 +323,6 @@ typedef pthread_mutex_t FOSA_MUTEX_T_OPAQUE;
 /* hack to get AQuoSA sources compile without having none
  * of the application level scheduler header files and symbols */
 #define posix_appsched_actions_t int
-#define FOSA_LONG_JUMP_CONTEXT_T_OPAQUE int
 
 #define FOSA_ADS_ACTIONS_T_OPAQUE posix_appsched_actions_t