commit libcares2 for openSUSE:Factory
Hello community, here is the log from the commit of package libcares2 for openSUSE:Factory checked in at Mon Nov 16 15:25:54 CET 2009. -------- --- libcares2/libcares2.changes 2009-01-05 21:05:10.000000000 +0100 +++ /mounts/work_src_done/STABLE/libcares2/libcares2.changes 2009-09-30 22:55:15.000000000 +0200 @@ -1,0 +2,5 @@ +Wed Sep 30 20:54:42 UTC 2009 - crrodriguez@opensuse.org + +- add gcc visibility support + +------------------------------------------------------------------- calling whatdependson for head-i586 New: ---- cares-visibility.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libcares2.spec ++++++ --- /var/tmp/diff_new_pack.TDdX6S/_old 2009-11-16 15:24:48.000000000 +0100 +++ /var/tmp/diff_new_pack.TDdX6S/_new 2009-11-16 15:24:48.000000000 +0100 @@ -22,12 +22,13 @@ Name: libcares2 Version: 1.6.0 -Release: 1 -License: X11/MIT +Release: 2 +License: MIT License (or similar) BuildRoot: %{_tmppath}/%{name}-%{version}-build Group: Development/Libraries/C and C++ Summary: Library for asynchronous name resolves Source: http://daniel.haxx.se/projects/c-ares/%{pkg_name}-%{version}.tar.bz2 +Patch: cares-visibility.patch %description c-ares is a C library that performs DNS requests and name resolves @@ -65,7 +66,7 @@ Brad Spencer %package -n libcares-devel -License: X11/MIT +License: MIT License (or similar) Group: Development/Libraries/C and C++ Summary: Library for asynchronous name resolves Requires: %{name} = %{version} glibc-devel @@ -107,10 +108,11 @@ %prep %setup -q -n %{pkg_name}-%{version} +%patch %build autoreconf -fiv -%configure --enable-thread --enable-shared --disable-static --with-pic +%configure --enable-hidden-symbols --enable-thread --enable-shared --disable-static --with-pic %{__make} %{?jobs:-j%jobs} #there is no test suite atm #check ++++++ cares-visibility.patch ++++++ Index: ares.h =================================================================== --- ares.h.orig 2008-12-04 13:53:03.000000000 +0100 +++ ares.h 2009-09-30 21:58:27.273706000 +0200 @@ -19,6 +19,10 @@ #ifndef ARES__H #define ARES__H +/* Allow alternate API prefix from CFLAGS or calling app */ +#ifndef ARES_API +# define ARES_API +#endif /* * Define WIN32 when build target is Win32 API */ @@ -232,47 +236,47 @@ typedef void (*ares_nameinfo_callback)(v typedef int (*ares_sock_create_callback)(ares_socket_t socket_fd, int type, void *data); -int ares_init(ares_channel *channelptr); -int ares_init_options(ares_channel *channelptr, struct ares_options *options, +ARES_API int ares_init(ares_channel *channelptr); +ARES_API int ares_init_options(ares_channel *channelptr, struct ares_options *options, int optmask); -int ares_save_options(ares_channel channel, struct ares_options *options, +ARES_API int ares_save_options(ares_channel channel, struct ares_options *options, int *optmask); -void ares_destroy_options(struct ares_options *options); -int ares_dup(ares_channel *dest, ares_channel src); -void ares_destroy(ares_channel channel); -void ares_cancel(ares_channel channel); -void ares_set_socket_callback(ares_channel channel, +ARES_API void ares_destroy_options(struct ares_options *options); +ARES_API int ares_dup(ares_channel *dest, ares_channel src); +ARES_API void ares_destroy(ares_channel channel); +ARES_API void ares_cancel(ares_channel channel); +ARES_API void ares_set_socket_callback(ares_channel channel, ares_sock_create_callback callback, void *user_data); -void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, +ARES_API void ares_send(ares_channel channel, const unsigned char *qbuf, int qlen, ares_callback callback, void *arg); -void ares_query(ares_channel channel, const char *name, int dnsclass, +ARES_API void ares_query(ares_channel channel, const char *name, int dnsclass, int type, ares_callback callback, void *arg); -void ares_search(ares_channel channel, const char *name, int dnsclass, +ARES_API void ares_search(ares_channel channel, const char *name, int dnsclass, int type, ares_callback callback, void *arg); -void ares_gethostbyname(ares_channel channel, const char *name, int family, +ARES_API void ares_gethostbyname(ares_channel channel, const char *name, int family, ares_host_callback callback, void *arg); -int ares_gethostbyname_file(ares_channel channel, const char *name, +ARES_API int ares_gethostbyname_file(ares_channel channel, const char *name, int family, struct hostent **host); -void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen, +ARES_API void ares_gethostbyaddr(ares_channel channel, const void *addr, int addrlen, int family, ares_host_callback callback, void *arg); -void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, +ARES_API void ares_getnameinfo(ares_channel channel, const struct sockaddr *sa, socklen_t salen, int flags, ares_nameinfo_callback callback, void *arg); -int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds); -int ares_getsock(ares_channel channel, int *socks, int numsocks); -struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, +ARES_API int ares_fds(ares_channel channel, fd_set *read_fds, fd_set *write_fds); +ARES_API int ares_getsock(ares_channel channel, int *socks, int numsocks); +ARES_API struct timeval *ares_timeout(ares_channel channel, struct timeval *maxtv, struct timeval *tv); -void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds); -void ares_process_fd(ares_channel channel, ares_socket_t read_fd, +ARES_API void ares_process(ares_channel channel, fd_set *read_fds, fd_set *write_fds); +ARES_API void ares_process_fd(ares_channel channel, ares_socket_t read_fd, ares_socket_t write_fd); -int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id, +ARES_API int ares_mkquery(const char *name, int dnsclass, int type, unsigned short id, int rd, unsigned char **buf, int *buflen); -int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, +ARES_API int ares_expand_name(const unsigned char *encoded, const unsigned char *abuf, int alen, char **s, long *enclen); -int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf, +ARES_API int ares_expand_string(const unsigned char *encoded, const unsigned char *abuf, int alen, unsigned char **s, long *enclen); #if !defined(HAVE_STRUCT_IN6_ADDR) && !defined(s6_addr) @@ -300,19 +304,19 @@ struct addr6ttl { ** their TTLs in that array, and set *naddrttls to the number of addresses ** so written. */ -int ares_parse_a_reply(const unsigned char *abuf, int alen, +ARES_API int ares_parse_a_reply(const unsigned char *abuf, int alen, struct hostent **host, struct addrttl *addrttls, int *naddrttls); -int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, +ARES_API int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, struct hostent **host, struct addr6ttl *addrttls, int *naddrttls); -int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, +ARES_API int ares_parse_ptr_reply(const unsigned char *abuf, int alen, const void *addr, int addrlen, int family, struct hostent **host); -int ares_parse_ns_reply(const unsigned char *abuf, int alen, +ARES_API int ares_parse_ns_reply(const unsigned char *abuf, int alen, struct hostent **host); -void ares_free_string(void *str); -void ares_free_hostent(struct hostent *host); -const char *ares_strerror(int code); +ARES_API void ares_free_string(void *str); +ARES_API void ares_free_hostent(struct hostent *host); +ARES_API const char *ares_strerror(int code); #ifdef __cplusplus } Index: configure.ac =================================================================== --- configure.ac.orig 2008-12-09 23:31:24.000000000 +0100 +++ configure.ac 2009-09-30 22:01:47.084191000 +0200 @@ -843,6 +843,44 @@ dnl Check if the getnameinfo function is dnl and get the types of five of its arguments. CURL_CHECK_FUNC_GETNAMEINFO +dnl ************************************************************ +dnl Enable hiding of internal symbols in library to reduce its size and +dnl speed dynamic linking of applications. This currently is only supported +dnl on gcc >= 4.0 and SunPro C. +dnl +AC_MSG_CHECKING([whether to enable hidden symbols in the library]) +AC_ARG_ENABLE(hidden-symbols, +AC_HELP_STRING([--enable-hidden-symbols],[Hide internal symbols in library]) +AC_HELP_STRING([--disable-hidden-symbols],[Leave all symbols with default visibility in library]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) + AC_MSG_CHECKING([whether $CC supports it]) + if test "$GCC" = yes ; then + if $CC --help --verbose 2>&1 | grep fvisibility= > /dev/null ; then + AC_MSG_RESULT(yes) + AC_DEFINE(ARES_API, [__attribute__ ((visibility ("default")))], [to make a symbol visible]) + CFLAGS="$CFLAGS -fvisibility=hidden" + else + AC_MSG_RESULT(no) + fi + + else + dnl Test for SunPro cc + if $CC 2>&1 | grep flags >/dev/null && $CC -flags | grep xldscope= >/dev/null ; then + AC_MSG_RESULT(yes) + AC_DEFINE(ARES_API, [__global], [to make a symbol visible]) + CFLAGS="$CFLAGS -xldscope=hidden" + else + AC_MSG_RESULT(no) + fi + fi + ;; + esac ], + AC_MSG_RESULT(no) +) AC_C_BIGENDIAN( [AC_DEFINE(ARES_BIG_ENDIAN, 1, ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de