From: Ben Pfaff Date: Fri, 13 Dec 2013 17:54:55 +0000 (-0800) Subject: string: Use workaround for #include_next when it is not available. X-Git-Tag: sliver-openvswitch-2.1.90-1~10^2~176 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4e8575089d92a4408e4e9b1224aedb19b0f87ccd;p=sliver-openvswitch.git string: Use workaround for #include_next when it is not available. Signed-off-by: Ben Pfaff --- diff --git a/configure.ac b/configure.ac index 96880af69..05b7082ab 100644 --- a/configure.ac +++ b/configure.ac @@ -91,6 +91,9 @@ OVS_CHECK_ATOMIC_ALWAYS_LOCK_FREE(8) OVS_CHECK_POSIX_AIO OVS_CHECK_PTHREAD_SET_NAME +OVS_CHECK_INCLUDE_NEXT([string.h]) +AC_CONFIG_FILES([lib/string.h]) + OVS_ENABLE_OPTION([-Wall]) OVS_ENABLE_OPTION([-Wextra]) OVS_ENABLE_OPTION([-Wno-sign-compare]) diff --git a/lib/.gitignore b/lib/.gitignore index 31346e4b7..03706dec2 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -5,6 +5,7 @@ /coverage-counters.c /ofp-errors.inc /ofp-msgs.inc +/string.h /vswitch-idl.c /vswitch-idl.h /vswitch-idl.ovsidl diff --git a/lib/automake.mk b/lib/automake.mk index ea1e1fbd2..a8edfc39f 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -194,7 +194,6 @@ lib_libopenvswitch_a_SOURCES = \ lib/stream.c \ lib/stream.h \ lib/string.c \ - lib/string.h \ lib/svec.c \ lib/svec.h \ lib/table.c \ @@ -232,6 +231,7 @@ lib_libopenvswitch_a_SOURCES = \ lib/vswitch-idl.h \ lib/vtep-idl.c \ lib/vtep-idl.h +EXTRA_DIST += lib/string.h.in nodist_lib_libopenvswitch_a_SOURCES = \ lib/dirs.c diff --git a/lib/string.h b/lib/string.h.in similarity index 93% rename from lib/string.h rename to lib/string.h.in index 2b7b454f6..6e2c2baaf 100644 --- a/lib/string.h +++ b/lib/string.h.in @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2011 Nicira, Inc. + * Copyright (c) 2009, 2011, 2013 Nicira, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,7 +17,7 @@ #ifndef STRING_WRAPPER_H #define STRING_WRAPPER_H 1 -#include_next +#@INCLUDE_NEXT@ @NEXT_STRING_H@ /* Glibc 2.7 has a bug in strtok_r when compiling with optimization that can * cause segfaults if the delimiters argument is a compile-time constant that