]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
mkv.cpp: add support for the JumpVTS_PTT DVD command
[vlc] / include / vlc_common.h
index dfde7ac4f999b45668819f0b0e2133f01cff4815..0f78a824e4a26a04e44b51869e45001170405df2 100644 (file)
 
 typedef uint8_t                 byte_t;
 
+/* Systems that don't have stdint.h may not define INT64_MIN and
+   INT64_MAX */
+#ifndef INT64_MIN
+#define INT64_MIN (-9223372036854775807LL-1)
+#endif
+#ifndef INT64_MAX
+#define INT64_MAX (9223372036854775807LL)
+#endif
+
 /* ptrdiff_t definition */
 #ifdef HAVE_STDDEF_H
 #   include <stddef.h>
@@ -873,7 +882,7 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #endif
 
 #ifndef HAVE_DIRENT_H
-    typedef struct DIR DIR;
+    typedef void DIR;
 #   ifndef FILENAME_MAX
 #       define FILENAME_MAX (260)
 #   endif
@@ -887,9 +896,9 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #   define opendir vlc_opendir
 #   define readdir vlc_readdir
 #   define closedir vlc_closedir
-    VLC_EXPORT( DIR *, vlc_opendir, ( const char * ) );
-    VLC_EXPORT( struct dirent *, vlc_readdir, ( DIR * ) );
-    VLC_EXPORT( int, vlc_closedir, ( DIR * ) );
+    VLC_EXPORT( void *, vlc_opendir, ( const char * ) );
+    VLC_EXPORT( void *, vlc_readdir, ( void * ) );
+    VLC_EXPORT( int, vlc_closedir, ( void * ) );
 #elif !defined(__PLUGIN__)
 #   define vlc_opendir  NULL
 #   define vlc_readdir  NULL
@@ -897,7 +906,7 @@ static inline void _SetQWBE( uint8_t *p, uint64_t i_qw )
 #endif
 
 /* Format type specifiers for 64 bits numbers */
-#if !defined(WIN32) && !defined(UNDER_CE)
+#if defined(__CYGWIN32__) || (!defined(WIN32) && !defined(UNDER_CE))
 #   define I64Fd "%lld"
 #   define I64Fi "%lli"
 #   define I64Fo "%llo"
@@ -948,15 +957,17 @@ typedef _off_t off_t;
 #       endif
 #   endif
 
-#   if defined( _MSC_VER )
+/*
+#   if (defined( _MSC_VER ) && (!defined(__WXMSW__)))
 #       if !defined( _OFF_T_DEFINED )
 typedef __int64 off_t;
 #           define _OFF_T_DEFINED
 #       else
 #           define off_t __int64
-            /* for wx compatibility typedef long off_t; */
+            // for wx compatibility typedef long off_t;
 #       endif
 #   endif
+*/
 
 #   if defined( __BORLANDC__ )
 #       undef off_t