Fixed some cppclean complaints
build: NetBSD has bswap(16|32|64) in libc, so we should avoid redefining them.
Runtime [NT]: Fixed reversed bit fiddling on NT.
Fixes "Fatal error: WaitForSingleObject((*(& thread_table_lock)),
0xFFFFFFFF) == ((((DWORD )0x00000000L) ) + 0 ) Unexpected error from
thread function: 6" at startup, which was due to the thread_table_lock
mutex not yet having been initialized by low_th_init(), when an out of
memory error was attempted to be thrown at startup due to not being
able to allocate a huge mapping_data, due to find_next_power() being
broken by this bug.
New byte buffer
This new byte buffer implements a simple dynamic buffer. It aims to
* Provide a clean API.
* Convince the compiler to generate good code. In particular it tries
to avoid unnecessary loads and stores which are otherwise generated
due to the C aliasing rules. This is done using the STATIC_ASSUME(X)
macro, which declare !X as unreachable.
* Have the fast path (when the buffer has enough space) completely
inlined to allow the compiler to batch single byte writes to the
buffer into larger stores.
Build [NT]: Fixed syntax error.
Siphash24: added byte order independent versions for wide strings
This commits adds two versions of siphash for both 16 and 32 bit wide
strings. They are identical to the 8bit version on little endian
The different siphash versions are now also available dynamic modules.
unsigned INT64 -> UINT64
Everyone have INT64 in C99-land.
inline is part of c99
We do have.. excessive amounts of inline, incidentally. :)
Stdio.Buffer: use round_up*() functions to enlarge buffer.
Fixes an infinity loop due to overflow. Also changed the round_up*() functions
to return 0 on overflow and made 1 the next power of two after 0.
Build: Support compilation with compilers other than gcc again.
Replaced all uses of __attribute__((unused)) with PIKE_ATTRIBUTE_UNUSED.
SipHash24: added byte order independent versions for wide strings
- the current siphash version does not know about wide strings, so
the hash value for wide strings depends on the byte order. added
versions for both 16 and 32 bit wide chars
- also replaced the manual little endian reading routines by the
get_unaligned_le64 macros, which generate much shorter code for
- added siphash24_pike_string which will generate a byte order
independent hash value
- use siphash24_pike_string in ADT.Bloom.String
add popcount32 and popcount64
windows: calculate trailing/leading zeros (more) correctly.
build: help build on Windows
Build: Reduce complaint about unused functions.
We don't care if inline functions defined in the header files aren't
used in all files that include them...
Reduces the number of build warnings to reasonable levels.
set_unaligned_*: forgot argument
bitvector.h: dead code removal, some optimizations
some portable helpers for unaligned memory access
unlike manually shifted bytes, memset() gets optimized to one
load/store on x86.
Merge branch '8.0' into gobject-introspection
Merge remote-tracking branch 'origin/7.9' into pdf
Added new block allocator. It dramatically speeds up free, when
allocating many blocks and deallocation happens non linearly.
new block alloc
removed extra ##
check for non-temporal store builtins
use main config.h
moved to main dir