diff --git a/ars/Makefile.am b/ars/Makefile.am index 4204beaf7..1a34ff631 100644 --- a/ars/Makefile.am +++ b/ars/Makefile.am @@ -4,6 +4,8 @@ noinst_LTLIBRARIES = libhamlib-ars.la libhamlib_ars_la_SOURCES = ars.c libhamlib_ars_la_CFLAGS = -DIN_HAMLIB $(AM_CFLAGS) # libhamlib_ars_la_LDFLAGS = -no-undefined -module -avoid-version $(PTHREAD_LIBS) +libhamlib_ars_la_LDFLAGS = $(PTHREAD_LIBS) + #hamlib_ars_la_LIBADD = $(top_builddir)/lib/libmisc.la \ # $(top_builddir)/src/libhamlib.la diff --git a/configure.ac b/configure.ac index 44d9e8a8d..2963f5c20 100644 --- a/configure.ac +++ b/configure.ac @@ -34,7 +34,7 @@ AC_CONFIG_AUX_DIR([build-aux]) dnl Passing AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION to AM_INIT_AUTOMAKE is dnl obsolete as these values are obtained from the AC_INIT macro. -AM_INIT_AUTOMAKE([-Wall]) +AM_INIT_AUTOMAKE([-Wall subdir-objects]) dnl Clean compilation output makes compiler warnings more visible m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) @@ -255,7 +255,7 @@ dnl N.B. LT_INIT([dlopen], [win32-dll]) does not work for older libtool dnl so require new enough version above. Disable static library builds as dnl the frontend and backend libs are not linked. May need a recipe outside dnl of Libtool if these are needed. -LT_INIT([dlopen win32-dll disable-static]) +LT_INIT([dlopen win32-dll]) dnl Enable building of the convenience libltdl library recursively dnl (requires --with-included-ltdl be given to configure for the included @@ -263,7 +263,7 @@ dnl libltdl to be used instead of an installed version), useful on systems dnl where libltdl-dev is not installed. LTDL_INIT([convenience recursive]) -## dnl Ugly hack to work around libtool LT_CONFIG_H bug #12262 +dnl Ugly hack to work around libtool LT_CONFIG_H bug #12262 dnl http://lists.gnu.org/archive/html/bug-libtool/2012-08/msg00007.html AC_CONFIG_COMMANDS_PRE([LT_CONFIG_H=`expr "$LT_CONFIG_H" : '.*/\(.*\)'`]) diff --git a/include/hamlib/rig.h b/include/hamlib/rig.h index 024b0bb1a..02cf599ae 100644 --- a/include/hamlib/rig.h +++ b/include/hamlib/rig.h @@ -1725,10 +1725,6 @@ extern HAMLIB_EXPORT(scan_t) rig_parse_scan(const char *s); extern HAMLIB_EXPORT(rptr_shift_t) rig_parse_rptr_shift(const char *s); extern HAMLIB_EXPORT(chan_type_t) rig_parse_mtype(const char *s); -struct addrinfo; -extern HAMLIB_EXPORT(int) rig_getaddrinfo(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res); -extern HAMLIB_EXPORT(void) rig_freeaddrinfo(struct addrinfo *res); __END_DECLS diff --git a/lib/getaddrinfo.c b/lib/getaddrinfo.c index 3f4981037..cfea70047 100644 --- a/lib/getaddrinfo.c +++ b/lib/getaddrinfo.c @@ -53,7 +53,6 @@ # endif #endif -#include /* * Replacement for getaddrinfo. Only one addrinfo is returned. @@ -61,7 +60,7 @@ * Return 0 when success, otherwise -1. */ #ifndef HAVE_GETADDRINFO -int HAMLIB_API getaddrinfo(const char *node, const char *service, +int getaddrinfo(const char *node, const char *service, const struct addrinfo *hints, struct addrinfo **res) { struct addrinfo *p; @@ -120,7 +119,7 @@ int HAMLIB_API getaddrinfo(const char *node, const char *service, return 0; } -void HAMLIB_API freeaddrinfo(struct addrinfo *res) +void freeaddrinfo(struct addrinfo *res) { free(res->ai_addr); free(res); @@ -133,4 +132,3 @@ const char *gai_strerror(int errcode) return strerror(errcode); } #endif /* !HAVE_DECL_GAI_STRERROR */ - diff --git a/src/misc.c b/src/misc.c index 1d0104393..53ce69533 100644 --- a/src/misc.c +++ b/src/misc.c @@ -842,18 +842,4 @@ void HAMLIB_API rig_force_cache_timeout(struct timeval *tv) } -int HAMLIB_API rig_getaddrinfo(const char *node, const char *service, - const struct addrinfo *hints, struct addrinfo **res) -{ - return getaddrinfo(node, service, hints, res); -} - -void HAMLIB_API rig_freeaddrinfo(struct addrinfo *res) -{ - freeaddrinfo(res); -} - - - - /** @} */ diff --git a/tests/Makefile.am b/tests/Makefile.am index fe280cc4c..9efd077da 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,9 +25,7 @@ noinst_HEADERS = sprintflst.h rigctl_parse.h rotctl_parse.h uthash.h # all the programs need this -########## LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la -### No, because libmisc is already in libhamlib. -LDADD = $(top_builddir)/src/libhamlib.la +LDADD = $(top_builddir)/src/libhamlib.la $(top_builddir)/lib/libmisc.la DEPENDENCIES = $(top_builddir)/src/libhamlib.la rigmem_CFLAGS = $(AM_CFLAGS) @LIBXML2_CFLAGS@ diff --git a/tests/rigctld.c b/tests/rigctld.c index c3f2f5655..fd9abb6cc 100644 --- a/tests/rigctld.c +++ b/tests/rigctld.c @@ -383,7 +383,7 @@ int main (int argc, char *argv[]) hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */ hints.ai_protocol = 0; /* Any protocol */ - retcode = rig_getaddrinfo(src_addr, portno, &hints, &result); + retcode = getaddrinfo(src_addr, portno, &hints, &result); if (retcode != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(retcode)); exit(2); @@ -406,7 +406,7 @@ int main (int argc, char *argv[]) exit (1); } - rig_freeaddrinfo(result); /* No longer needed */ + freeaddrinfo(result); /* No longer needed */ if (listen(sock_listen, 4) < 0) { rig_debug(RIG_DEBUG_ERR, "listening: %s\n", strerror(errno)); diff --git a/tests/rotctld.c b/tests/rotctld.c index bb43225b6..eb4acf5f0 100644 --- a/tests/rotctld.c +++ b/tests/rotctld.c @@ -295,7 +295,7 @@ int main (int argc, char *argv[]) hints.ai_flags = AI_PASSIVE; /* For wildcard IP address */ hints.ai_protocol = 0; /* Any protocol */ - retcode = rig_getaddrinfo(src_addr, portno, &hints, &result); + retcode = getaddrinfo(src_addr, portno, &hints, &result); if (retcode != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(retcode)); exit(2); @@ -318,7 +318,7 @@ int main (int argc, char *argv[]) exit (1); } - rig_freeaddrinfo(result); /* No longer needed */ + freeaddrinfo(result); /* No longer needed */ if (listen(sock_listen,4) < 0) { rig_debug(RIG_DEBUG_ERR, "listening: %s\n", strerror(errno));