[Xorp-cvs] SF.net SVN: xorp:[11663] trunk/xorp

bms_fbsd at users.sourceforge.net bms_fbsd at users.sourceforge.net
Thu Dec 3 14:42:24 PST 2009


Revision: 11663
          http://xorp.svn.sourceforge.net/xorp/?rev=11663&view=rev
Author:   bms_fbsd
Date:     2009-12-03 22:42:23 +0000 (Thu, 03 Dec 2009)

Log Message:
-----------
Second Boost refactoring pass.

Use Boost's C-compatible regex library, in preference
to pcreposix. Given we've started using Boost, this
reduces our third-party dependency count.

No functional changes.

Modified Paths:
--------------
    trunk/xorp/SConstruct
    trunk/xorp/cli/SConscript
    trunk/xorp/cli/cli_command_pipe.hh
    trunk/xorp/policy/backend/instruction.hh
    trunk/xorp/policy/common/SConscript
    trunk/xorp/policy/common/policy_utils.cc
    trunk/xorp/site_scons/config/allconfig.py

Modified: trunk/xorp/SConstruct
===================================================================
--- trunk/xorp/SConstruct	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/SConstruct	2009-12-03 22:42:23 UTC (rev 11663)
@@ -367,7 +367,7 @@
     # Additional Boost libraries
     #conf.CheckBoostLibrary('filesystem')
     #conf.CheckBoostLibrary('program_options')
-    #conf.CheckBoostLibrary('regex')
+    conf.CheckBoostLibrary('regex')
     #conf.CheckBoostLibrary('signals')
     #conf.CheckBoostLibrary('thread')
 

Modified: trunk/xorp/cli/SConscript
===================================================================
--- trunk/xorp/cli/SConscript	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/cli/SConscript	2009-12-03 22:42:23 UTC (rev 11663)
@@ -59,7 +59,7 @@
 
 # External libraries.
 env.AppendUnique(LIBS = [
-    'pcreposix'
+    'boost_regex'
 ])
 
 env.Replace(RPATH = [

Modified: trunk/xorp/cli/cli_command_pipe.hh
===================================================================
--- trunk/xorp/cli/cli_command_pipe.hh	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/cli/cli_command_pipe.hh	2009-12-03 22:42:23 UTC (rev 11663)
@@ -34,19 +34,8 @@
 #include <string>
 #include <list>
 
-#ifdef HAVE_REGEX_H
-#include <regex.h>
-#else // ! HAVE_REGEX_H
+#include <boost/regex.h>
 
-#ifdef HAVE_PCRE_H
-#include <pcre.h>
-#endif
-#ifdef HAVE_PCREPOSIX_H
-#include <pcreposix.h>
-#endif
-
-#endif // ! HAVE_REGEX_H
-
 #include "cli_command.hh"
 
 

Modified: trunk/xorp/policy/backend/instruction.hh
===================================================================
--- trunk/xorp/policy/backend/instruction.hh	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/policy/backend/instruction.hh	2009-12-03 22:42:23 UTC (rev 11663)
@@ -25,12 +25,7 @@
 
 #include "libxorp/xorp.h"
 
-#if defined(HAVE_REGEX_H)
-#include <regex.h>
-#elif defined(HAVE_PCREPOSIX_H)
-#include <pcre.h>
-#include <pcreposix.h>
-#endif
+#include <boost/cregex.hpp>
 
 #include "policy/common/element_base.hh"
 #include "policy/common/operator_base.hh"

Modified: trunk/xorp/policy/common/SConscript
===================================================================
--- trunk/xorp/policy/common/SConscript	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/policy/common/SConscript	2009-12-03 22:42:23 UTC (rev 11663)
@@ -40,7 +40,7 @@
 
 # External libraries
 env.AppendUnique(LIBS = [
-    'pcreposix'
+    'boost_regex'
 ])
 
 is_shared = env.has_key('SHAREDLIBS')

Modified: trunk/xorp/policy/common/policy_utils.cc
===================================================================
--- trunk/xorp/policy/common/policy_utils.cc	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/policy/common/policy_utils.cc	2009-12-03 22:42:23 UTC (rev 11663)
@@ -22,14 +22,7 @@
 
 #include "libxorp/xorp.h"
 
-#if defined(HAVE_REGEX_H)
-#include <regex.h>
-#elif defined(HAVE_PCREPOSIX_H)
-#include <pcre.h>
-#include <pcreposix.h>
-#else
-#error "No header defining regex_t is present."
-#endif
+#include <boost/regex.h>
 
 #include "policy_utils.hh"
 

Modified: trunk/xorp/site_scons/config/allconfig.py
===================================================================
--- trunk/xorp/site_scons/config/allconfig.py	2009-12-03 22:10:51 UTC (rev 11662)
+++ trunk/xorp/site_scons/config/allconfig.py	2009-12-03 22:42:23 UTC (rev 11663)
@@ -83,10 +83,10 @@
     has_pwd_h = conf.CheckHeader('pwd.h')
     has_mqueue_h = conf.CheckHeader('mqueue.h')
 
-    prereq_regex_h = []
-    if has_sys_types_h:
-	prereq_regex_h.append('sys/types.h')
-    has_regex_h = conf.CheckHeader(prereq_regex_h + ['regex.h'])
+    #prereq_regex_h = []
+    #if has_sys_types_h:
+    #	prereq_regex_h.append('sys/types.h')
+    #has_regex_h = conf.CheckHeader(prereq_regex_h + ['regex.h'])
 
     has_syslog_h = conf.CheckHeader('syslog.h')
     has_termios_h = conf.CheckHeader('termios.h')
@@ -660,10 +660,10 @@
     ##########
     # pcre posix regexp emulation
     # used by policy for regexps.
-    has_pcre_h = conf.CheckHeader('pcre.h')
-    has_pcreposix_h = conf.CheckHeader('pcreposix.h')
-    has_libpcre = conf.CheckLib('pcre')
-    has_libpcreposix = conf.CheckLib('pcreposix')
+    #has_pcre_h = conf.CheckHeader('pcre.h')
+    #has_pcreposix_h = conf.CheckHeader('pcreposix.h')
+    #has_libpcre = conf.CheckLib('pcre')
+    #has_libpcreposix = conf.CheckLib('pcreposix')
     
     ##########
     # openssl for md5


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Xorp-cvs mailing list