changeset 548:c35473dc6831

Make shared headers UNIX compatibles.
author JeanDo
date Sat, 21 Jan 2012 15:36:44 +0100
parents 495af6dc26a6
children cdc1163a8e9e 9e20de11fb78
files code_part1/OSTC_code_asm_part1/shared_definitions.h code_part1/OSTC_code_c_part2/p2_definitions.h
diffstat 2 files changed, 11 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/code_part1/OSTC_code_asm_part1/shared_definitions.h	Fri Jan 20 10:30:33 2012 +0100
+++ b/code_part1/OSTC_code_asm_part1/shared_definitions.h	Sat Jan 21 15:36:44 2012 +0100
@@ -69,7 +69,9 @@
 #ifdef __18CXX
     //---- BANK 2 DATA -------------------------------------------------------
     // Gather all data C-code --> ASM-code
-#   pragma udata overlay bank2=0x200
+#   ifndef UNIX
+#       pragma udata overlay bank2=0x200
+#   endif
 #else
 bank2   udata_ovr  0x200
 #endif
@@ -122,7 +124,9 @@
 #ifdef __18CXX
     //---- BANK 3 DATA -------------------------------------------------------
     // Gather all data ASM-code --> C-code
-#   pragma udata overlay bank3=0x300
+#   ifndef UNIX
+#       pragma udata overlay bank3=0x300
+#   endif
 #else
     ; In ASM, put the same bank, in overlay mode, at the same address
 bank3   udata_ovr  0x300
--- a/code_part1/OSTC_code_c_part2/p2_definitions.h	Fri Jan 20 10:30:33 2012 +0100
+++ b/code_part1/OSTC_code_c_part2/p2_definitions.h	Sat Jan 21 15:36:44 2012 +0100
@@ -102,7 +102,7 @@
 // **         Allow compile on VisualC          **
 // ***********************************************
 
-#ifdef WIN32
+#if defined(WIN32) || defined(UNIX) 
     // Some keywords just dont exists on Visual C++:
 #   define CROSS_COMPILE
 #   define __18CXX
@@ -111,10 +111,12 @@
 #   define overlay
 #   define PARAMETER
 
-#include <assert.h>
+#   include <assert.h>
 
     // Avoid warnings about float/double mismatches:
-#   pragma warning(disable: 4244 4068 4305)
+#   ifdef WIN32
+#       pragma warning(disable: 4244 4068 4305)
+#   endif
 #else
 #   define PARAMETER static
 #   ifdef __DEBUG