diff --git a/libmaxsi/include/libmaxsi/platform.h b/libmaxsi/include/libmaxsi/platform.h index f7e98200..94adfb98 100644 --- a/libmaxsi/include/libmaxsi/platform.h +++ b/libmaxsi/include/libmaxsi/platform.h @@ -47,22 +47,9 @@ // Libmaxsi is also compatible as a C library, if enabled. #ifdef LIBMAXSI_LIBRARY - #if defined(SORTIX_KERNEL) && !defined(LIBMAXSI_NO_LIBC) - #define LIBMAXSI_NO_LIBC - #endif - - #ifndef LIBMAXSI_NO_LIBC - #define LIBMAXSI_LIBC - #endif - - #ifdef LIBMAXSI_LIBC - #define DUAL_FUNCTION(Type, CName, LibMaxsiName, Parameters) \ - Type LibMaxsiName Parameters __attribute__ ((weak, alias (#CName))); \ - extern "C" Type CName Parameters - #else - #define DUAL_FUNCTION(Type, CName, LibMaxsiName, Parameters) \ - Type LibMaxsiName Parameters - #endif + #define DUAL_FUNCTION(Type, CName, LibMaxsiName, Parameters) \ + Type LibMaxsiName Parameters __attribute__ ((weak, alias (#CName))); \ + extern "C" Type CName Parameters #endif #if !defined(SORTIX_KERNEL) && !defined(ASSERT) diff --git a/libmaxsi/thread.cpp b/libmaxsi/thread.cpp index 5d5fb507..f70c77ac 100644 --- a/libmaxsi/thread.cpp +++ b/libmaxsi/thread.cpp @@ -23,9 +23,7 @@ ******************************************************************************/ #include -#ifdef LIBMAXSI_LIBC #include -#endif #include #include @@ -58,9 +56,7 @@ namespace Maxsi return SysCreate(&ThreadStartup, Start, Parameter, StackSize); } -#ifdef LIBMAXSI_LIBC extern "C" unsigned sleep(unsigned Seconds) { SysSleep(Seconds); return 0; } -#endif // TODO: Thinking about it, there is no need for this to be a long. // Sortix will never run for that long time, and shouldn't it be unsigned long? @@ -69,10 +65,7 @@ namespace Maxsi SysSleep(Seconds); } - -#ifdef LIBMAXSI_LIBC extern "C" int usleep(useconds_t Microseconds) { SysUSleep(Microseconds); return 0; } -#endif void USleep(long Microseconds) {