[PATCH 01/31] shell: Use #include "..." for local header files

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Oct 8 10:43:03 UTC 2018


Update #3375.
---
 cpukit/libmisc/Makefile.am              | 1 -
 cpukit/libmisc/shell/cmp-ls.c           | 2 +-
 cpukit/libmisc/shell/dd-args.c          | 2 +-
 cpukit/libmisc/shell/dd-conv.c          | 2 +-
 cpukit/libmisc/shell/dd-position.c      | 2 +-
 cpukit/libmisc/shell/err.c              | 2 +-
 cpukit/libmisc/shell/errx.c             | 2 +-
 cpukit/libmisc/shell/fts.c              | 2 +-
 cpukit/libmisc/shell/hexdump-display.c  | 2 +-
 cpukit/libmisc/shell/hexdump-odsyntax.c | 2 +-
 cpukit/libmisc/shell/hexdump-parse.c    | 2 +-
 cpukit/libmisc/shell/hexsyntax.c        | 2 +-
 cpukit/libmisc/shell/main_cp.c          | 4 ++--
 cpukit/libmisc/shell/main_dd.c          | 2 +-
 cpukit/libmisc/shell/main_ln.c          | 2 +-
 cpukit/libmisc/shell/main_ls.c          | 4 ++--
 cpukit/libmisc/shell/main_mknod.c       | 2 +-
 cpukit/libmisc/shell/main_mv.c          | 2 +-
 cpukit/libmisc/shell/main_ping.c        | 2 +-
 cpukit/libmisc/shell/main_rm.c          | 4 ++--
 cpukit/libmisc/shell/print-ls.c         | 4 ++--
 cpukit/libmisc/shell/utils-cp.c         | 4 ++--
 cpukit/libmisc/shell/utils-ls.c         | 6 +++---
 cpukit/libmisc/shell/verr.c             | 2 +-
 cpukit/libmisc/shell/verrx.c            | 2 +-
 cpukit/libmisc/shell/vis.c              | 2 +-
 cpukit/libmisc/shell/vwarn.c            | 2 +-
 cpukit/libmisc/shell/vwarnx.c           | 2 +-
 cpukit/libmisc/shell/warn.c             | 2 +-
 cpukit/libmisc/shell/warnx.c            | 2 +-
 30 files changed, 36 insertions(+), 37 deletions(-)

diff --git a/cpukit/libmisc/Makefile.am b/cpukit/libmisc/Makefile.am
index 2d6e36879f..c4cd9ae152 100644
--- a/cpukit/libmisc/Makefile.am
+++ b/cpukit/libmisc/Makefile.am
@@ -78,7 +78,6 @@ libredirector_a_SOURCES = redirector/stdio-redirect.c redirector/stdio-redirect.
 ## shell
 if LIBSHELL
 noinst_LIBRARIES += libshell.a
-libshell_a_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/shell
 libshell_a_SOURCES = shell/cat_file.c shell/cmds.c shell/internal.h \
     shell/main_alias.c shell/main_cat.c shell/main_cd.c shell/cmp-ls.c \
     shell/main_chdir.c shell/main_chmod.c shell/main_chroot.c \
diff --git a/cpukit/libmisc/shell/cmp-ls.c b/cpukit/libmisc/shell/cmp-ls.c
index 793e607fe1..a7c10d30a0 100644
--- a/cpukit/libmisc/shell/cmp-ls.c
+++ b/cpukit/libmisc/shell/cmp-ls.c
@@ -50,7 +50,7 @@ __RCSID("$NetBSD: cmp.c,v 1.17 2003/08/07 09:05:14 agc Exp $");
 #include <sys/types.h>
 #include <sys/stat.h>
 
-#include <fts.h>
+#include "fts.h"
 #include <string.h>
 
 #include "extern-ls.h"
diff --git a/cpukit/libmisc/shell/dd-args.c b/cpukit/libmisc/shell/dd-args.c
index a271287166..8d23c390b0 100644
--- a/cpukit/libmisc/shell/dd-args.c
+++ b/cpukit/libmisc/shell/dd-args.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD: src/bin/dd/args.c,v 1.40 2004/08/15 19:10:05 rwatson Exp $")
 
 #include <sys/types.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <inttypes.h>
 #include <limits.h>
diff --git a/cpukit/libmisc/shell/dd-conv.c b/cpukit/libmisc/shell/dd-conv.c
index 81dba4798b..20b5bb9247 100644
--- a/cpukit/libmisc/shell/dd-conv.c
+++ b/cpukit/libmisc/shell/dd-conv.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD: src/bin/dd/conv.c,v 1.19 2004/04/06 20:06:45 markm Exp $");
 
 #include <sys/param.h>
 
