mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
0d9bb86293
This makes cross-compiling happy, use a trick similar to autoconf's AC_CHECK_SIZEOF macro. Basically we make an array: static int array[1 - 2 * !(((long int)(sizeof(off_t))) < 8)]; This gives -1 multiplied by the negation of the condition (sizeof(off_t) < 8) cast to a long int. So if the condition is true it gives array[(-1 * 0)] (remember the condition is cast and negated) thus passing a build test with a 0-sized array. If it's false it gives array[(-1 * 1)] thus failing with a negative-sized array. Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Tue Feb 18 23:18:32 CET 2014 on sn-devel-104 |
||
---|---|---|
.. | ||
array_size | ||
asearch | ||
build_assert | ||
cast | ||
check_type | ||
compiler | ||
container_of | ||
endian | ||
err | ||
failtest | ||
hash | ||
htable | ||
ilog | ||
likely | ||
list | ||
read_write_all | ||
str | ||
strset/tools | ||
tally | ||
tcon | ||
time | ||
tlist | ||
typesafe_cb | ||
README | ||
wscript |
These files are from the CCAN project (http://ccan.ozlabs.org); the _info and LICENSE files in each directory indicate their (separate) licenses. I'm trying to keep them in sync with the upstream versions as much as possible, so please be careful! Thanks! Rusty Russell <rusty@rustcorp.com.au>