1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/lib/ccan
Gustavo Zacarias 0d9bb86293 build: find FILE_OFFSET_BITS via array
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
2014-02-18 23:18:32 +01:00
..
array_size lib/ccan/array_size: relicense under public domain. 2011-12-05 16:42:40 +10:30
asearch lib/ccan/asearch: fix example on 64 bit platforms. 2011-12-05 16:42:49 +10:30
build_assert lib/ccan/build_assert: Remove stale LGPL license comment. 2011-12-05 16:42:43 +10:30
cast cast: make sure suncc sees a constant. 2012-03-29 08:18:57 +02:00
check_type lib/ccan: import failtest and required ccan modules for TDB2 unit tests. 2012-03-07 13:16:16 +11:00
compiler lib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means" 2011-12-05 16:42:50 +10:30
container_of lib/ccan: import failtest and required ccan modules for TDB2 unit tests. 2012-03-07 13:16:16 +11:00
endian lib/ccan: update to init-1192-gdd04041 2011-07-25 12:03:40 +02:00
err ccan: import err module.from ccan revision 5add556a1cb64b49a664506aa76216d885b22c97 2012-06-09 15:41:18 +09:30
failtest ccan: Cast getpid() result to unsigned int for GNU/Solaris build 2013-03-15 10:37:53 -07:00
hash lib: import ccan modules for tdb2 2011-06-20 11:18:34 +02:00
htable lib/ccan/htable: benchmark against hsearch(3) 2011-12-05 16:42:49 +10:30
ilog lib/ccan/compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means" 2011-12-05 16:42:50 +10:30
likely lib/ccan/likely: use htable_type 2011-12-05 16:42:48 +10:30
list lib/ccan: namespacize ccan/list to avoid conflict with OpenIndiana's sys/list.h 2012-03-22 01:57:37 +01:00
read_write_all lib/ccan: import failtest and required ccan modules for TDB2 unit tests. 2012-03-07 13:16:16 +11:00
str lib/ccan/str: fix warnings. 2011-12-05 16:42:46 +10:30
strset/tools lib/ccan/htable, strset: benchmarking tools. 2011-12-05 16:42:46 +10:30
tally ccan: Fix calling memset with zero length parameter 2013-07-11 16:55:48 +02:00
tcon lib/ccan: import failtest and required ccan modules for TDB2 unit tests. 2012-03-07 13:16:16 +11:00
time lib/ccan: import failtest and required ccan modules for TDB2 unit tests. 2012-03-07 13:16:16 +11:00
tlist lib/ccan: namespacize ccan/list to avoid conflict with OpenIndiana's sys/list.h 2012-03-22 01:57:37 +01:00
typesafe_cb lib/ccan/typesafe_cb: fix example macro ordering in typesafe_cb_preargs documentation. 2011-12-05 16:42:45 +10:30
README lib/ccan: add README 2011-07-25 18:07:11 +09:30
wscript build: find FILE_OFFSET_BITS via array 2014-02-18 23:18:32 +01:00

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>