diff options
author | Dave Beckett <dave@dajobe.org> | 2017-01-08 17:01:08 -0800 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2017-01-08 18:35:45 -0800 |
commit | d27769828520c941cd9d9d91a48bbf1fbe682bb0 (patch) | |
tree | be58e1abe4bca88f8b23d5806274a82129319029 /src/raptor_rdfxml.c | |
parent | 5e8de6d47992f85df44c754b3594af0e21a31496 (diff) | |
download | raptor-d27769828520c941cd9d9d91a48bbf1fbe682bb0.tar.gz |
Portability fixes for C11 and newer clang
Fix some RAPTOR_ASSERT_DIE() calls to have an arg value.
Add strdup.c for when it is missing and a configure check.
Write special configure.ac checks for strdup and strtok_r to work (ie fail)
when there functions are not defined in headers.
Update compiler warning arguments:
* Add -std=c11 so it'll try to use C11 if available
* Add -Wstrict-overflow
* Add -Wpedantic
* Remove -Wno-conversion -Wno-sign-conversion that are no longer warning
For clang (OSX) always add -Wno-nullability-completeness since even
stdio.h fails this.
Remove duplicate functions in AC_CHECK_FUNCS that AC_HEADER_STDC already
calls.
Move maintainer mode warning flags very early so they get picked up by
tests.
Diffstat (limited to 'src/raptor_rdfxml.c')
-rw-r--r-- | src/raptor_rdfxml.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/raptor_rdfxml.c b/src/raptor_rdfxml.c index d1e4bb57..ce9f3931 100644 --- a/src/raptor_rdfxml.c +++ b/src/raptor_rdfxml.c @@ -29,6 +29,9 @@ #include <stdio.h> #include <string.h> +#ifdef HAVE_STRINGS_H +#include <strings.h> +#endif #include <ctype.h> #include <stdarg.h> #ifdef HAVE_ERRNO_H |