[rtems commit] shell: Fix warnings

Sebastian Huber sebh at rtems.org
Wed Feb 15 12:06:25 UTC 2017


Module:    rtems
Branch:    master
Commit:    661be207776e84acbfce438347bce7c34dfabadf
Changeset: http://git.rtems.org/rtems/commit/?id=661be207776e84acbfce438347bce7c34dfabadf

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Wed Feb 15 13:05:27 2017 +0100

shell: Fix warnings

---

 cpukit/libmisc/shell/hexdump-conv.c     | 5 ++++-
 cpukit/libmisc/shell/hexdump-odsyntax.c | 7 ++++---
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/cpukit/libmisc/shell/hexdump-conv.c b/cpukit/libmisc/shell/hexdump-conv.c
index a157aae..d37c6d9 100644
--- a/cpukit/libmisc/shell/hexdump-conv.c
+++ b/cpukit/libmisc/shell/hexdump-conv.c
@@ -39,7 +39,10 @@
 #ifndef lint
 static const char sccsid[] = "@(#)conv.c	8.1 (Berkeley) 6/6/93";
 #endif /* not lint */
-#endif
+#else /* __rtems__ */
+/* For wcwidth() visibility */
+#define _GNU_SOURCE
+#endif /* __rtems__ */
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/usr.bin/hexdump/conv.c,v 1.9 2006/07/31 14:17:04 jkoshy Exp $");
 
diff --git a/cpukit/libmisc/shell/hexdump-odsyntax.c b/cpukit/libmisc/shell/hexdump-odsyntax.c
index 88c7b80..bc6211b 100644
--- a/cpukit/libmisc/shell/hexdump-odsyntax.c
+++ b/cpukit/libmisc/shell/hexdump-odsyntax.c
@@ -39,13 +39,14 @@
 #if 0
 static char sccsid[] = "@(#)odsyntax.c	8.2 (Berkeley) 5/4/95";
 #endif /* not lint */
+#ifdef __rtems__
+/* For asprintf() visibility */
+#define _GNU_SOURCE
+#endif /* __rtems__ */
 #include <sys/cdefs.h>
 __FBSDID("$FreeBSD: src/usr.bin/hexdump/odsyntax.c,v 1.17 2004/07/22 13:14:42 johan Exp $");
 #endif
 
-#ifdef __rtems__
-#define _GNU_SOURCE
-#endif
 #include <sys/types.h>
 
 #include <ctype.h>



More information about the vc mailing list