Commit Graph

17 Commits

Author SHA1 Message Date
Lucas De Marchi
d96ca9c429 Use C11's noreturn
Also define noreturn w/o <stdnoreturn.h> and move it to macro.h instead
of in the testsuite.

Based on similar commit on systemd by Shawn Landden
<shawn@churchofgit.com>.
2013-12-17 19:10:16 -02:00
Lucas De Marchi
d7aa6e23fc util: Add cleanup attribute 2013-11-18 04:35:04 -02:00
Lucas De Marchi
4c2dc16a2e build: remove check for typeof
It's used in so many places without checking, that's really pointless to
check for it in macro.h.

Also remove AC_C_TYPEOF from configure.ac since we don't use -ansi.
2013-09-06 11:31:35 -03:00
Thomas Petazzoni
dc8ed09f8f Add configure check for _Static_assert()
Commit 8efede20ef ("Use _Static_assert") introduced the usage of
_Static_assert(). However, _Static_assert() is a fairly new thing,
since it was introduced only in gcc 4.6. In order to support older
compilers, this patch adds a configure.in test that checks whether
_Static_assert() is usable or not, and adjust the behavior of the
assert_cc() macro accordingly.
2013-09-06 11:06:19 -03:00
Lucas De Marchi
8efede20ef Use _Static_assert
Both GCC and clang already supports C11's _Static_assert, so use it
instead of defining our own macro.
2013-04-15 14:09:05 -03:00
Lucas De Marchi
e6b0e49b4e Update copyright notices 2013-01-16 11:27:45 -02:00
Lucas De Marchi
e8fd8fec23 Use #pragma once instead of #ifndef
Only the public header maintains #ifndef in the header, together with
pragma. The other ones contain only pragma.

As reported by Shawn Landden on systemd mailing list this is compatible
with all major compilers and gcc has this since version 3.3.
2012-07-18 10:31:50 -03:00
Lucas De Marchi
9e2eadb1d7 Silence clang warnings with __unused__ attribute
I hate this kind of READV and WRITEV macros that Gustavo seems to love.
clang-analyzer hates them as well.

I'm not motivated enough to refactor this, but I want a clean clang
report, so just shut it up.
2012-05-23 20:31:18 -03:00
Lucas De Marchi
a70c1e774e Don't use __ for attribute defines
System headers use __, don't mess with them.
2012-05-23 20:27:23 -03:00
Lucas De Marchi
f4cc6ea5eb doc: fix comments format 2012-01-09 03:29:29 -02:00
Lucas De Marchi
a66a6a999f Update copyright 2012-01-09 00:41:07 -02:00
Lucas De Marchi
cb451f35d9 Change licenses
libkmod is under LGPL 2.1 or later
tools/* are under GPL
2011-12-12 18:24:35 -02:00
Lucas De Marchi
a507d803b4 Define temporary macros for importing index 2011-11-30 14:35:39 -02:00
Lucas De Marchi
aa1c3521de Add macro to safely derive the size of an array 2011-11-29 17:59:58 -02:00
Lucas De Marchi
191ab4b9e0 Fix wrong copyright
I'm the author, not the copyright owner.
2011-11-28 16:59:06 -02:00
Lucas De Marchi
8f788d58c3 Add functions to operate on modules 2011-11-25 01:22:56 -02:00
Lucas De Marchi
88e9c12e4e Rename libkmod-util.h to macro.h 2011-11-23 16:08:04 -02:00