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
711B

  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. # include <windows.h>
  13. # define usleep(t) Sleep((t) / 1000)
  14. #endif
  15. #ifdef __BEOS__
  16. # ifndef usleep
  17. # include <OS.h>
  18. # define usleep(t) snooze((bigtime_t)(t))
  19. # endif
  20. #endif
  21. #if defined(CONFIG_OS2)
  22. #include <stdlib.h>
  23. static inline int usleep(unsigned int t) { return _sleep2(t / 1000); }
  24. static inline float floorf(float f) { return floor(f); }
  25. static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); }
  26. #endif
  27. #endif /* _OS_SUPPORT_H */