xref: /OK3568_Linux_fs/buildroot/package/argp-standalone/0003-fix_build_with_c99_compilers.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunFrom b2dfa011a3fdcb7d22764d143517d0fbd1c2a201 Mon Sep 17 00:00:00 2001
2*4882a593SmuzhiyunFrom: Emmanuel Dreyfus <manu@netbsd.org>
3*4882a593SmuzhiyunDate: Wed, 22 Jan 2014 14:47:23 +0100
4*4882a593SmuzhiyunSubject: [PATCH] Fix build with c99 compilers
5*4882a593Smuzhiyun
6*4882a593SmuzhiyunBUG: 764655
7*4882a593SmuzhiyunChange-Id: If5dfdc9c7427bd3d39d8da8f79e33ae2da6a3137
8*4882a593SmuzhiyunSigned-off-by: Emmanuel Dreyfus <manu@netbsd.org>
9*4882a593SmuzhiyunReviewed-on: http://review.gluster.org/6034
10*4882a593SmuzhiyunReviewed-by: Harshavardhana <harsha@harshavardhana.net>
11*4882a593SmuzhiyunTested-by: Gluster Build System <jenkins@build.gluster.com>
12*4882a593Smuzhiyun---
13*4882a593Smuzhiyun
14*4882a593Smuzhiyundiff --git a/argp-fmtstream.c b/argp-fmtstream.c
15*4882a593Smuzhiyunindex 7f79285..494b6b3 100644
16*4882a593Smuzhiyun--- a/argp-fmtstream.c
17*4882a593Smuzhiyun+++ b/argp-fmtstream.c
18*4882a593Smuzhiyun@@ -389,6 +389,7 @@
19*4882a593Smuzhiyun weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf)
20*4882a593Smuzhiyun #endif
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun+#if __STDC_VERSION__ - 199900L < 1
23*4882a593Smuzhiyun /* Duplicate the inline definitions in argp-fmtstream.h, for compilers
24*4882a593Smuzhiyun  * that don't do inlining. */
25*4882a593Smuzhiyun size_t
26*4882a593Smuzhiyun@@ -471,5 +472,6 @@
27*4882a593Smuzhiyun     __argp_fmtstream_update (__fs);
28*4882a593Smuzhiyun   return __fs->point_col >= 0 ? __fs->point_col : 0;
29*4882a593Smuzhiyun }
30*4882a593Smuzhiyun+#endif /* __STDC_VERSION__ - 199900L < 1 */
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */
33*4882a593Smuzhiyundiff --git a/argp-fmtstream.h b/argp-fmtstream.h
34*4882a593Smuzhiyunindex e797b11..828f435 100644
35*4882a593Smuzhiyun--- a/argp-fmtstream.h
36*4882a593Smuzhiyun+++ b/argp-fmtstream.h
37*4882a593Smuzhiyun@@ -153,6 +153,7 @@
38*4882a593Smuzhiyun 				      __const char *__fmt, ...)
39*4882a593Smuzhiyun      PRINTF_STYLE(2,3);
40*4882a593Smuzhiyun
41*4882a593Smuzhiyun+#if __STDC_VERSION__ - 199900L < 1
42*4882a593Smuzhiyun extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
43*4882a593Smuzhiyun extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch);
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun@@ -163,6 +164,7 @@
46*4882a593Smuzhiyun 				      __const char *__str, size_t __len);
47*4882a593Smuzhiyun extern size_t argp_fmtstream_write (argp_fmtstream_t __fs,
48*4882a593Smuzhiyun 				    __const char *__str, size_t __len);
49*4882a593Smuzhiyun+#endif /* __STDC_VERSION__ - 199900L < 1 */
50*4882a593Smuzhiyun
51*4882a593Smuzhiyun /* Access macros for various bits of state.  */
52*4882a593Smuzhiyun #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin)
53*4882a593Smuzhiyun@@ -172,6 +174,7 @@
54*4882a593Smuzhiyun #define __argp_fmtstream_rmargin argp_fmtstream_rmargin
55*4882a593Smuzhiyun #define __argp_fmtstream_wmargin argp_fmtstream_wmargin
56*4882a593Smuzhiyun
57*4882a593Smuzhiyun+#if __STDC_VERSION__ - 199900L < 1
58*4882a593Smuzhiyun /* Set __FS's left margin to LMARGIN and return the old value.  */
59*4882a593Smuzhiyun extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs,
60*4882a593Smuzhiyun 					  size_t __lmargin);
61*4882a593Smuzhiyun@@ -193,6 +196,7 @@
62*4882a593Smuzhiyun /* Return the column number of the current output point in __FS.  */
63*4882a593Smuzhiyun extern size_t argp_fmtstream_point (argp_fmtstream_t __fs);
64*4882a593Smuzhiyun extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs);
65*4882a593Smuzhiyun+#endif /* __STDC_VERSION__ - 199900L < 1 */
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun /* Internal routines.  */
68*4882a593Smuzhiyun extern void _argp_fmtstream_update (argp_fmtstream_t __fs);
69