#define PRIo64 "llo"
#undef PRIx64
#define PRIx64 "llx"
- #define snprintf __mingw_snprintf
- #define vsnprintf __mingw_vsnprintf
+ #define snprintf __mingw_snprintf
+ #define vsnprintf __mingw_vsnprintf
#endif
/* Function attributes for compiler warnings */
# include <windows.h>
#endif
+#ifdef __OS2__
+# define OS2EMX_PLAIN_CHAR
+# define INCL_BASE
+# define INCL_PM
+# include <os2.h>
+#endif
+
#include "vlc_mtime.h"
#include "vlc_threads.h"
# define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) )
#endif
+/* clip v in [min, max] */
+#define VLC_CLIP(v, min, max) __MIN(__MAX((v), (min)), (max))
+
VLC_USED
static inline int64_t GCD ( int64_t a, int64_t b )
{
#endif
}
+#ifdef __OS2__
+# undef bswap16
+# undef bswap32
+# undef bswap64
+#endif
+
/** Byte swap (16 bits) */
VLC_USED
static inline uint16_t bswap16 (uint16_t x)