1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-27 03:21:53 +03:00
samba-mirror/lib/ccan
Rusty Russell f74ae3257a cast: make sure suncc sees a constant.
cast_const() et. al. are supposed to be a constant expression, so you can do things like:
	static char *p = cast_const(char *, (const char *)"hello");

Unfortunately, a cast to intptr_t and arithmetic makes suncc reject it as
a constant expression.  We need the cast, because (1) the expression could be
a void *, so we can't just add to it, and (2) gcc complains with -Wcast-qual
without it.

So instead of adding BUILD_BUG_OR_ZERO, we use a ? :, which keeps everyone happy.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
(Imported from CCAN commit 74859ab18b10aaf990848e49d7789ff5c6cf96c6)

Autobuild-User: Rusty Russell <rusty@rustcorp.com.au>
Autobuild-Date: Thu Mar 29 08:18:57 CEST 2012 on sn-devel-104
2012-03-29 08:18:57 +02: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
failtest lib/ccan/failtest: compile fix for OpenBSD 2012-03-22 01:57:37 +01: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 Adapt tally_histogram to Samba coding conventions 2011-08-10 21:12:59 +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
libccan.m4 lib/ccan: Fix some typos in libccan.m4 2011-12-15 07:40:33 +01:00
README lib/ccan: add README 2011-07-25 18:07:11 +09:30
wscript lib/ccan: define HAVE_CCAN. 2012-02-21 15:29:06 +10:30

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>