[svn] commit: r3175 - in /branches/vorner-sockcreator/src: bin/xfrout/ bin/xfrout/tests/ lib/ lib/util/io/ lib/xfr/

BIND 10 source code commits bind10-changes at lists.isc.org
Mon Oct 11 14:46:51 UTC 2010


Author: vorner
Date: Mon Oct 11 14:46:50 2010
New Revision: 3175

Log:
Move send_fd and recv_fd to isc::util::io

* They are not xfr specific and can be used by more parts of the system.
* TODO: They are missing tests.

Added:
    branches/vorner-sockcreator/src/lib/util/io/fd_share.cc
      - copied, changed from r3163, branches/vorner-sockcreator/src/lib/xfr/fd_share.cc
    branches/vorner-sockcreator/src/lib/util/io/fd_share.h
      - copied, changed from r3163, branches/vorner-sockcreator/src/lib/xfr/fd_share.h
    branches/vorner-sockcreator/src/lib/util/io/fdshare_python.cc
      - copied, changed from r3163, branches/vorner-sockcreator/src/lib/xfr/fdshare_python.cc
Removed:
    branches/vorner-sockcreator/src/lib/xfr/fd_share.cc
    branches/vorner-sockcreator/src/lib/xfr/fd_share.h
    branches/vorner-sockcreator/src/lib/xfr/fdshare_python.cc
    branches/vorner-sockcreator/src/lib/xfr/python_xfr.cc
Modified:
    branches/vorner-sockcreator/src/bin/xfrout/tests/Makefile.am
    branches/vorner-sockcreator/src/bin/xfrout/xfrout.py.in
    branches/vorner-sockcreator/src/lib/Makefile.am
    branches/vorner-sockcreator/src/lib/util/io/Makefile.am
    branches/vorner-sockcreator/src/lib/xfr/Makefile.am
    branches/vorner-sockcreator/src/lib/xfr/xfrout_client.cc

Modified: branches/vorner-sockcreator/src/bin/xfrout/tests/Makefile.am
==============================================================================
--- branches/vorner-sockcreator/src/bin/xfrout/tests/Makefile.am (original)
+++ branches/vorner-sockcreator/src/bin/xfrout/tests/Makefile.am Mon Oct 11 14:46:50 2010
@@ -5,7 +5,7 @@
 # required by loadable python modules.
 LIBRARY_PATH_PLACEHOLDER =
 if SET_ENV_LIBRARY_PATH
-LIBRARY_PATH_PLACEHOLDER += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/xfr/.libs:$$$(ENV_LIBRARY_PATH)
+LIBRARY_PATH_PLACEHOLDER += $(ENV_LIBRARY_PATH)=$(abs_top_builddir)/src/lib/dns/.libs:$(abs_top_builddir)/src/lib/exceptions/.libs:$(abs_top_builddir)/src/lib/util/io/.libs:$$$(ENV_LIBRARY_PATH)
 endif
 
 # later will have configure option to choose this, like: coverage run --branch
@@ -14,7 +14,7 @@
 check-local:
 	for pytest in $(PYTESTS) ; do \
 	echo Running test: $$pytest ; \
