* 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>
# undef HAVE_VARIADIC_MACROS
# undef HAVE_STDINT_H
# undef HAVE_INTTYPES_H
+# undef off_t
#endif
#include "vlc_config.h"
#if defined( WIN32 ) || defined( UNDER_CE )
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
+# define IS_WINNT ( GetVersion() < 0x80000000 )
#endif
#include "vlc_threads.h"
#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
typedef _off_t off_t;
# define _OFF_T_
# else
+# ifdef off_t
+# undef off_t
+# endif
# define off_t long long
# endif
# endif
*****************************************************************************/
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)
# 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