BIND 10 trac1202, updated. 59e2ceaf7b75c38391c518436a70ac3d41b8c8be [1202] Add missing header files

BIND 10 source code commits bind10-changes at lists.isc.org
Fri Sep 9 15:26:03 UTC 2011


The branch, trac1202 has been updated
       via  59e2ceaf7b75c38391c518436a70ac3d41b8c8be (commit)
       via  4e3c6c5e5b19be3a0f970a06e3e135d1b2fae668 (commit)
      from  02b2e71bdc1564f4272869bb5676727af809870f (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 59e2ceaf7b75c38391c518436a70ac3d41b8c8be
Author: Stephen Morris <stephen at isc.org>
Date:   Fri Sep 9 15:47:27 2011 +0100

    [1202] Add missing header files
    
    Update all of the RR definition files so that they are complete in
    themselves so that they compile in the rdataclass.cc framework,
    regardless of what other files are included.

commit 4e3c6c5e5b19be3a0f970a06e3e135d1b2fae668
Author: Stephen Morris <stephen at isc.org>
Date:   Fri Sep 9 15:40:20 2011 +0100

    [1202] Sort files into canonical order before processing

-----------------------------------------------------------------------

Summary of changes:
 src/lib/dns/gen-rdatacode.py.in       |   22 ++++++++++++++++++++--
 src/lib/dns/rdata/any_255/tsig_250.cc |    1 +
 src/lib/dns/rdata/generic/afsdb_18.cc |    1 +
 src/lib/dns/rdata/generic/minfo_14.cc |    1 +
 src/lib/dns/rdata/generic/rp_17.cc    |    1 +
 5 files changed, 24 insertions(+), 2 deletions(-)

-----------------------------------------------------------------------
diff --git a/src/lib/dns/gen-rdatacode.py.in b/src/lib/dns/gen-rdatacode.py.in
index b3c8da2..c984464 100755
--- a/src/lib/dns/gen-rdatacode.py.in
+++ b/src/lib/dns/gen-rdatacode.py.in
@@ -42,6 +42,10 @@ heading_txt = '''///////////////
 ///////////////
 
 '''
+rrtypeh_txt = '''// Many RR implementation files require definition of RR types.
+#include <dns/rrtype.h>
+
+'''
 
 def import_classdef(class_txt, file):
     content = ''
@@ -133,7 +137,15 @@ def import_definitions(classcode2txt, typecode2txt, typeandclass):
     if classdir_mtime < getmtime('@srcdir@/rdata'):
         classdir_mtime = getmtime('@srcdir@/rdata')
 
-    for dir in list(os.listdir('@srcdir@/rdata')):
+    # Sort directories before iterating through them so that the directory
+    # list is processed in the same order on all systems.  The resulting
+    # files should compile regardless of the order in which the components
+    # are included but...  Having a fixed order for the directories should
+    # eliminate system-dependent problems.  (Note that the drectory names
+    # in BIND 10 are ASCII, so the order should be locale-independent.)
+    dirlist = os.listdir('@srcdir@/rdata')
+    dirlist.sort()
+    for dir in dirlist:
         classdir = '@srcdir@/rdata' + os.sep + dir
         m = re_typecode.match(dir)
         if os.path.isdir(classdir) and (m != None or dir == 'generic'):
@@ -145,7 +157,12 @@ def import_definitions(classcode2txt, typecode2txt, typeandclass):
                 class_code = m.group(2)
                 if not class_code in classcode2txt:
                     classcode2txt[class_code] = class_txt
-            for file in list(os.listdir(classdir)):
+
+            # Same considerations as directories regarding sorted order
+            # also apply to files.
+            filelist = os.listdir(classdir)
+            filelist.sort()
+            for file in filelist:
                 file = classdir + os.sep + file
                 m = re_typecode.match(os.path.split(file)[1])
                 if m != None:
@@ -187,6 +204,7 @@ def generate_rdatadef(file, basemtime):
         return
     rdata_deffile = open(file, 'w')
     rdata_deffile.write(heading_txt)
+    rdata_deffile.write(rrtypeh_txt)
     rdata_deffile.write(class_definitions)
     rdata_deffile.close()
 
diff --git a/src/lib/dns/rdata/any_255/tsig_250.cc b/src/lib/dns/rdata/any_255/tsig_250.cc
index 04a4dc4..4eb72bc 100644
--- a/src/lib/dns/rdata/any_255/tsig_250.cc
+++ b/src/lib/dns/rdata/any_255/tsig_250.cc
@@ -23,6 +23,7 @@
 #include <util/encode/base64.h>
 
 #include <dns/messagerenderer.h>
+#include <dns/name.h>
 #include <dns/rdata.h>
 #include <dns/rdataclass.h>
 #include <dns/tsigerror.h>
diff --git a/src/lib/dns/rdata/generic/afsdb_18.cc b/src/lib/dns/rdata/generic/afsdb_18.cc
index dd7fa5f..6afc4de 100644
--- a/src/lib/dns/rdata/generic/afsdb_18.cc
+++ b/src/lib/dns/rdata/generic/afsdb_18.cc
@@ -26,6 +26,7 @@
 #include <boost/lexical_cast.hpp>
 
 using namespace std;
+using namespace isc::util;
 using namespace isc::util::str;
 
 // BEGIN_ISC_NAMESPACE
diff --git a/src/lib/dns/rdata/generic/minfo_14.cc b/src/lib/dns/rdata/generic/minfo_14.cc
index 734fbc3..aa5272c 100644
--- a/src/lib/dns/rdata/generic/minfo_14.cc
+++ b/src/lib/dns/rdata/generic/minfo_14.cc
@@ -24,6 +24,7 @@
 
 using namespace std;
 using namespace isc::dns;
+using namespace isc::util;
 
 // BEGIN_ISC_NAMESPACE
 // BEGIN_RDATA_NAMESPACE
diff --git a/src/lib/dns/rdata/generic/rp_17.cc b/src/lib/dns/rdata/generic/rp_17.cc
index b8b2ba2..781b55d 100644
--- a/src/lib/dns/rdata/generic/rp_17.cc
+++ b/src/lib/dns/rdata/generic/rp_17.cc
@@ -24,6 +24,7 @@
 
 using namespace std;
 using namespace isc::dns;
+using namespace isc::util;
 
 // BEGIN_ISC_NAMESPACE
 // BEGIN_RDATA_NAMESPACE




More information about the bind10-changes mailing list