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.

31 lines
624B

  1. #ifndef _OS_SUPPORT_H
  2. #define _OS_SUPPORT_H
  3. /*
  4. * miscellaneous OS support macros/function
  5. *
  6. * For now:
  7. * usleep()
  8. */
  9. #ifdef __MINGW32__
  10. # include <windows.h>
  11. # define usleep(t) Sleep((t) / 1000)
  12. #endif
  13. #ifdef __BEOS__
  14. # ifndef usleep
  15. # include <OS.h>
  16. # define usleep(t) snooze((bigtime_t)(t))
  17. # endif
  18. #endif
  19. #if defined(CONFIG_OS2)
  20. #include <stdlib.h>
  21. static inline usleep(unsigned int t) { return _sleep2((t) / 1000); }
  22. static inline float floatf(float x) { return floor(n); }
  23. static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); }
  24. #endif
  25. #endif /* _OS_SUPPORT_H */