blob: b38cf7829c9fd2620826533afbb6d480de533662 [file] [log] [blame]
--- a/ustr-conf.h.in 2007-10-22 08:00:55.000000000 +0200
+++ b/ustr-conf.h.in 2015-09-10 12:24:34.998796842 +0200
@@ -4,13 +4,23 @@
/* this is the custom version for the library itself, for everyone else
* ustr-import generates one depending on the options. */
+/* Ustr relies on GCC's traditional handling of inline functions, not
+ * the version that was actually standardized in C99. GCC-compatible
+ * compilers define __GNUC_STDC_INLINE__ when using the standard
+ * behavior. When this is set we must restore the old inline behavior:
+ */
+#if defined(__GNUC__) \
+ && defined(__GNUC_STDC_INLINE__)
+# define inline inline __attribute__ ((gnu_inline))
+#endif
+
/* The default is now to link against libc. */
#ifndef USTR_CONF_INCLUDE_CODEONLY_HEADERS
#define USTR_CONF_INCLUDE_CODEONLY_HEADERS 0
#endif
/* We can't: if defined(__GLIBC__) && (!defined(_GNU_SOURCE) || !_GNU_SOURCE)
- * because by the time we've included a libc header it's too late. */
+ * because by the time we've included a libc header it's too late. */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE 1
#endif