Commit 04b59c91 authored by Sam Hocevar's avatar Sam Hocevar

* ./include/vlc_common.h: if we don't have strndup but gnome.h defines it

    anyway, do not provide our custom version.
parent 887faff1
......@@ -2313,6 +2313,13 @@ AC_ARG_ENABLE(gnome,
NEED_GTK_MAIN=yes
NEED_GNOME_MAIN=yes
ALIASES="${ALIASES} gnome-vlc"
dnl We need this because of some moronic gnomesupport.h flavours
AC_MSG_CHECKING(for strndup in gnome.h)
AC_EGREP_HEADER(strndup,gnome.h,[
AC_MSG_RESULT(yes)
AC_DEFINE(STRNDUP_IN_GNOME_H, 1,
Define if <gnome.h> defines strndup.)],[
AC_MSG_RESULT(no)])
],[
AC_MSG_ERROR([Can't find gnome headers. Please install the gnome
developement tools or remove the --enable-gnome option])
......
......@@ -3,7 +3,7 @@
* Collection of useful common types and macros definitions
*****************************************************************************
* Copyright (C) 1998, 1999, 2000 VideoLAN
* $Id: vlc_common.h,v 1.48 2003/01/16 09:02:46 sam Exp $
* $Id: vlc_common.h,v 1.49 2003/01/27 22:42:36 sam Exp $
*
* Authors: Samuel Hocevar <sam@via.ecp.fr>
* Vincent Seguin <seguin@via.ecp.fr>
......@@ -493,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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment