Diff of /src/common.h [104348] .. [d040ac] Maximize Restore

  Switch to side-by-side view

--- a/src/common.h
+++ b/src/common.h
@@ -3,9 +3,9 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id$
+ * $Id: common.h,v 1.1 2001/12/22 00:08:13 sam Exp $
  *
- * Authors: Sam Hocevar <sam@via.ecp.fr>
+ * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
  *          Gildas Bazin <gbazin@netcourrier.com>
  *
@@ -13,7 +13,7 @@
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
- *
+ * 
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@@ -27,32 +27,42 @@
 /*****************************************************************************
  * Basic types definitions
  *****************************************************************************/
-#if defined( HAVE_STDINT_H )
-#   include <stdint.h>
-#elif defined( HAVE_INTTYPES_H )
-#   include <inttypes.h>
-#elif defined( SYS_CYGWIN )
+
+/* Basic types definitions */
+typedef unsigned char           u8;
+typedef signed char             s8;
+typedef unsigned short          u16;
+typedef signed short            s16;
+typedef unsigned int            u32;
+typedef signed int              s32;
+#if defined( _MSC_VER )
+typedef unsigned __int64        u64;
+typedef signed __int64          s64;
+#else
+typedef unsigned long long      u64;
+typedef signed long long        s64;
+#endif
+
+typedef u8                  byte_t;
+
+/* Boolean type */
+#ifdef BOOLEAN_T_IN_SYS_TYPES_H
 #   include <sys/types.h>
-    /* Cygwin only defines half of these... */
-    typedef u_int8_t            uint8_t;
-    typedef u_int32_t           uint32_t;
+#elif defined(BOOLEAN_T_IN_PTHREAD_H)
+#   include <pthread.h>
+#elif defined(BOOLEAN_T_IN_CTHREADS_H)
+#   include <cthreads.h>
 #else
-    /* Fallback types (very x86-centric, sorry) */
-    typedef unsigned char       uint8_t;
-    typedef signed char         int8_t;
-    typedef unsigned int        uint32_t;
-    typedef signed int          int32_t;
+typedef int                 boolean_t;
+#endif
+#ifdef SYS_GNU
+#   define _MACH_I386_BOOLEAN_H_
 #endif
 
 #if defined( WIN32 )
 
-#   ifndef PATH_MAX
-#      define PATH_MAX MAX_PATH
-#   endif
-
 /* several type definitions */
 #   if defined( __MINGW32__ )
-#       define lseek _lseeki64
 #       if !defined( _OFF_T_ )
 typedef long long _off_t;
 typedef _off_t off_t;
@@ -63,7 +73,6 @@
 #   endif
 
 #   if defined( _MSC_VER )
-#       define lseek _lseeki64
 #       if !defined( _OFF_T_DEFINED )
 typedef __int64 off_t;
 #           define _OFF_T_DEFINED