]> git.sesse.net Git - vlc/blobdiff - include/vlc_common.h
* src/video_output/vout_subpictures.c: fixed a few race conditions that
[vlc] / include / vlc_common.h
index e431f660781818d992d196fdfb335ca8f9f6588b..465ed776ce5753c52cbcda41e478aea8c0067190 100644 (file)
@@ -3,7 +3,7 @@
  * Collection of useful common types and macros definitions
  *****************************************************************************
  * Copyright (C) 1998, 1999, 2000 VideoLAN
- * $Id: vlc_common.h,v 1.46 2002/12/27 15:31:55 sam Exp $
+ * $Id: vlc_common.h,v 1.52 2003/01/28 17:11:38 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@via.ecp.fr>
  *          Vincent Seguin <seguin@via.ecp.fr>
@@ -37,6 +37,7 @@
 #   undef HAVE_VARIADIC_MACROS
 #   undef HAVE_STDINT_H
 #   undef HAVE_INTTYPES_H
+#   undef off_t
 #endif
 
 #include "vlc_config.h"
@@ -283,6 +284,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *,      /* variable's object */
 #if defined( WIN32 ) || defined( UNDER_CE )
 #   define WIN32_LEAN_AND_MEAN
 #   include <windows.h>
+#   define IS_WINNT ( GetVersion() < 0x80000000 )
 #endif
 
 #include "vlc_threads.h"
@@ -491,8 +493,13 @@ static inline uint64_t U64_AT( void * _p )
 #endif
 
 #ifndef HAVE_STRNDUP
-#   define strndup vlc_strndup
-    VLC_EXPORT( char *, vlc_strndup, ( const char *s, size_t n ) );
+#   if defined(STRNDUP_IN_GNOME_H) && \
+        (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main))
+        /* Do nothing: gnome.h defines strndup for us */
+#   else
+#       define strndup vlc_strndup
+        VLC_EXPORT( char *, vlc_strndup, ( const char *s, size_t n ) );
+#   endif
 #elif !defined(__PLUGIN__)
 #   define vlc_strndup NULL
 #endif
@@ -578,6 +585,9 @@ typedef long long _off_t;
 typedef _off_t off_t;
 #           define _OFF_T_
 #       else
+#           ifdef off_t
+#               undef off_t
+#           endif
 #           define off_t long long
 #       endif
 #   endif
@@ -637,7 +647,10 @@ typedef __int64 off_t;
  *****************************************************************************/
 VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
 
-#if defined( ENABLE_NLS ) && defined( HAVE_INCLUDED_GETTEXT )
+#if defined( ENABLE_NLS ) && \
+     (defined(MODULE_NAME_IS_gnome)||defined(MODULE_NAME_IS_gnome_main))
+    /* Declare nothing: gnome.h will do it for us */
+#elif defined( ENABLE_NLS ) && defined( HAVE_INCLUDED_GETTEXT )
 #   include "libintl.h"
 #   undef _
 #   define _(String) vlc_dgettext (PACKAGE, String)
@@ -647,7 +660,7 @@ VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) );
 #   undef _
 #   define _(String) dgettext (PACKAGE, String)
 #   define N_(String) ((char*)(String))
-#elif !defined( NEED_GNOMESUPPORT_H )
+#else
 #   define _(String) ((char*)(String))
 #   define N_(String) ((char*)(String))
 #endif