diff options
-rwxr-xr-x | configure.py | 11 | ||||
-rw-r--r-- | src/build-data/os/darwin.txt | 6 | ||||
-rw-r--r-- | src/build-data/os/ios.txt | 6 | ||||
-rw-r--r-- | src/build-data/os/openbsd.txt | 6 | ||||
-rw-r--r-- | src/build-data/os/windows.txt | 2 | ||||
-rw-r--r-- | src/lib/filters/basefilt.h | 2 | ||||
-rw-r--r-- | src/lib/filters/threaded_fork.cpp | 2 | ||||
-rw-r--r-- | src/lib/utils/info.txt | 2 | ||||
-rw-r--r-- | src/lib/utils/thread_utils/barrier.cpp (renamed from src/lib/utils/barrier.cpp) | 6 | ||||
-rw-r--r-- | src/lib/utils/thread_utils/barrier.h (renamed from src/lib/utils/barrier.h) | 9 | ||||
-rw-r--r-- | src/lib/utils/thread_utils/info.txt | 12 | ||||
-rw-r--r-- | src/lib/utils/thread_utils/semaphore.cpp (renamed from src/lib/utils/semaphore.cpp) | 4 | ||||
-rw-r--r-- | src/lib/utils/thread_utils/semaphore.h (renamed from src/lib/utils/semaphore.h) | 7 | ||||
-rwxr-xr-x | src/scripts/website.py | 4 | ||||
-rw-r--r-- | src/tests/test_filters.cpp | 2 |
15 files changed, 40 insertions, 41 deletions
diff --git a/configure.py b/configure.py index a4cef1a0b..ee58efe78 100755 --- a/configure.py +++ b/configure.py @@ -521,6 +521,8 @@ def process_command_line(args): # pylint: disable=too-many-locals install_group.add_option('--program-suffix', metavar='SUFFIX', help='append string to program names') + install_group.add_option('--library-suffix', metavar='SUFFIX', default='', + help='append string to library names') install_group.add_option('--prefix', metavar='DIR', help='set the install prefix') @@ -1273,7 +1275,7 @@ class OsInfo(InfoObject): # pylint: disable=too-many-instance-attributes 'so_post_link_command': '', 'cli_exe_name': 'botan', 'lib_prefix': 'lib', - 'library_name': 'botan-{major}', + 'library_name': 'botan{suffix}-{major}', }) if lex.ar_command == 'ar' and lex.ar_options == '': @@ -1292,7 +1294,7 @@ class OsInfo(InfoObject): # pylint: disable=too-many-instance-attributes raise InternalError("Invalid soname_patterns in %s" % (self.infofile)) else: if lex.soname_suffix: - self.soname_pattern_base = "libbotan-{version_major}.%s" % (lex.soname_suffix) + self.soname_pattern_base = "libbotan{lib_suffix}-{version_major}.%s" % (lex.soname_suffix) self.soname_pattern_abi = self.soname_pattern_base + ".{abi_rev}" self.soname_pattern_patch = self.soname_pattern_abi + ".{version_minor}.{version_patch}" else: @@ -1762,7 +1764,10 @@ def create_template_vars(source_paths, build_config, options, modules, cc, arch, 'lib_prefix': osinfo.lib_prefix, 'static_suffix': osinfo.static_suffix, - 'libname': osinfo.library_name.format(major=Version.major(), minor=Version.minor()), + 'lib_suffix': options.library_suffix, + 'libname': osinfo.library_name.format(major=Version.major(), + minor=Version.minor(), + suffix=options.library_suffix), 'command_line': configure_command_line(), 'local_config': read_textfile(options.local_config), diff --git a/src/build-data/os/darwin.txt b/src/build-data/os/darwin.txt index 3c221e0b9..e32a5c4c6 100644 --- a/src/build-data/os/darwin.txt +++ b/src/build-data/os/darwin.txt @@ -1,7 +1,7 @@ -soname_pattern_base "libbotan-{version_major}.dylib" -soname_pattern_abi "libbotan-{version_major}.{abi_rev}.dylib" -soname_pattern_patch "libbotan-{version_major}.{abi_rev}.{version_minor}.{version_patch}.dylib" +soname_pattern_base "lib{libname}.dylib" +soname_pattern_abi "lib{libname}.{abi_rev}.dylib" +soname_pattern_patch "lib{libname}.{abi_rev}.{version_minor}.{version_patch}.dylib" # In order that these executables work from the build directory, # we need to change the install names diff --git a/src/build-data/os/ios.txt b/src/build-data/os/ios.txt index e5729fed8..a5ffab696 100644 --- a/src/build-data/os/ios.txt +++ b/src/build-data/os/ios.txt @@ -1,7 +1,7 @@ -soname_pattern_base "libbotan-{version_major}.{version_minor}.dylib" -soname_pattern_abi "libbotan-{version_major}.{version_minor}.{abi_rev}.dylib" -soname_pattern_patch "libbotan-{version_major}.{version_minor}.{abi_rev}.{version_patch}.dylib" +soname_pattern_base "lib{libname}.{version_minor}.dylib" +soname_pattern_abi "lib{libname}.{version_minor}.{abi_rev}.dylib" +soname_pattern_patch "lib{libname}.{version_minor}.{abi_rev}.{version_patch}.dylib" doc_dir doc diff --git a/src/build-data/os/openbsd.txt b/src/build-data/os/openbsd.txt index 99a3edf79..9c6c8b707 100644 --- a/src/build-data/os/openbsd.txt +++ b/src/build-data/os/openbsd.txt @@ -1,7 +1,7 @@ -soname_pattern_base "libbotan-{version_major}.so" -soname_pattern_abi "libbotan-{version_major}.so.{abi_rev}" -soname_pattern_patch "libbotan-{version_major}.so.{abi_rev}.{version_minor}" +soname_pattern_base "lib{libname}.so" +soname_pattern_abi "lib{libname}.so.{abi_rev}" +soname_pattern_patch "lib{libname}.so.{abi_rev}.{version_minor}" <target_features> posix1 diff --git a/src/build-data/os/windows.txt b/src/build-data/os/windows.txt index 8fb8bc586..500013897 100644 --- a/src/build-data/os/windows.txt +++ b/src/build-data/os/windows.txt @@ -8,7 +8,7 @@ lib_prefix '' # For historical reasons? the library does not have the major number on Windows # This should probably be fixed in a future major release. -library_name 'botan' +library_name 'botan{suffix}' soname_pattern_base "{libname}.dll" diff --git a/src/lib/filters/basefilt.h b/src/lib/filters/basefilt.h index c3a45e28c..922d35669 100644 --- a/src/lib/filters/basefilt.h +++ b/src/lib/filters/basefilt.h @@ -82,7 +82,7 @@ class BOTAN_PUBLIC_API(2,0) Fork : public Fanout_Filter Fork(Filter* filter_arr[], size_t length); }; -#if defined(BOTAN_TARGET_OS_HAS_THREADS) +#if defined(BOTAN_HAS_THREAD_UTILS) /** * This class is a threaded version of the Fork filter. While this uses diff --git a/src/lib/filters/threaded_fork.cpp b/src/lib/filters/threaded_fork.cpp index d379eacda..35ea94109 100644 --- a/src/lib/filters/threaded_fork.cpp +++ b/src/lib/filters/threaded_fork.cpp @@ -8,7 +8,7 @@ #include <botan/basefilt.h> -#if defined(BOTAN_TARGET_OS_HAS_THREADS) +#if defined(BOTAN_HAS_THREAD_UTILS) #include <botan/internal/semaphore.h> #include <botan/internal/barrier.h> diff --git a/src/lib/utils/info.txt b/src/lib/utils/info.txt index 60a10b058..c9b419dcc 100644 --- a/src/lib/utils/info.txt +++ b/src/lib/utils/info.txt @@ -25,7 +25,6 @@ stl_compatibility.h </header:public> <header:internal> -barrier.h bit_ops.h ct_utils.h donna128.h @@ -34,7 +33,6 @@ os_utils.h prefetch.h rounding.h safeint.h -semaphore.h stl_util.h </header:internal> diff --git a/src/lib/utils/barrier.cpp b/src/lib/utils/thread_utils/barrier.cpp index ed3878d18..a5df95101 100644 --- a/src/lib/utils/barrier.cpp +++ b/src/lib/utils/thread_utils/barrier.cpp @@ -7,8 +7,6 @@ #include <botan/internal/barrier.h> -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - namespace Botan { void Barrier::wait(size_t delta) @@ -20,7 +18,7 @@ void Barrier::wait(size_t delta) void Barrier::sync() { std::unique_lock<mutex_type> lock(m_mutex); - + if(m_value > 1) { --m_value; @@ -36,5 +34,3 @@ void Barrier::sync() } } - -#endif diff --git a/src/lib/utils/barrier.h b/src/lib/utils/thread_utils/barrier.h index 943d10b0c..874aa8abd 100644 --- a/src/lib/utils/barrier.h +++ b/src/lib/utils/thread_utils/barrier.h @@ -9,15 +9,10 @@ #define BOTAN_UTIL_BARRIER_H_ #include <botan/mutex.h> - -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - #include <condition_variable> -#endif +#include <condition_variable> namespace Botan { -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - /** Barrier implements a barrier synchronization primitive. wait() will indicate how many threads to synchronize; each thread needing @@ -42,8 +37,6 @@ class Barrier final std::condition_variable m_cond; }; -#endif - } #endif diff --git a/src/lib/utils/thread_utils/info.txt b/src/lib/utils/thread_utils/info.txt new file mode 100644 index 000000000..826a9d734 --- /dev/null +++ b/src/lib/utils/thread_utils/info.txt @@ -0,0 +1,12 @@ +<defines> +THREAD_UTILS -> 20180112 +</defines> + +<header:internal> +barrier.h +semaphore.h +</header:internal> + +<os_features> +threads +</os_features> diff --git a/src/lib/utils/semaphore.cpp b/src/lib/utils/thread_utils/semaphore.cpp index e990ded41..9a7af188a 100644 --- a/src/lib/utils/semaphore.cpp +++ b/src/lib/utils/thread_utils/semaphore.cpp @@ -7,8 +7,6 @@ #include <botan/internal/semaphore.h> -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - // Based on code by Pierre Gaston (http://p9as.blogspot.com/2012/06/c11-semaphores.html) namespace Botan { @@ -38,5 +36,3 @@ void Semaphore::acquire() } } - -#endif diff --git a/src/lib/utils/semaphore.h b/src/lib/utils/thread_utils/semaphore.h index 431680cb3..9db34826a 100644 --- a/src/lib/utils/semaphore.h +++ b/src/lib/utils/thread_utils/semaphore.h @@ -9,14 +9,10 @@ #define BOTAN_SEMAPHORE_H_ #include <botan/mutex.h> - -#if defined(BOTAN_TARGET_OS_HAS_THREADS) - #include <condition_variable> -#endif +#include <condition_variable> namespace Botan { -#if defined(BOTAN_TARGET_OS_HAS_THREADS) class Semaphore final { public: @@ -32,7 +28,6 @@ class Semaphore final mutex_type m_mutex; std::condition_variable m_cond; }; -#endif } diff --git a/src/scripts/website.py b/src/scripts/website.py index 763bfd16e..f80daadc0 100755 --- a/src/scripts/website.py +++ b/src/scripts/website.py @@ -147,6 +147,10 @@ def main(args): for f in ['doc/pgpkey.txt', 'license.txt']: shutil.copy(os.path.join(botan_dir, f), output_dir) + favicon = open(os.path.join(output_dir, 'favicon.ico'), 'w') + # Create an empty favicon.ico file so it gets cached by browsers + favicon.close() + shutil.rmtree(tmp_dir) if __name__ == '__main__': diff --git a/src/tests/test_filters.cpp b/src/tests/test_filters.cpp index 8133e4bc9..ef80e1221 100644 --- a/src/tests/test_filters.cpp +++ b/src/tests/test_filters.cpp @@ -709,7 +709,7 @@ class Filter_Tests final : public Test { Test::Result result("Threaded_Fork"); -#if defined(BOTAN_TARGET_OS_HAS_THREADS) && defined(BOTAN_HAS_CODEC_FILTERS) && defined(BOTAN_HAS_SHA2_32) +#if defined(BOTAN_HAS_THREAD_UTILS) && defined(BOTAN_HAS_CODEC_FILTERS) && defined(BOTAN_HAS_SHA2_32) Botan::Pipe pipe(new Botan::Threaded_Fork(new Botan::Hex_Encoder, new Botan::Base64_Encoder)); result.test_eq("Message count", pipe.message_count(), 0); |