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.

52 lines
1.5KB

  1. /*
  2. * various utilities for ffmpeg system
  3. * copyright (c) 2000, 2001, 2002 Fabrice Bellard
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the Free Software
  17. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  18. */
  19. #ifndef _OS_SUPPORT_H
  20. #define _OS_SUPPORT_H
  21. /**
  22. * @file os_support.h
  23. * miscellaneous OS support macros and functions.
  24. *
  25. * - usleep() (Win32, BeOS, OS/2)
  26. * - floatf() (OS/2)
  27. * - strcasecmp() (OS/2)
  28. */
  29. #ifdef __MINGW32__
  30. __declspec(dllimport) void __stdcall Sleep(unsigned long dwMilliseconds);
  31. // # include <windows.h>
  32. # define usleep(t) Sleep((t) / 1000)
  33. #endif
  34. #ifdef __BEOS__
  35. # ifndef usleep
  36. # include <OS.h>
  37. # define usleep(t) snooze((bigtime_t)(t))
  38. # endif
  39. #endif
  40. #if defined(CONFIG_OS2)
  41. #include <stdlib.h>
  42. static inline int usleep(unsigned int t) { return _sleep2(t / 1000); }
  43. static inline int strcasecmp(const char* s1, const char* s2) { return stricmp(s1,s2); }
  44. #endif
  45. #endif /* _OS_SUPPORT_H */