From 5f89cb2ec6cff67bd539eaed89f237ea42a1548e Mon Sep 17 00:00:00 2001 From: bernie Date: Mon, 20 Feb 2006 01:46:59 +0000 Subject: [PATCH] Port to MacOSX. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@527 38d2e660-2303-0410-9eaa-f027e97ec537 --- cfg/os.h | 7 +++++-- os/hptime.c | 5 ++++- os/hptime.h | 5 ++++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/cfg/os.h b/cfg/os.h index 28327798..f936ebb9 100755 --- a/cfg/os.h +++ b/cfg/os.h @@ -14,6 +14,9 @@ /*#* *#* $Log$ + *#* Revision 1.7 2006/02/20 01:46:59 bernie + *#* Port to MacOSX. + *#* *#* Revision 1.6 2006/02/15 09:12:33 bernie *#* Don't mask useful user signals on UNIX. *#* @@ -53,7 +56,7 @@ #define OS_WIN32 0 #endif -#ifdef __unix__ +#if defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) #define OS_UNIX 1 #define OS_POSIX 1 /* Not strictly UNIX, but no way to autodetect it. */ #define OS_ID posix @@ -132,7 +135,7 @@ * Summarize hosted environments as OS_HOSTED and embedded * environment with OS_EMBEDDED. */ -#if OS_WIN32 || OS_UNIX +#if OS_WIN32 || OS_UNIX || OS_DARWIN #define OS_HOSTED 1 #define OS_EMBEDDED 0 #else diff --git a/os/hptime.c b/os/hptime.c index 7c53d9df..57ccf34d 100755 --- a/os/hptime.c +++ b/os/hptime.c @@ -13,6 +13,9 @@ /*#* *#* $Log$ + *#* Revision 1.6 2006/02/20 01:46:46 bernie + *#* Port to MacOSX. + *#* *#* Revision 1.5 2005/11/04 16:20:02 bernie *#* Fix reference to README.devlib in header. *#* @@ -53,7 +56,7 @@ hptime_t hptime_get(void) return (((hptime_t)ft.dwHighDateTime) << 32) + (hptime_t)ft.dwLowDateTime; } -#elif defined(__unix__) +#elif defined(__unix__) || defined(__APPLE__) && defined(__MACH__) #include diff --git a/os/hptime.h b/os/hptime.h index 2a967024..20994e81 100755 --- a/os/hptime.h +++ b/os/hptime.h @@ -13,6 +13,9 @@ /*#* *#* $Log$ + *#* Revision 1.8 2006/02/20 01:46:46 bernie + *#* Port to MacOSX. + *#* *#* Revision 1.7 2006/01/16 03:28:25 bernie *#* Remove redundant mtime_t definition (cfg/compiler.h has one already). *#* @@ -51,7 +54,7 @@ extern "C" { #define HPTIME_TICKS_PER_MILLISEC ((hptime_t)10000I64) #define HPTIME_TICKS_PER_MICRO ((hptime_t)10I64) -#elif defined(__unix__) +#elif defined(__unix__) || (defined(__APPLE__) && defined(__MACH__)) #include -- 2.25.1