From: Pierre d'Herbemont Date: Tue, 27 May 2008 16:33:14 +0000 (+0200) Subject: libvlccore: Make sure all symbol listed in libvlccore.sym are exported. X-Git-Tag: 0.9.0-test0~668 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=b5aee88c089035938b603929d29b5d113553f4fa;p=vlc libvlccore: Make sure all symbol listed in libvlccore.sym are exported. --- diff --git a/include/vlc_common.h b/include/vlc_common.h index bbaf5e1136..bd56d978ad 100644 --- a/include/vlc_common.h +++ b/include/vlc_common.h @@ -800,11 +800,6 @@ VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) ); /***************************************************************************** * I18n stuff *****************************************************************************/ -#ifdef WIN32 -VLC_EXPORT( char *, vlc_dgettext, ( const char *package, const char *msgid ) ); -VLC_EXPORT( int, vlc_wclosedir, (void *) ); -#endif - VLC_EXPORT( char *, vlc_gettext, ( const char *msgid ) ); /***************************************************************************** diff --git a/include/vlc_network.h b/include/vlc_network.h index 77cb6f0d8b..08741dd0cb 100644 --- a/include/vlc_network.h +++ b/include/vlc_network.h @@ -59,8 +59,6 @@ struct msghdr int msg_flags; }; -VLC_EXPORT( ssize_t, vlc_sendmsg, ( int, struct msghdr *, int ) ); -VLC_EXPORT( ssize_t, vlc_recvmsg, ( int, struct msghdr *, int ) ); #define sendmsg vlc_sendmsg #define recvmsg vlc_recvmsg @@ -81,6 +79,9 @@ VLC_EXPORT( ssize_t, vlc_recvmsg, ( int, struct msghdr *, int ) ); # define net_errno errno #endif +VLC_EXPORT( ssize_t, vlc_sendmsg, ( int, struct msghdr *, int ) ); +VLC_EXPORT( ssize_t, vlc_recvmsg, ( int, struct msghdr *, int ) ); + # ifdef __cplusplus extern "C" { # endif @@ -154,19 +155,18 @@ VLC_EXPORT( ssize_t, net_Printf, ( vlc_object_t *p_this, int fd, const v_socket_ VLC_EXPORT( ssize_t, __net_vaPrintf, ( vlc_object_t *p_this, int fd, const v_socket_t *, const char *psz_fmt, va_list args ) ); +/* Don't go to an extra call layer if we have the symbol */ #ifndef HAVE_INET_PTON -/* only in core, so no need for C++ extern "C" */ - VLC_EXPORT (int, inet_pton, (int af, const char *src, void *dst) ); +#define inet_pton vlc_inet_pton #endif - #ifndef HAVE_INET_NTOP -#ifdef WIN32 -/* only in core, so no need for C++ extern "C" */ - VLC_EXPORT (const char *, inet_ntop, (int af, const void *src, - char *dst, socklen_t cnt) ); -#endif +#define inet_ntop vlc_inet_ntop #endif +VLC_EXPORT (int, vlc_inet_pton, (int af, const char *src, void *dst) ); +VLC_EXPORT (const char *, vlc_inet_ntop, (int af, const void *src, + char *dst, socklen_t cnt) ); + #ifndef HAVE_POLL enum { diff --git a/src/libvlc.h b/src/libvlc.h index bb593a10db..69713f2dc8 100644 --- a/src/libvlc.h +++ b/src/libvlc.h @@ -280,12 +280,15 @@ void vlc_rewinddir(void *); #if defined (WIN32) # include void *vlc_wopendir (const wchar_t *); +void *vlc_wclosedir (void *); struct _wdirent *vlc_wreaddir (void *); void vlc_rewinddir (void *); # define _wopendir vlc_wopendir # define _wreaddir vlc_wreaddir # define _wclosedir vlc_wclosedir # define rewinddir vlc_rewinddir + +char *vlc_dgettext ( const char *package, const char *msgid ); #endif #endif diff --git a/src/libvlccore.sym b/src/libvlccore.sym index 9918e7065d..f687c917db 100644 --- a/src/libvlccore.sym +++ b/src/libvlccore.sym @@ -74,6 +74,7 @@ date_Increment date_Init date_Move date_Set +DecodeLanguage decoder_GetDisplayDate decoder_GetInputAttachment decoder_GetInputAttachments @@ -96,6 +97,9 @@ filename_sanitize FromLocale FromLocaleDup GetFallbackEncoding +GetLang_1 +GetLang_2B +GetLang_2T httpd_ClientIP httpd_ClientModeBidir httpd_ClientModeStream @@ -123,8 +127,6 @@ httpd_UrlNew httpd_UrlNewUnique __image_HandlerCreate image_HandlerDelete -inet_ntop -inet_pton InitMD5 input_AddSubtitles input_Control @@ -389,7 +391,6 @@ __vlc_cond_init vlc_config_create vlc_config_set vlc_CPU -vlc_dgettext vlc_error __vlc_event_attach vlc_event_detach @@ -407,6 +408,8 @@ vlc_gettext vlc_iconv vlc_iconv_close vlc_iconv_open +vlc_inet_ntop +vlc_inet_pton __vlc_list_children __vlc_list_find vlc_list_release @@ -452,7 +455,6 @@ vlc_threadvar_create vlc_threadvar_delete vlc_ureduce VLC_Version -vlc_wclosedir vlc_wraptext vlm_Control vlm_Delete diff --git a/src/network/io.c b/src/network/io.c index 8bbb1bca24..6293e87a3f 100644 --- a/src/network/io.c +++ b/src/network/io.c @@ -552,9 +552,9 @@ ssize_t __net_vaPrintf( vlc_object_t *p_this, int fd, const v_socket_t *p_vs, /***************************************************************************** * inet_pton replacement for obsolete and/or crap operating systems *****************************************************************************/ -#ifndef HAVE_INET_PTON -int inet_pton(int af, const char *src, void *dst) +int vlc_inet_pton(int af, const char *src, void *dst) { +#ifndef HAVE_INET_PTON # ifdef WIN32 /* As we already know, Microsoft always go its own way, so even if they do * provide IPv6, they don't provide the API. */ @@ -612,14 +612,16 @@ int inet_pton(int af, const char *src, void *dst) memcpy( dst, &ipv4, 4 ); # endif /* WIN32 */ return 0; -} +#else /* HAVE_INET_PTON */ + return inet_pton( af, src, dst ); #endif /* HAVE_INET_PTON */ +} -#ifndef HAVE_INET_NTOP -#ifdef WIN32 -const char *inet_ntop(int af, const void * src, +const char *vlc_inet_ntop(int af, const void * src, char * dst, socklen_t cnt) { +#ifndef HAVE_INET_NTOP +#ifdef WIN32 switch( af ) { #ifdef AF_INET6 @@ -662,6 +664,25 @@ const char *inet_ntop(int af, const void * src, } errno = EAFNOSUPPORT; return NULL; +#else /* WIN32 */ + return NULL; +#endif /* WIN32 */ +#else /* HAVE_INET_NTOP */ + return inet_ntop( af, src, dst, cnt ); +#endif /* HAVE_INET_NTOP */ } -#endif -#endif + +#ifdef WIN32 + /* vlc_sendmsg, vlc_recvmsg Defined in winsock.c */ +#else /* !WIN32 */ +ssize_t vlc_sendmsg (int s, struct msghdr *hdr, int flags) +{ + return sendmsg (s, hdr, flags); +} + +ssize_t vlc_recvmsg (int s, struct msghdr *hdr, int flags) +{ + return recvmsg (s, hdr, flags); +} +#endif /* WIN32 */ +