From: Amos Jeffries Date: Sun, 3 Oct 2010 14:42:04 +0000 (-0600) Subject: Convert compat library to a full library. X-Git-Tag: take1~215 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8350cebddefd446515defc9944e6bf34b9853616;p=thirdparty%2Fsquid.git Convert compat library to a full library. To be linked with LIBOBJS requires full local library status. To prevet naming clashes rename as libcompat-squid --- diff --git a/compat/Makefile.am b/compat/Makefile.am index 8181370f4c..03494f72a4 100644 --- a/compat/Makefile.am +++ b/compat/Makefile.am @@ -9,8 +9,8 @@ include $(top_srcdir)/src/Common.am # Port Specific Configurations -noinst_LTLIBRARIES = libcompat.la -libcompat_la_SOURCES = \ +noinst_LIBRARIES = libcompat-squid.a +libcompat_squid_a_SOURCES = \ assert.h \ compat.h \ compat_shared.h \ @@ -57,7 +57,7 @@ libcompat_la_SOURCES = \ GnuRegex.h \ GnuRegex.c -libcompat_la_LIBADD= $(LIBOBJS) +libcompat_squid_a_LIBADD= $(LIBOBJS) check_PROGRAMS += testPreCompiler TESTS += testPreCompiler diff --git a/compat/eui64_aton.h b/compat/eui64_aton.h index 98caeeed1a..903ddfea65 100644 --- a/compat/eui64_aton.h +++ b/compat/eui64_aton.h @@ -46,6 +46,9 @@ */ #ifndef _SYS_EUI64_H #define _SYS_EUI64_H +#ifdef __cplusplus +extern "C" { +#endif /** * Size of the ASCII representation of an EUI-64. @@ -64,10 +67,10 @@ struct eui64 { u_char octet[EUI64_LEN]; }; +int eui64_aton(const char *a, struct eui64 *e); #ifdef __cplusplus -extern "C" +} #endif -int eui64_aton(const char *a, struct eui64 *e); #endif /* !_SYS_EUI64_H */ #endif /* HAVE_SYS_EUI64_H */ diff --git a/src/Common.am b/src/Common.am index 96a08812a5..9e71907d9a 100644 --- a/src/Common.am +++ b/src/Common.am @@ -38,7 +38,7 @@ $(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h ## NP: libmisc util.cc depends on rint from math library COMPAT_LIB = \ -L$(top_builddir)/lib -lmiscutil \ - $(top_builddir)/compat/libcompat.la + -L$(top_builddir)/compat -lcompat-squid ## Some helpers are written in Perl and need the local shell defined properly subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1) diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index 513aea4c4f..0a7bc20886 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -12,8 +12,7 @@ AUTOMAKE_OPTIONS = subdir-objects INCLUDES += -I$(srcdir) LDADD = \ - $(top_builddir)/compat/libcompat.la \ - -L$(top_builddir)/lib -lmiscutil \ + $(COMPAT_LIB) \ $(top_builddir)/src/globals.o \ $(top_builddir)/src/time.o