]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
l10n: Dutch update
[vlc] / include / vlc_common.h
index a6f3534ee3a704937949443bd6407a1ab8858ddc..92eb50ce988980e685cee888502b3a3e33992056 100644 (file)
@@ -76,8 +76,8 @@
  #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 */
@@ -478,6 +478,13 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 # 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"
 
@@ -572,6 +579,9 @@ VLC_API void vlc_release(gc_object_t *);
 #   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 )
 {
@@ -632,6 +642,12 @@ static inline unsigned popcount (unsigned x)
 #endif
 }
 
+#ifdef __OS2__
+#   undef bswap16
+#   undef bswap32
+#   undef bswap64
+#endif
+
 /** Byte swap (16 bits) */
 VLC_USED
 static inline uint16_t bswap16 (uint16_t x)