kumquat-buildroot/package/argp-standalone/0003-fix_build_with_c99_compilers.patch
Matt Weber f0b65bd90c argp-standalone: fix build with gcc 7.x
Back in commit a662ff7e79
("package/argp-standalone: Fix build with c99 compilers"), we fixed
the build of argp-standalone with compilers defaulting to C99 inline
semantics, i.e starting from gcc 5.x.

This was done as part of a patch that used "inline" instead of "extern
inline". However, using "inline" once again broke the build with gcc
7.x. To fix this, revert back to using just "extern inline" (hence
removing a patch of patch 0003-fix_build_with_c99_compilers.patch) and
instead use -fgnu89-inline in the CFLAGS.

See https://gcc.gnu.org/gcc-5/porting_to.html for more details.

Fixes:

  http://autobuild.buildroot.net/results/a9cedc54829b7bd2dd7ae6ff2bd6c6db242f1c35/

Signed-off-by: Matthew Weber <matthew.weber@rockwellcollins.com>
[Thomas: also drop the patch of
0003-fix_build_with_c99_compilers.patch that is no longer needed.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2017-11-01 15:51:25 +01:00

69 lines
2.4 KiB
Diff
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From b2dfa011a3fdcb7d22764d143517d0fbd1c2a201 Mon Sep 17 00:00:00 2001
From: Emmanuel Dreyfus <manu@netbsd.org>
Date: Wed, 22 Jan 2014 14:47:23 +0100
Subject: [PATCH] Fix build with c99 compilers
BUG: 764655
Change-Id: If5dfdc9c7427bd3d39d8da8f79e33ae2da6a3137
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/6034
Reviewed-by: Harshavardhana <harsha@harshavardhana.net>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
---
diff --git a/argp-fmtstream.c b/argp-fmtstream.c
index 7f79285..494b6b3 100644
--- a/argp-fmtstream.c
+++ b/argp-fmtstream.c
@@ -389,6 +389,7 @@
weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
#endif
+#if __STDC_VERSION__ - 199900L < 1
/* Duplicate the inline definitions in argp-fmtstream.h, for compilers
* that don't do inlining. */
size_t
@@ -471,5 +472,6 @@
__argp_fmtstream_update (__fs);
return __fs->point_col >= 0 ? __fs->point_col : 0;
}
+#endif /* __STDC_VERSION__ - 199900L < 1 */
#endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
diff --git a/argp-fmtstream.h b/argp-fmtstream.h
index e797b11..828f435 100644
--- a/argp-fmtstream.h
+++ b/argp-fmtstream.h
@@ -153,6 +153,7 @@
__const char *__fmt, ...)
PRINTF_STYLE(2,3);
+#if __STDC_VERSION__ - 199900L < 1
extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
@@ -163,6 +164,7 @@
__const char *__str, size_t __len);
extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
__const char *__str, size_t __len);
+#endif /* __STDC_VERSION__ - 199900L < 1 */
/* Access macros for various bits of state. */
#define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
@@ -172,6 +174,7 @@
#define __argp_fmtstream_rmargin argp_fmtstream_rmargin
#define __argp_fmtstream_wmargin argp_fmtstream_wmargin
+#if __STDC_VERSION__ - 199900L < 1
/* Set __FS's left margin to LMARGIN and return the old value. */
extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
size_t __lmargin);
@@ -193,6 +196,7 @@
/* Return the column number of the current output point in __FS. */
extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
+#endif /* __STDC_VERSION__ - 199900L < 1 */
/* Internal routines. */
extern void _argp_fmtstream_update (argp_fmtstream_t __fs);