changeset 33:b183afa47c72

RiViera/Nucleus typedef conflict resolved
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 16 Jul 2018 06:17:38 +0000
parents b6c8dd9a1b02
children 397e3a3274ea
files src/cs/riviera/rv/general.h src/nucleus/nucleus.h
diffstat 2 files changed, 21 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/riviera/rv/general.h	Mon Jul 16 05:19:45 2018 +0000
+++ b/src/cs/riviera/rv/general.h	Mon Jul 16 06:17:38 2018 +0000
@@ -37,7 +37,9 @@
 /* BOARD */
 #else
    #ifndef __TYPEDEFS_H__ /* This #define allows to Condat to use general.h without conflict */
-      typedef unsigned short  UINT16;
+      #ifndef NUCLEUS
+         typedef unsigned short  UINT16;
+      #endif
       typedef unsigned char   UBYTE;
       typedef short           SHORT;
       typedef signed char     BYTE;
@@ -48,14 +50,18 @@
       typedef unsigned short  USHORT;
       typedef unsigned int    ULONG;
    #endif
-   typedef unsigned long    UINT32;
+   #ifndef NUCLEUS
+      typedef unsigned long    UINT32;
+   #endif
 #endif
 
+#ifndef NUCLEUS
 typedef unsigned char   UINT8;
 typedef signed char     INT8;
 typedef short           INT16; 
 typedef int             INT32;
 typedef unsigned char   BOOLEAN;
+#endif
 
 typedef void (*FUNC)(void);      /* pointer to a function */
 
--- a/src/nucleus/nucleus.h	Mon Jul 16 05:19:45 2018 +0000
+++ b/src/nucleus/nucleus.h	Mon Jul 16 06:17:38 2018 +0000
@@ -135,19 +135,25 @@
 typedef int                     INT;
 typedef unsigned long *         UNSIGNED_PTR;
 typedef unsigned char *         BYTE_PTR;
-typedef DATA_ELEMENT            BOOLEAN;
 typedef unsigned int            UNSIGNED_INT;
 
 #define VOID void
 #define HUGE
 #define FAR
 
-typedef char    INT8;  
-typedef unsigned char  UINT8; 
-typedef signed short   INT16; 
-typedef unsigned short UINT16;
-typedef signed long    INT32; 
-typedef unsigned long  UINT32;
+/*
+ * If general.h file has been already included, then
+ * do not define the following types
+ */
+#ifndef GENERAL_H
+typedef DATA_ELEMENT            BOOLEAN;
+typedef signed char             INT8;
+typedef unsigned char           UINT8;
+typedef short                   INT16;
+typedef unsigned short          UINT16;
+typedef int                     INT32;
+typedef unsigned long           UINT32;
+#endif
 
 
 /* Define register defines.  R1, R2, R3, and R4 are used in the Nucleus PLUS