-	env PYTHONPATH=$(abs_top_builddir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/lib/xfr/.libs \
+	env PYTHONPATH=$(abs_top_builddir)/src/bin/xfrout:$(abs_top_srcdir)/src/lib/python:$(abs_top_builddir)/src/lib/python:$(abs_top_builddir)/src/lib/dns/python/.libs:$(abs_top_builddir)/src/lib/util/io/.libs \
 	$(LIBRARY_PATH_PLACEHOLDER) \
 	$(PYCOVERAGE) $(abs_srcdir)/$$pytest || exit ; \
 	done

Modified: branches/vorner-sockcreator/src/bin/xfrout/xfrout.py.in
==============================================================================
--- branches/vorner-sockcreator/src/bin/xfrout/xfrout.py.in (original)
+++ branches/vorner-sockcreator/src/bin/xfrout/xfrout.py.in Mon Oct 11 14:46:50 2010
@@ -35,12 +35,12 @@
 import errno
 from optparse import OptionParser, OptionValueError
 try:
-    from libxfr_python import *
+    from libutil_io_python import *
     from pydnspp import *
 except ImportError as e:
     # C++ loadable module may not be installed; even so the xfrout process
     # must keep running, so we warn about it and move forward.
-    sys.stderr.write('[b10-xfrout] failed to import DNS or XFR module: %s\n' % str(e))
+    sys.stderr.write('[b10-xfrout] failed to import DNS or isc.util.io module: %s\n' % str(e))
 
 isc.utils.process.rename()
 

Modified: branches/vorner-sockcreator/src/lib/Makefile.am
==============================================================================
--- branches/vorner-sockcreator/src/lib/Makefile.am (original)
+++ branches/vorner-sockcreator/src/lib/Makefile.am Mon Oct 11 14:46:50 2010
@@ -1,1 +1,1 @@
-SUBDIRS = exceptions dns cc config datasrc python xfr bench util
+SUBDIRS = exceptions dns cc config datasrc bench util xfr python

Modified: branches/vorner-sockcreator/src/lib/util/io/Makefile.am
==============================================================================
--- branches/vorner-sockcreator/src/lib/util/io/Makefile.am (original)
+++ branches/vorner-sockcreator/src/lib/util/io/Makefile.am Mon Oct 11 14:46:50 2010
@@ -1,6 +1,16 @@
 AM_CXXFLAGS = $(B10_CXXFLAGS)
 
 lib_LTLIBRARIES = libutil_io.la
-libutil_io_la_SOURCES = fd.h fd.cc
+libutil_io_la_SOURCES = fd.h fd.cc fd_share.h fd_share.cc
+libutil_io_la_CXXFLAGS = $(AM_CXXFLAGS) -fno-strict-aliasing
 
 CLEANFILES = *.gcno *.gcda
+
+pyexec_LTLIBRARIES = libutil_io_python.la
+# Python prefers .so, while some OSes (specifically MacOS) use a different
+# suffix for dynamic objects.  -module is necessary to work this around.
+libutil_io_python_la_LDFLAGS = -module
+libutil_io_python_la_SOURCES = fdshare_python.cc
+libutil_io_python_la_LIBADD = libutil_io.la
+libutil_io_python_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_INCLUDES)
+libutil_io_python_la_CXXFLAGS = $(AM_CXXFLAGS)

Modified: branches/vorner-sockcreator/src/lib/xfr/Makefile.am
==============================================================================
--- branches/vorner-sockcreator/src/lib/xfr/Makefile.am (original)
+++ branches/vorner-sockcreator/src/lib/xfr/Makefile.am Mon Oct 11 14:46:50 2010
@@ -1,19 +1,11 @@
 AM_CPPFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib
 AM_CPPFLAGS += -I$(top_srcdir)/src/lib/dns -I$(top_builddir)/src/lib/dns
 
-AM_CXXFLAGS = $(B10_CXXFLAGS) -Wno-strict-aliasing
+AM_CXXFLAGS = $(B10_CXXFLAGS)
 AM_CXXFLAGS += -Wno-unused-parameter # see src/lib/cc/Makefile.am
 
 CLEANFILES = *.gcno *.gcda
 
 lib_LTLIBRARIES = libxfr.la
-libxfr_la_SOURCES = xfrout_client.h xfrout_client.cc 
-libxfr_la_SOURCES += fd_share.h fd_share.cc
-
-pyexec_LTLIBRARIES = libxfr_python.la
-# Python prefers .so, while some OSes (specifically MacOS) use a different
-# suffix for dynamic objects.  -module is necessary to work this around.
-libxfr_python_la_LDFLAGS = -module
-libxfr_python_la_SOURCES = fdshare_python.cc fd_share.cc fd_share.h
-libxfr_python_la_CPPFLAGS = $(AM_CPPFLAGS) $(PYTHON_INCLUDES)
-libxfr_python_la_CXXFLAGS = $(AM_CXXFLAGS)
+libxfr_la_SOURCES = xfrout_client.h xfrout_client.cc
+libxfr_la_LIBADD = $(top_builddir)/src/lib/util/io/libutil_io.la

Modified: branches/vorner-sockcreator/src/lib/xfr/xfrout_client.cc
==============================================================================
--- branches/vorner-sockcreator/src/lib/xfr/xfrout_client.cc (original)
+++ branches/vorner-sockcreator/src/lib/xfr/xfrout_client.cc Mon Oct 11 14:46:50 2010
@@ -22,10 +22,11 @@
 #include <unistd.h>
 #include <asio.hpp>
 
-#include <xfr/fd_share.h>
+#include <util/io/fd_share.h>
 #include <xfr/xfrout_client.h>
 
 using namespace std;
+using namespace isc::util::io;
 using asio::local::stream_protocol;
 
 namespace isc {




More information about the bind10-changes mailing list