From: Amos Jeffries Date: Tue, 2 Dec 2008 14:03:13 +0000 (+1300) Subject: Various link errors in testDiskIO X-Git-Tag: SQUID_3_2_0_1~1309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=638b9bab165ac336ae2d6fc64f498f0f5d1b1dbb;p=thirdparty%2Fsquid.git Various link errors in testDiskIO TODO: Fix undefined reference to CommIO members discover whether any of the calls now stub'ed need to be used may need to pull CommIO out of comm.cc --- diff --git a/configure.in b/configure.in index ad43dcf70e..cef640ef46 100644 --- a/configure.in +++ b/configure.in @@ -433,6 +433,7 @@ if test "$with_aio" = "yes"; then echo "With aio" fi + AC_ARG_WITH(dl, AC_HELP_STRING([--with-dl],[Use dynamic linking])) if test "$with_dl" = "yes"; then @@ -676,6 +677,17 @@ for fs in $DISK_MODULES none; do ;; esac done + +dnl Check for librt +dnl We use AIO in the coss store +if test "$with_aio" = "yes"; then + dnl On some systems POSIX AIO functions are in libaio + AC_CHECK_LIB(rt, aio_read, + [DISK_LIBS="$DISK_LIBS -lrt"], + AC_CHECK_LIB(aio, aio_read,[DISK_LIBS="$DISK_LIBS -laio"]) + ) +fi + AC_SUBST(DISK_MODULES) AC_SUBST(DISK_LIBS) AC_SUBST(DISK_PROGRAMS) @@ -2703,13 +2715,6 @@ if test "$with_pthreads" = "yes"; then AC_CHECK_LIB(pthread, main) fi -dnl Check for librt -dnl We use AIO in the coss store -if test "$with_aio" = "yes"; then - dnl On some systems POSIX AIO functions are in libaio - AC_CHECK_LIB(rt, aio_read,,AC_CHECK_LIB(aio, aio_read)) -fi - dnl -lintl is needed on SCO version 3.2v4.2 for strftime() dnl Robert Side dnl Mon, 18 Jan 1999 17:48:00 GMT diff --git a/src/Makefile.am b/src/Makefile.am index 9e28999983..5c2308f4f9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -970,7 +970,8 @@ libAIO_a_SOURCES = \ DiskIO/AIO/AIODiskFile.h \ DiskIO/AIO/AIODiskIOStrategy.cc \ DiskIO/AIO/AIODiskIOStrategy.h \ - DiskIO/AIO/AIODiskIOModule.h + DiskIO/AIO/AIODiskIOModule.cc \ + DiskIO/AIO/AIODiskIOModule.h libBlocking_a_SOURCES = \ DiskIO/Blocking/BlockingFile.cc \ @@ -1476,14 +1477,16 @@ tests_testDiskIO_SOURCES= \ tests/testDiskIO.cc \ tests/testDiskIO.h \ tests/testMain.cc \ - tests/stub_cache_manager.cc + tests/stub_cache_manager.cc \ + tests/stub_CommIO.cc tests_testDiskIO_LDADD= \ + @DISK_LIBS@ \ $(SWAP_TEST_LDADD) \ - libsquid.la \ - @SSLLIB@ + SquidConfig.o tests_testDiskIO_LDFLAGS = $(LIBADD_DL) tests_testDiskIO_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \ + @DISK_LIBS@ \ $(SWAP_TEST_DS) \ @SQUID_CPPUNIT_LA@ diff --git a/src/tests/stub_CommIO.cc b/src/tests/stub_CommIO.cc new file mode 100644 index 0000000000..4eacf7e097 --- /dev/null +++ b/src/tests/stub_CommIO.cc @@ -0,0 +1,32 @@ +#include "squid.h" +#include "CommIO.h" + +void +CommIO::ResetNotifications() +{ + fatal("Not Implemented"); +} + +void +CommIO::Initialise() +{ + fatal("Not Implemented"); +} + +void +CommIO::NotifyIOClose() +{ + fatal("Not Implemented"); +} + +void +CommIO::NULLFDHandler(int, void *) +{ + fatal("Not Implemented"); +} + +void +CommIO::FlushPipe() +{ + fatal("Not Implemented"); +} diff --git a/src/tests/stub_comm.cc b/src/tests/stub_comm.cc index e9f4fdb70e..875c6ead12 100644 --- a/src/tests/stub_comm.cc +++ b/src/tests/stub_comm.cc @@ -96,6 +96,12 @@ commSetSelect(int fd, unsigned int type, PF * handler, void *client_data, /* all test code runs synchronously at the moment */ } +void +comm_quick_poll_required() +{ + /* for tests ... ignore */ +} + int ignoreErrno(int ierrno) { @@ -110,6 +116,13 @@ commSetTimeout(int fd, int timeout, PF * handler, void *data) return -1; } +int +commSetNonBlocking(int fd) +{ + fatal ("Not implemented"); + return COMM_ERROR; +} + int commUnsetNonBlocking(int fd) {