From 5ef971f34aced376e385a7ac301e0db96fbef0d4 Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 13 Nov 2009 23:38:01 +0000 Subject: Remove TR1 hooks - can be assumed to exist under a C++0x compiler --- configure.py | 44 ++++++-------------------------------------- 1 file changed, 6 insertions(+), 38 deletions(-) (limited to 'configure.py') diff --git a/configure.py b/configure.py index 5e2e4004d..d48396c8a 100755 --- a/configure.py +++ b/configure.py @@ -174,10 +174,6 @@ def process_command_line(args): default=False, action='store_true', help='enable Boost.Python wrapper') - build_group.add_option('--with-tr1-implementation', metavar='WHICH', - dest='with_tr1', default=None, - help='enable TR1 (options: none, system, boost)') - build_group.add_option('--with-build-dir', metavar='DIR', default='', help='setup the build in DIR') @@ -368,7 +364,6 @@ class ModuleInfo(object): { 'load_on': 'auto', 'define': None, 'modset': None, - 'uses_tr1': 'false', 'need_isa': None, 'note': '', 'mp_bits': 0 }) @@ -399,11 +394,6 @@ class ModuleInfo(object): self.mp_bits = int(self.mp_bits) - if self.uses_tr1 == 'yes': - self.uses_tr1 = True - else: - self.uses_tr1 = False - def compatible_cpu(self, archinfo, options): arch_name = archinfo.basename @@ -423,9 +413,7 @@ class ModuleInfo(object): def compatible_os(self, os): return self.os == [] or os in self.os - def compatible_compiler(self, cc, with_tr1): - if self.uses_tr1 and with_tr1 not in ['boost', 'system']: - return False + def compatible_compiler(self, cc): return self.cc == [] or cc in self.cc def dependencies(self): @@ -538,8 +526,7 @@ class CompilerInfo(object): 'dll_import_flags': '', 'dll_export_flags': '', 'ar_command': None, - 'makefile_style': '', - 'compiler_has_tr1': False, + 'makefile_style': '' }) self.so_link_flags = force_to_dict(self.so_link_flags) @@ -617,19 +604,8 @@ class CompilerInfo(object): """ Return defines for build.h """ - def defines(self, with_tr1): - - def tr1_macro(): - if with_tr1: - if with_tr1 == 'boost': - return ['USE_BOOST_TR1'] - elif with_tr1 == 'system': - return ['USE_STD_TR1'] - elif self.compiler_has_tr1: - return ['USE_STD_TR1'] - return [] - - return ['BUILD_COMPILER_IS_' + self.macro_name] + tr1_macro() + def defines(self): + return ['BUILD_COMPILER_IS_' + self.macro_name] class OsInfo(object): def __init__(self, infofile): @@ -843,8 +819,7 @@ def create_template_vars(build_config, options, modules, cc, arch, osinfo): 'target_os_defines': make_cpp_macros(osinfo.defines()), - 'target_compiler_defines': make_cpp_macros( - cc.defines(options.with_tr1)), + 'target_compiler_defines': make_cpp_macros(cc.defines()), 'target_cpu_defines': make_cpp_macros(arch.defines(options)), @@ -920,8 +895,7 @@ def choose_modules_to_use(modules, archinfo, options): cannot_use_because(modname, 'CPU incompatible') elif not module.compatible_os(options.os): cannot_use_because(modname, 'OS incompatible') - elif not module.compatible_compiler(options.compiler, - options.with_tr1): + elif not module.compatible_compiler(options.compiler): cannot_use_because(modname, 'compiler incompatible') else: @@ -1220,12 +1194,6 @@ def main(argv = None): logging.info('Setting -fpermissive to work around gcc bug') options.extra_flags = ' -fpermissive' - if options.with_tr1 == None: - if ccinfo[options.compiler].compiler_has_tr1: - options.with_tr1 = 'system' - else: - options.with_tr1 = 'none' - modules_to_use = choose_modules_to_use(modules, archinfo[options.arch], options) -- cgit v1.2.3 From f263a8f1c43b065404eb1f965280a1fc860171bc Mon Sep 17 00:00:00 2001 From: lloyd Date: Thu, 21 Jan 2010 16:41:30 +0000 Subject: Post-merge fixes --- configure.py | 3 +-- src/cert/x509/x509opt.cpp | 2 +- src/filters/modes/cfb/cfb.cpp | 4 ++-- src/filters/pipe.h | 2 +- src/utils/exceptn.h | 4 ++-- 5 files changed, 7 insertions(+), 8 deletions(-) (limited to 'configure.py') diff --git a/configure.py b/configure.py index 39120d22a..9a566f716 100755 --- a/configure.py +++ b/configure.py @@ -1018,8 +1018,7 @@ def choose_modules_to_use(modules, archinfo, options): cannot_use_because(modname, 'incompatible CPU') elif not module.compatible_os(options.os): cannot_use_because(modname, 'incompatible OS') - elif not module.compatible_compiler(options.compiler, - options.with_tr1): + elif not module.compatible_compiler(options.compiler): cannot_use_because(modname, 'incompatible compiler') else: diff --git a/src/cert/x509/x509opt.cpp b/src/cert/x509/x509opt.cpp index fda889224..8d235ad5d 100644 --- a/src/cert/x509/x509opt.cpp +++ b/src/cert/x509/x509opt.cpp @@ -78,7 +78,7 @@ void X509_Cert_Options::sanity_check() const * Initialize the certificate options */ X509_Cert_Options::X509_Cert_Options(const std::string& initial_opts, - u32bit expiration_time_in_seconds) + u32bit expiration_time) { is_CA = false; path_limit = 0; diff --git a/src/filters/modes/cfb/cfb.cpp b/src/filters/modes/cfb/cfb.cpp index e7737e673..ff1714b81 100644 --- a/src/filters/modes/cfb/cfb.cpp +++ b/src/filters/modes/cfb/cfb.cpp @@ -103,7 +103,7 @@ CFB_Decryption::CFB_Decryption(BlockCipher* ciph, u32bit fback_bits) if(feedback == 0 || fback_bits % 8 != 0 || feedback > cipher->BLOCK_SIZE) throw Invalid_Argument("CFB_Decryption: Invalid feedback size " + - to_string(fback_bits)); + std::to_string(fback_bits)); } /* @@ -123,7 +123,7 @@ CFB_Decryption::CFB_Decryption(BlockCipher* ciph, if(feedback == 0 || fback_bits % 8 != 0 || feedback > cipher->BLOCK_SIZE) throw Invalid_Argument("CFB_Decryption: Invalid feedback size " + - to_string(fback_bits)); + std::to_string(fback_bits)); set_key(key); set_iv(iv); diff --git a/src/filters/pipe.h b/src/filters/pipe.h index 19cdd3229..a927e1a0f 100644 --- a/src/filters/pipe.h +++ b/src/filters/pipe.h @@ -33,7 +33,7 @@ class BOTAN_DLL Pipe : public DataSource { Invalid_Message_Number(const std::string& where, message_id msg) : Invalid_Argument("Pipe::" + where + ": Invalid message number " + - to_string(msg)) + std::to_string(msg)) {} }; diff --git a/src/utils/exceptn.h b/src/utils/exceptn.h index 86efebc7c..39b18cb0b 100644 --- a/src/utils/exceptn.h +++ b/src/utils/exceptn.h @@ -56,7 +56,7 @@ struct BOTAN_DLL Invalid_Key_Length : public Invalid_Argument { Invalid_Key_Length(const std::string& name, u32bit length) : Invalid_Argument(name + " cannot accept a key of length " + - to_string(length)) + std::to_string(length)) {} }; @@ -78,7 +78,7 @@ struct BOTAN_DLL Invalid_Block_Size : public Invalid_Argument struct BOTAN_DLL Invalid_IV_Length : public Invalid_Argument { Invalid_IV_Length(const std::string& mode, u32bit bad_len) : - Invalid_Argument("IV length " + to_string(bad_len) + + Invalid_Argument("IV length " + std::to_string(bad_len) + " is invalid for " + mode) {} }; -- cgit v1.2.3 From 6eec50d372143afcb3188f21d0991ace3e0d5e9e Mon Sep 17 00:00:00 2001 From: lloyd Date: Fri, 9 Apr 2010 14:04:43 +0000 Subject: Remove TR1 testing; C++0x had what we need --- configure.py | 8 -------- 1 file changed, 8 deletions(-) (limited to 'configure.py') diff --git a/configure.py b/configure.py index 1e91a35e3..479511646 100755 --- a/configure.py +++ b/configure.py @@ -506,12 +506,6 @@ class ModuleInfo(object): def compatible_compiler(self, cc): return self.cc == [] or cc in self.cc - def tr1_ok(self, with_tr1): - if self.uses_tr1: - return with_tr1 in ['boost', 'system'] - else: - return True - def dependencies(self): # utils is an implicit dep (contains types, etc) deps = self.requires + ['utils'] @@ -1028,8 +1022,6 @@ def choose_modules_to_use(modules, archinfo, options): cannot_use_because(modname, 'incompatible OS') elif not module.compatible_compiler(options.compiler): cannot_use_because(modname, 'incompatible compiler') - elif not module.tr1_ok(options.with_tr1): - cannot_use_because(modname, 'missing TR1') else: if module.load_on == 'never': -- cgit v1.2.3