aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
Commit message (Collapse)AuthorAgeFilesLines
* Cast the first argument to msync, munmap, mlock, and munlock to char*lloyd2010-09-071-2/+2
| | | | | to fix compilation on Solaris. Everybody else, including POSIX.1, uses void* here, but as usual Solaris likes to be special.
* Work around Sun Studio multimap insert buglloyd2010-09-031-0/+5
|
* Uglify Data_Store::search_with a little to go through multimap_insertlloyd2010-09-031-1/+7
| | | | to avoid a Sun Studio bug.
* Remove filter/pipe dependency herelloyd2010-09-032-14/+6
|
* Add support for Windows-style dynamic loading with LoadLibrary. Notlloyd2010-08-252-8/+31
| | | | yet tested.
* Workaround problem with GCC 3 - it doesn't like you casting pointerslloyd2010-08-101-0/+4
| | | | | | to pointers-to-functions (which, admittedly, is undefined in ISO C++, but doing this is required to use dlopen). Using the dumb hammer of a C-style cast works, though.
* Also allow clang with 32-bit assembly code, everything seems to worklloyd2010-08-082-0/+19
| | | | fine with latest SVN.
* Clang understands at least some GCC inline asm syntax as well as whatlloyd2010-08-081-0/+1
| | | | an .S file is, so allow it for x86-64. Tested/works with Clang SVN.
* If we can't access cpuid, but we know that we are compiling forlloyd2010-08-081-0/+9
| | | | | | x86-64, then enable SSE2 anyway because we know any x86-64 processor does have SSE2, and the OS has to support it because it's part of the standard ABIs.
* If dynamic loading fails, include result of dlerror() in the exception msglloyd2010-07-301-1/+8
|
* Restrict dyn_load to platforms where it might theoretically work:lloyd2010-07-281-0/+9
| | | | | | | | Linux, Solaris, and the BSDs. Solaris and BSD are untested, but it seems like they should work. Using libdl on Solaris is seemingly only required in Solaris 9 and earlier, but 10 has a stub library so it should work there as well.
* Add a new utility class Dynamically_Loaded_Library which wraps aroundlloyd2010-07-273-0/+122
| | | | | | | | | | the system dynamic linker (if any). Currently it only supports dlopen, and is only enabled on Linux. It will almost certainly work on BSDs and Solaris as well, though, and should be easy to extend to support Win32-style dynamic loading. Also add a new engine, Dynamically_Loaded_Engine, which loads up a new Engine object from a shared library/DLL.
* Oops, bad GCC version check herelloyd2010-07-271-1/+1
|
* Add support in CPUID for detecting PCMULUDQ and MOVBE instructions.lloyd2010-07-271-4/+18
| | | | Rename CPUID::has_aes_intel to has_aes_ni.
* Add support for GCC's byteswap builtins. They were added in 4.3 andlloyd2010-07-271-4/+29
| | | | | | work for 32 and 64 bit integers. Using these instead of inline asm may offer better scheduling on x86, and additionally offers native byteswapping on other platforms (PPC, ARM, etc).
* Modify CPUID so all the check functions are purely inline. Add a newlloyd2010-07-262-47/+25
| | | | | initialize() call which must be called prior to use of any other functions.
* Consolidate the two engines that provided assembler implementationslloyd2010-07-132-2/+2
| | | | | | (amd64_eng and ia32_eng) into a new asm_engine. This same engine could also be used in the event that asm code for other CPUs was added later on.
* Make round_up and round_down templates instead of fixed to use u32bitslloyd2010-06-291-6/+14
|
* Simplify feature checkslloyd2010-06-281-7/+12
|
* Add detection support for upcoming AVXlloyd2010-06-251-1/+8
|
* Doxygenlloyd2010-06-221-6/+35
|
* Doxygenlloyd2010-06-211-6/+217
|
* Doxygenlloyd2010-06-214-13/+41
|
* Doxygenlloyd2010-06-211-9/+9
|
* Doxygenlloyd2010-06-211-0/+20
|
* Add a simple comment for the Botan namespace decl in types.h. Thislloyd2010-06-211-0/+3
| | | | | triggers Doxygen generating warnings for global functions declared in the namespace that aren't documented.
* merge of '3632315d498b1223cca850051518f7a3273f5449'lloyd2010-06-163-9/+33
|\ | | | | | | and '5c9cdb3b727e7336f0a18f72e6ca2eb7460d31ec'
| * Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-162-6/+6
| |
| * More Doxygenlloyd2010-06-162-1/+14
| |
| * Yet more Doxygen commentslloyd2010-06-161-2/+13
| |
* | Remove some of the more extraneous namespaceslloyd2010-06-161-6/+2
|/
* More Doxygen updates/fixeslloyd2010-06-156-21/+32
|
* Fix a few hundred Doxygen warningslloyd2010-06-151-1/+1
|
* Expose a datestamp in build.h, provide function in version.h forlloyd2010-06-142-0/+10
| | | | getting runtime value.
* Use "/*" instead of "/**" in starting comments at the begining of a file.lloyd2010-06-0711-11/+11
| | | | | This caused Doxygen to think this was markup meant for it, which really caused some clutter in the namespace page.
* Add a build.h macro BOTAN_GCC_VERSION which is set to major*100+minor*10+patchlloyd2010-05-131-2/+3
| | | | | | | | if we are compiling under GCC, or 0 otherwise. Use it in cpuid.cpp for use of GCC's cpuid.h header file. If we don't have a method of calling cpuid, print a warning.
* Avoid trying to use GCC's cpuid.h in versions where it doesn't existlloyd2010-05-061-1/+3
| | | | | (before 4.3). Probably will need to write asm blocks for those older versions.
* Remove some C-style castslloyd2010-04-231-2/+2
|
* At startup, test if lock_mem() at least seems to work. If it doesn't,lloyd2010-03-132-0/+14
| | | | | immediately fall back the the plain malloc-based allocator, which is typically quite a bit faster.
* Add back the Integrity_Failure exception. For one, removing it causeslloyd2010-03-041-0/+9
| | | | | problems for Monotone, and anyway it is a reasonable exception to have around for signalling MAC validation errors, etc.
* Fix stupid typolloyd2010-03-031-1/+1
|
* Pass the args to SIMD_32 variant of rotate_left/rotate_right as constlloyd2010-03-031-6/+6
| | | | | reference. Otherwise Visual C++ dies because apparently the Win32 ABI doesn't know how to pass a __m128i as a function parameter. :/
* Use static_cast if using std::time-based get_nanoseconds_clock to makelloyd2010-03-031-2/+6
| | | | | | it obvious that truncation is occuring. Something to deal with in 2038 I guess, though get_nanoseconds_clock is already an unknown/unspecified epoch (since the Windows timer uses 1/1/1601 as the epoch)
* Switch back to stdio.h-based debug funcs, iostreams was broken and sillylloyd2010-02-141-11/+8
|
* Call global functions with :: prefixlloyd2010-02-141-4/+4
|
* Move the get_byte template to its own header, because many fileslloyd2010-02-025-12/+31
| | | | including loadstor.h actually just needed get_byte and nothing else.
* Inline debug funcs to debug.h, make print_vec a template on the base typelloyd2010-01-213-38/+15
|
* Add operator& and non-mutating rotates to SIMD_32lloyd2010-01-124-0/+34
|
* merge of 'bf0e5684d8ba5fb0a21cdcd11d26995cbb250c4a'lloyd2010-01-072-67/+18
|\ | | | | | | and 'e30a741f6014987e9683842ede22c44b2db03c56'
| * Clean up exceptions. Remove some unused ones like Config_Error. Makelloyd2010-01-052-67/+18
| | | | | | | | | | | | | | Invalid_Argument just a typedef for std::invalid_argument. Make Botan::Exception a typedef for std::runtime_error. Make Memory_Exhaustion a public exception, and use it in other places where memory allocations can fail.