summaryrefslogtreecommitdiff
path: root/ccan/compiler
AgeCommit message (Collapse)Author
2014-06-21compiler: avoid barfing when config.h & the current -std= mode mismatchCody P Schafer
Add a bunch of __ for all the attribute members. Lets us keep working even if configurator is called with different CFLAGS than the build of a file which includes compiler.h Idealy, we (people using ccan) wouldn't let this happen, however I don't see any reason /not/ to avoid build breakage in the above case. Long term, it might make sense to plug some logic into configurator's config.h (or a cc wrapper, so something else) to warn when the current flags don't look the same as the ones used to generate config.h CC: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Cody P Schafer <dev@codyps.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-06-21compiler: Add PURE_FUNCTIONCody P Schafer
CC: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Cody P Schafer <dev@codyps.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2014-06-16ccan: Correct some poor conventions in _info includesDavid Gibson
There are a couple of small problems with the includes used in most of ccan's _info files. * _info routinely uses printf(), and so should include <stdio.h>, but only some of them do. We get away with it, because they do include <string.h>, which apparently includes <stdio.h> indirectly, but we should be explicit about it. * Most _info files were including config.h after the system headers. That _seems_ sensible, but actually causes problems. Because config.h defines _GNU_SOURCE it can change the behaviour of the system headers. More specifically it can make them behave differently to how the individual module headers (which have included config.h) expects them to behave. This patch adjusts all the existing _info files and, more importantly, the template constructed by ccanlint. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2012-11-01Relicense all public domain modules to CC0.Rusty Russell
I wrote all of most of them, for the others, here's the CCAN mailing list thread authorizing it: From: Timothy B. Terriberry <tterribe@xiph.org> Subject: Re: [ccan] Changing from Public Domain to CC0 To: Rusty Russell <rusty@rustcorp.com.au> Cc: ccan@ozlabs.org Date: Wed, 31 Oct 2012 02:53:50 -0400 Rusty Russell <rusty@rustcorp.com.au> wrote: > I want to change the License string (and add a symlink) to the following > trivial modules. Please Ack. > isaac Ack. From: Alessandro Guido <ag@alessandroguido.name> Subject: Re: Changing from Public Domain to CC0 To: Rusty Russell <rusty@rustcorp.com.au> Date: Wed, 31 Oct 2012 10:59:53 +0100 Acked-by: Alessandro Guido <ag@alessandroguido.name> From: Brad Hards <bradh@frogmouth.net> Subject: Re: Changing from Public Domain to CC0 To: Rusty Russell <rusty@rustcorp.com.au> Cc: Joey Adams <joeyadams3.14159@gmail.com>, Alessandro Guido <ag@alessandroguido.name>, Andreas Schlick <schlick@lavabit.com>, ccan@ozlabs.org Date: Wed, 31 Oct 2012 23:43:24 +1100 On 31/10/12 17:43, Rusty Russell wrote: > Damn lawyers! > > Since Public Domain is a slippery concept outside certain countries, it > has been suggested that I formalize it to Creative Commons Zero. > > I want to change the License string (and add a symlink) to the following > trivial modules. Please Ack. Ack. More generally, anything I've put into CCAN is so trivial that you can relicense it (to any Free / Open Source license) as part of any relicensing you can otherwise get agreement to. Brad [Sorry if this comes out in HTML - I'm stuck with unsat tools while travelling]. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2011-10-26compiler, ilog: IDEMPOTENT "idempotent does not mean what you think it means"Rusty Russell
Actually, I don't even think it means that. But rename it to something which is sane. Thanks to David Gibson for reporting.
2011-07-21compiler: relicense to public domain.Rusty Russell
We really want everyone to be using these; establishing conventions helps all code, so make it the most liberal license possible. It's all my code, so I can do this unilaterally.
2011-07-19various: make the _info License: wording uniform for GPL variants.Rusty Russell
GPL versions 2 and 3 both specifically mention "any later version" as the phrase which allows the user to choose to upgrade the license. Make sure we use that phrase, and make the format consistent across modules.
2011-04-28compiler: don't override existing definitions.Rusty Russell
It's common when integrating CCAN into existing projects that they define such constants for themselves. In an ideal world, the entire project switches to one set of definitions, but for large projects (eg SAMBA) that's not realistic and conflicts with the aim of making CCAN modules easy to "drop in" to existing code. (This is a generalization of Douglas Bagnell's patch sent in Message-ID: <4DB8D00D.8000800@paradise.net.nz>).
2011-03-22compiler: fix -Wwrite-strings warning in example.Rusty Russell
2011-03-01compiler, talloc, tap, tdb2: use #if instead of #ifdef.Rusty Russell
2011-01-04compiler: NORETURNRusty Russell
2010-11-10compiler: shorten names of attributes, add UNUSEDRusty Russell
The long names were unwieldy in practice; at risk of clashing, replace with shorter versions.
2010-10-21license: more changing of licence -> license.Rusty Russell
2010-10-17licence->license: US English is the standard for code.Rusty Russell
If a Swedish-speaking Finn writes code in English, why should I complain about a few weird spellings?
2010-10-07compiler, list, noerr, sparse_bsearch, str, str_talloc, stringmap, ↵Rusty Russell
talloc_link, tdb, tdb2, typesafe_cb: fix examples Phew, now they call compile!
2010-10-07compiler, talloc: warn if return from realloc-like functions isn't used.Rusty Russell
This hit my doc extraction tool, so fix it!
2010-10-07modules: update documentation examples so they compile under ccanlint.Rusty Russell
This is everything up to the list module... now it's time for sleep.
2010-09-26compiler: use everywhere.Rusty Russell
This includes renaming ATTRIBUTE_UNLIKELY_FUNCTION to ATTRIBUTE_COLD, and removing unlikely_func macro from ccan/likely.
2010-09-26compiler: header for compiler-specific wrappers.Rusty Russell
Currently they sit in each module.