You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
731B

  1. #ifndef _OS_SUPPORT_H
  2. #define _OS_SUPPORT_H
  3. /**
  4. * @file os_support.h
  5. * miscellaneous OS support macros and functions.
  6. *
  7. * - usleep() (Win32, BeOS, OS/2)
  8. * - floatf() (OS/2)
  9. * - strcasecmp() (OS/2)
  10. */
  11. #ifdef __MINGW32__
  12. __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
  13. // # include <windows.h>
  14. # define usleep(t) Sleep((t) / 1000)
  15. #endif
  16. #ifdef __BEOS__
  17. # ifndef usleep
  18. # include <OS.h>
  19. # define usleep(t) snooze((bigtime_t)(t))
  20. # endif
  21. #endif
  22. #if defined(CONFIG_OS2)
  23. #include <stdlib.h>
  24. static inline int usleep(unsigned int t) { return _sleep2(t / 1000); }
  25. static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); }
  26. #endif
  27. #endif /* _OS_SUPPORT_H */