-#include <err.h>
+#include "err.h"
 #include <inttypes.h>
 #include <string.h>
 
diff --git a/cpukit/libmisc/shell/dd-position.c b/cpukit/libmisc/shell/dd-position.c
index 7586faddf8..5d6179dc34 100644
--- a/cpukit/libmisc/shell/dd-position.c
+++ b/cpukit/libmisc/shell/dd-position.c
@@ -48,7 +48,7 @@ __FBSDID("$FreeBSD: src/bin/dd/position.c,v 1.23 2004/04/06 20:06:46 markm Exp $
 #include <sys/mtio.h>
 #endif
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <inttypes.h>
 #include <unistd.h>
diff --git a/cpukit/libmisc/shell/err.c b/cpukit/libmisc/shell/err.c
index 610ea598a2..fff022a115 100644
--- a/cpukit/libmisc/shell/err.c
+++ b/cpukit/libmisc/shell/err.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: err.c,v 1.25 2005/09/13 13:51:50 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <stdarg.h>
 
 #ifdef __weak_alias
diff --git a/cpukit/libmisc/shell/errx.c b/cpukit/libmisc/shell/errx.c
index 04e15e128b..f133e16a55 100644
--- a/cpukit/libmisc/shell/errx.c
+++ b/cpukit/libmisc/shell/errx.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: errx.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <stdarg.h>
 
 #ifdef __weak_alias
diff --git a/cpukit/libmisc/shell/fts.c b/cpukit/libmisc/shell/fts.c
index 32572c7d2f..160c046438 100644
--- a/cpukit/libmisc/shell/fts.c
+++ b/cpukit/libmisc/shell/fts.c
@@ -57,7 +57,7 @@ __RCSID("$NetBSD: fts.c,v 1.40 2009/11/02 17:17:34 stacktic Exp $");
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>
-#include <fts.h>
+#include "fts.h"
 #include <stdlib.h>
 #include <stdint.h>
 #include <string.h>
diff --git a/cpukit/libmisc/shell/hexdump-display.c b/cpukit/libmisc/shell/hexdump-display.c
index 3e33fba143..7c60ceb84c 100644
--- a/cpukit/libmisc/shell/hexdump-display.c
+++ b/cpukit/libmisc/shell/hexdump-display.c
@@ -51,7 +51,7 @@ __FBSDID("$FreeBSD: src/usr.bin/hexdump/display.c,v 1.22 2004/08/04 02:47:32 tjr
 #include <stdint.h>
 
 #include <ctype.h>
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/cpukit/libmisc/shell/hexdump-odsyntax.c b/cpukit/libmisc/shell/hexdump-odsyntax.c
index bc6211b0d5..8da2a34794 100644
--- a/cpukit/libmisc/shell/hexdump-odsyntax.c
+++ b/cpukit/libmisc/shell/hexdump-odsyntax.c
@@ -50,7 +50,7 @@ __FBSDID("$FreeBSD: src/usr.bin/hexdump/odsyntax.c,v 1.17 2004/07/22 13:14:42 jo
 #include <sys/types.h>
 
 #include <ctype.h>
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <float.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/hexdump-parse.c b/cpukit/libmisc/shell/hexdump-parse.c
index 1c35ba4649..88b9d56c31 100644
--- a/cpukit/libmisc/shell/hexdump-parse.c
+++ b/cpukit/libmisc/shell/hexdump-parse.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD: src/usr.bin/hexdump/parse.c,v 1.14 2006/08/09 19:12:10 maxim
 
 #include <sys/types.h>
 
-#include <err.h>
+#include "err.h"
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/cpukit/libmisc/shell/hexsyntax.c b/cpukit/libmisc/shell/hexsyntax.c
index 0f80738172..46c0f830a9 100644
--- a/cpukit/libmisc/shell/hexsyntax.c
+++ b/cpukit/libmisc/shell/hexsyntax.c
@@ -45,7 +45,7 @@ __FBSDID("$FreeBSD: src/usr.bin/hexdump/hexsyntax.c,v 1.12 2002/09/04 23:29:01 d
 
 #include <sys/types.h>
 
-#include <err.h>
+#include "err.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
diff --git a/cpukit/libmisc/shell/main_cp.c b/cpukit/libmisc/shell/main_cp.c
index b93865dc3f..cddbc95ce3 100644
--- a/cpukit/libmisc/shell/main_cp.c
+++ b/cpukit/libmisc/shell/main_cp.c
@@ -75,9 +75,9 @@ __RCSID("$NetBSD: cp.c,v 1.39 2005/10/24 12:59:07 kleink Exp $");
 #include <sys/param.h>
 #include <sys/stat.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
-#include <fts.h>
+#include "fts.h"
 #include <limits.h>
 #include <signal.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/main_dd.c b/cpukit/libmisc/shell/main_dd.c
index 9d1bda74a8..cff70ce020 100644
--- a/cpukit/libmisc/shell/main_dd.c
+++ b/cpukit/libmisc/shell/main_dd.c
@@ -64,7 +64,7 @@ __FBSDID("$FreeBSD: src/bin/dd/dd.c,v 1.43 2004/08/15 19:10:05 rwatson Exp $");
 #include <sys/time.h>
 
 #include <ctype.h>
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <inttypes.h>
diff --git a/cpukit/libmisc/shell/main_ln.c b/cpukit/libmisc/shell/main_ln.c
index 804004816a..5a6b9f69d7 100644
--- a/cpukit/libmisc/shell/main_ln.c
+++ b/cpukit/libmisc/shell/main_ln.c
@@ -58,7 +58,7 @@ __RCSID("$NetBSD: ln.c,v 1.34 2008/07/20 00:52:40 lukem Exp $");
 #include <sys/param.h>
 #include <sys/stat.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <locale.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/main_ls.c b/cpukit/libmisc/shell/main_ls.c
index e23e388e9f..4c69d74c13 100644
--- a/cpukit/libmisc/shell/main_ls.c
+++ b/cpukit/libmisc/shell/main_ls.c
@@ -64,9 +64,9 @@ __RCSID("$NetBSD: ls.c,v 1.58 2005/10/26 02:24:22 jschauma Exp $");
 #include <sys/ioctl.h>
 
 #include <dirent.h>
-#include <err.h>
+#include "err.h"
 #include <errno.h>
-#include <fts.h>
+#include "fts.h"
 #include <locale.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/cpukit/libmisc/shell/main_mknod.c b/cpukit/libmisc/shell/main_mknod.c
index ace91aaa8f..41b0997b24 100644
--- a/cpukit/libmisc/shell/main_mknod.c
+++ b/cpukit/libmisc/shell/main_mknod.c
@@ -60,7 +60,7 @@ __RCSID("$NetBSD: mknod.c,v 1.39 2009/02/13 01:37:23 lukem Exp $");
 #include <sys/sysctl.h>
 #endif
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <limits.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/main_mv.c b/cpukit/libmisc/shell/main_mv.c
index 9d6a3c2426..77979a7fe5 100644
--- a/cpukit/libmisc/shell/main_mv.c
+++ b/cpukit/libmisc/shell/main_mv.c
@@ -63,7 +63,7 @@ __RCSID("$NetBSD: mv.c,v 1.41 2008/07/20 00:52:40 lukem Exp $");
 #include <sys/wait.h>
 #include <sys/stat.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <fcntl.h>
 #include <grp.h>
diff --git a/cpukit/libmisc/shell/main_ping.c b/cpukit/libmisc/shell/main_ping.c
index 558afcb30f..05dee34c89 100644
--- a/cpukit/libmisc/shell/main_ping.c
+++ b/cpukit/libmisc/shell/main_ping.c
@@ -84,7 +84,7 @@ __FBSDID("$FreeBSD$");
 #endif /*IPSEC*/
 
 #include <ctype.h>
-//#include <err.h>
+//#include "err.h"
 #include <errno.h>
 #if !defined(__rtems__)
 #include <math.h>
diff --git a/cpukit/libmisc/shell/main_rm.c b/cpukit/libmisc/shell/main_rm.c
index 2e919823bd..c8dabe73f4 100644
--- a/cpukit/libmisc/shell/main_rm.c
+++ b/cpukit/libmisc/shell/main_rm.c
@@ -56,10 +56,10 @@ __FBSDID("$FreeBSD: src/bin/rm/rm.c,v 1.58 2006/10/31 02:22:36 delphij Exp $");
 #include <sys/stat.h>
 #include <sys/param.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <fcntl.h>
-#include <fts.h>
+#include "fts.h"
 #include <grp.h>
 #include <pwd.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/print-ls.c b/cpukit/libmisc/shell/print-ls.c
index 5880e6eefc..75876b7a7d 100644
--- a/cpukit/libmisc/shell/print-ls.c
+++ b/cpukit/libmisc/shell/print-ls.c
@@ -55,9 +55,9 @@ __RCSID("$NetBSD: print.c,v 1.40 2004/11/17 17:00:00 mycroft Exp $");
 #include <sys/param.h>
 #include <sys/stat.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
-#include <fts.h>
+#include "fts.h"
 #include <grp.h>
 #include <pwd.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/utils-cp.c b/cpukit/libmisc/shell/utils-cp.c
index 3a959d5136..dd6f5d3b5b 100644
--- a/cpukit/libmisc/shell/utils-cp.c
+++ b/cpukit/libmisc/shell/utils-cp.c
@@ -52,10 +52,10 @@ __RCSID("$NetBSD: utils.c,v 1.29 2005/10/15 18:22:18 christos Exp $");
 #include <sys/time.h>
 #include <utime.h>
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <fcntl.h>
-#include <fts.h>
+#include "fts.h"
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/cpukit/libmisc/shell/utils-ls.c b/cpukit/libmisc/shell/utils-ls.c
index c476d0a213..e2af1fd57f 100644
--- a/cpukit/libmisc/shell/utils-ls.c
+++ b/cpukit/libmisc/shell/utils-ls.c
@@ -51,13 +51,13 @@ __RCSID("$NetBSD: util.c,v 1.28 2005/06/17 14:36:16 hira Exp $");
 #include <sys/stat.h>
 
 #include <ctype.h>
-#include <err.h>
-#include <fts.h>
+#include "err.h"
+#include "fts.h"
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <vis.h>
+#include "vis.h"
 
 #include "extern-ls.h"
 
diff --git a/cpukit/libmisc/shell/verr.c b/cpukit/libmisc/shell/verr.c
index 9cb5d0cc70..3ebb5d8e20 100644
--- a/cpukit/libmisc/shell/verr.c
+++ b/cpukit/libmisc/shell/verr.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: verr.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/verrx.c b/cpukit/libmisc/shell/verrx.c
index 468500d000..b4a2e5374b 100644
--- a/cpukit/libmisc/shell/verrx.c
+++ b/cpukit/libmisc/shell/verrx.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: verrx.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/cpukit/libmisc/shell/vis.c b/cpukit/libmisc/shell/vis.c
index 6316555279..d80413b098 100644
--- a/cpukit/libmisc/shell/vis.c
+++ b/cpukit/libmisc/shell/vis.c
@@ -77,7 +77,7 @@ __RCSID("$NetBSD: vis.c,v 1.33 2005/05/28 13:11:14 lukem Exp $");
 
 #include <sys/types.h>
 
-#include <vis.h>
+#include "vis.h"
 #include <stdlib.h>
 
 #if !HAVE_VIS || !HAVE_SVIS
diff --git a/cpukit/libmisc/shell/vwarn.c b/cpukit/libmisc/shell/vwarn.c
index df214c5db9..0616ee2f91 100644
--- a/cpukit/libmisc/shell/vwarn.c
+++ b/cpukit/libmisc/shell/vwarn.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: vwarn.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <errno.h>
 #include <stdarg.h>
 #include <stdio.h>
diff --git a/cpukit/libmisc/shell/vwarnx.c b/cpukit/libmisc/shell/vwarnx.c
index 34737a17f1..20cccf75ad 100644
--- a/cpukit/libmisc/shell/vwarnx.c
+++ b/cpukit/libmisc/shell/vwarnx.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: vwarnx.c,v 1.13 2005/09/13 01:44:09 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <stdarg.h>
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/cpukit/libmisc/shell/warn.c b/cpukit/libmisc/shell/warn.c
index f32edfb630..a37a8b8778 100644
--- a/cpukit/libmisc/shell/warn.c
+++ b/cpukit/libmisc/shell/warn.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: warn.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <stdarg.h>
 
 #ifdef __weak_alias
diff --git a/cpukit/libmisc/shell/warnx.c b/cpukit/libmisc/shell/warnx.c
index efcbd8b0f1..367e771a2f 100644
--- a/cpukit/libmisc/shell/warnx.c
+++ b/cpukit/libmisc/shell/warnx.c
@@ -46,7 +46,7 @@ __RCSID("$NetBSD: warnx.c,v 1.13 2005/09/13 13:51:50 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
-#include <err.h>
+#include "err.h"
 #include <stdarg.h>
 
 #ifdef __weak_alias
-- 
2.16.4




More information about the devel mailing list