]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Various link errors in testDiskIO
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 2 Dec 2008 14:03:13 +0000 (03:03 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 2 Dec 2008 14:03:13 +0000 (03:03 +1300)
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

configure.in
src/Makefile.am
src/tests/stub_CommIO.cc [new file with mode: 0644]
src/tests/stub_comm.cc

index ad43dcf70eb0dab56d737e6f7172428145fc0e0d..cef640ef46ff5e14baac075825805a0cf3e2e730 100644 (file)
@@ -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 <rside@aiinc.bc.ca>
 dnl Mon, 18 Jan 1999 17:48:00 GMT
index 9e2899998342de72133ce3a640eb38b33de94710..5c2308f4f9e93d6b596be9717b49e52d6b836107 100644 (file)
@@ -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 (file)
index 0000000..4eacf7e
--- /dev/null
@@ -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");
+}
index e9f4fdb70ed9759478b6991d210f053e288d576b..875c6ead12d2910db50d224662958eaaf9c2200d 100644 (file)
@@ -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)
 {