From: bernie Date: Wed, 22 Mar 2006 13:34:34 +0000 (+0000) Subject: MSVC support. X-Git-Tag: 1.0.0~653 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=b6aafeedb04966d47966b8842109a239ab53eef5;p=bertos.git MSVC support. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@588 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/cfg/compiler.h b/cfg/compiler.h index dfeee567..78a63bdc 100755 --- a/cfg/compiler.h +++ b/cfg/compiler.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.18 2006/03/22 13:34:34 bernie + *#* MSVC support. + *#* *#* Revision 1.17 2006/03/22 09:48:35 bernie *#* Formatting. *#* @@ -196,6 +199,11 @@ /* MSVC doesn't support C99's __func__, but has a similar extension. */ #define __func__ __FUNCTION__ + /* MSVC doesn't support C99's inline keyword */ + #ifndef __cplusplus + #define INLINE __inline + #endif + #elif defined(__GNUC__) /* Compiler features */ diff --git a/cfg/debug.h b/cfg/debug.h index 8af808d4..fc811ee5 100755 --- a/cfg/debug.h +++ b/cfg/debug.h @@ -17,6 +17,9 @@ /*#* *#* $Log$ + *#* Revision 1.13 2006/03/22 13:34:34 bernie + *#* MSVC support. + *#* *#* Revision 1.12 2006/03/22 09:48:23 bernie *#* Simplify. *#* @@ -173,6 +176,7 @@ /* G++ can't inline functions with variable arguments... */ #define kprintf(fmt, ...) fprintf(stderr, fmt, ## __VA_ARGS__) #else + #define kvprintf(fmt, ap) vfprintf(stderr, fmt, ap) INLINE int kprintf(const char *fmt, ...) { va_list ap; @@ -185,7 +189,6 @@ return result; } #endif - #define kvprintf(fmt, ap) vfprintf(stderr, fmt, ap) void kdump(const void *buf, size_t len); /* UNIMPLEMENTED */ #ifndef ASSERT diff --git a/cfg/os.h b/cfg/os.h index c3e943bc..eb82043a 100755 --- a/cfg/os.h +++ b/cfg/os.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.9 2006/03/22 13:34:34 bernie + *#* MSVC support. + *#* *#* Revision 1.8 2006/02/23 09:09:28 bernie *#* Remove Linux specific hack. *#* @@ -55,6 +58,14 @@ #ifdef _WIN32 #define OS_WIN32 1 #define OS_ID win32 + + // 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 */ + #else #define OS_WIN32 0 #endif