Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ksh ksh: Drop support for systems without <sys/stat.h>
details: https://anonhg.NetBSD.org/src/rev/e0202b23c100
branches: trunk
changeset: 825101:e0202b23c100
user: kamil <kamil%NetBSD.org@localhost>
date: Fri Jun 30 03:56:12 2017 +0000
description:
ksh: Drop support for systems without <sys/stat.h>
In future the order of includes will be normalized with KNF.
No functional change intended.
diffstat:
bin/ksh/c_ksh.c | 9 ++++---
bin/ksh/c_sh.c | 7 ++---
bin/ksh/c_test.c | 6 ++--
bin/ksh/config.h | 8 +------
bin/ksh/edit.c | 6 ++--
bin/ksh/emacs.c | 12 +++++-----
bin/ksh/eval.c | 6 ++--
bin/ksh/exec.c | 8 +++---
bin/ksh/history.c | 6 ++--
bin/ksh/io.c | 7 ++---
bin/ksh/jobs.c | 6 ++--
bin/ksh/ksh_stat.h | 56 ------------------------------------------------------
bin/ksh/mail.c | 6 ++--
bin/ksh/main.c | 6 ++--
bin/ksh/path.c | 6 ++--
bin/ksh/shf.c | 6 ++--
bin/ksh/tty.c | 6 ++--
bin/ksh/var.c | 6 ++--
bin/ksh/vi.c | 6 ++--
19 files changed, 58 insertions(+), 121 deletions(-)
diffs (truncated from 532 to 300 lines):
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/c_ksh.c
--- a/bin/ksh/c_ksh.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/c_ksh.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_ksh.c,v 1.24 2017/06/22 19:41:07 kamil Exp $ */
+/* $NetBSD: c_ksh.c,v 1.25 2017/06/30 03:56:12 kamil Exp $ */
/*
* built-in Korn commands: c_*
@@ -6,12 +6,13 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_ksh.c,v 1.24 2017/06/22 19:41:07 kamil Exp $");
+__RCSID("$NetBSD: c_ksh.c,v 1.25 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
+#include <ctype.h>
+
#include "sh.h"
-#include "ksh_stat.h"
-#include <ctype.h>
int
c_cd(wp)
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/c_sh.c
--- a/bin/ksh/c_sh.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/c_sh.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_sh.c,v 1.21 2017/06/30 03:43:57 kamil Exp $ */
+/* $NetBSD: c_sh.c,v 1.22 2017/06/30 03:56:12 kamil Exp $ */
/*
* built-in Bourne commands
@@ -6,16 +6,15 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_sh.c,v 1.21 2017/06/30 03:43:57 kamil Exp $");
+__RCSID("$NetBSD: c_sh.c,v 1.22 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include <sys/time.h>
#include <sys/times.h>
#include <time.h>
#include "sh.h"
-#include "ksh_stat.h" /* umask() */
-
static char *clocktos ARGS((clock_t t));
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/c_test.c
--- a/bin/ksh/c_test.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/c_test.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: c_test.c,v 1.6 2005/06/26 19:09:00 christos Exp $ */
+/* $NetBSD: c_test.c,v 1.7 2017/06/30 03:56:12 kamil Exp $ */
/*
* test(1); version 7-like -- author Erik Baalbergen
@@ -11,12 +11,12 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: c_test.c,v 1.6 2005/06/26 19:09:00 christos Exp $");
+__RCSID("$NetBSD: c_test.c,v 1.7 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include "sh.h"
-#include "ksh_stat.h"
#include "c_test.h"
/* test(1) accepts the following grammar:
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/config.h
--- a/bin/ksh/config.h Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/config.h Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: config.h,v 1.50 2017/06/30 03:43:57 kamil Exp $ */
+/* $NetBSD: config.h,v 1.51 2017/06/30 03:56:12 kamil Exp $ */
/* config.h. Generated automatically by configure. */
/* config.h.in. Generated automatically from configure.in by autoheader. */
@@ -11,9 +11,6 @@
#ifndef CONFIG_H
#define CONFIG_H
-/* Define if your struct stat has st_rdev. */
-#define HAVE_ST_RDEV 1
-
/* Define if on MINIX. */
/* #undef _MINIX */
@@ -27,9 +24,6 @@
/* Define as the return type of signal handlers (int or void). */
#define RETSIGTYPE void
-/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
-/* #undef STAT_MACROS_BROKEN */
-
/* Define if `sys_siglist' is declared by <signal.h>. */
#define SYS_SIGLIST_DECLARED 1
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/edit.c
--- a/bin/ksh/edit.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/edit.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: edit.c,v 1.30 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: edit.c,v 1.31 2017/06/30 03:56:12 kamil Exp $ */
/*
* Command line editing - common code
@@ -7,7 +7,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: edit.c,v 1.30 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: edit.c,v 1.31 2017/06/30 03:56:12 kamil Exp $");
#endif
@@ -20,8 +20,8 @@
#include "edit.h"
#undef EXTERN
#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <ctype.h>
-#include "ksh_stat.h"
#if defined(TIOCGWINSZ)
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/emacs.c
--- a/bin/ksh/emacs.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/emacs.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: emacs.c,v 1.35 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: emacs.c,v 1.36 2017/06/30 03:56:12 kamil Exp $ */
/*
* Emacs-like command line editing and history
@@ -10,18 +10,18 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: emacs.c,v 1.35 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: emacs.c,v 1.36 2017/06/30 03:56:12 kamil Exp $");
#endif
-
#include "config.h"
#ifdef EMACS
-#include "sh.h"
-#include "ksh_stat.h"
-#include "ksh_dir.h"
+#include <sys/stat.h>
#include <ctype.h>
#include <locale.h>
+
+#include "sh.h"
+#include "ksh_dir.h"
#include "edit.h"
static Area aedit;
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/eval.c
--- a/bin/ksh/eval.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/eval.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: eval.c,v 1.20 2017/06/30 02:06:59 kamil Exp $ */
+/* $NetBSD: eval.c,v 1.21 2017/06/30 03:56:12 kamil Exp $ */
/*
* Expansion - quoting, separation, substitution, globbing
@@ -6,15 +6,15 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: eval.c,v 1.20 2017/06/30 02:06:59 kamil Exp $");
+__RCSID("$NetBSD: eval.c,v 1.21 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include <stdint.h>
#include <pwd.h>
#include "sh.h"
#include "ksh_dir.h"
-#include "ksh_stat.h"
/*
* string expansion
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/exec.c
--- a/bin/ksh/exec.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/exec.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exec.c,v 1.21 2017/06/30 02:38:10 kamil Exp $ */
+/* $NetBSD: exec.c,v 1.22 2017/06/30 03:56:12 kamil Exp $ */
/*
* execute command tree
@@ -6,14 +6,14 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: exec.c,v 1.21 2017/06/30 02:38:10 kamil Exp $");
+__RCSID("$NetBSD: exec.c,v 1.22 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
+#include <ctype.h>
#include "sh.h"
#include "c_test.h"
-#include <ctype.h>
-#include "ksh_stat.h"
/* Does ps4 get parameter substitutions done? */
#ifdef KSH
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/history.c
--- a/bin/ksh/history.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/history.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: history.c,v 1.15 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: history.c,v 1.16 2017/06/30 03:56:12 kamil Exp $ */
/*
* command history
@@ -19,12 +19,12 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: history.c,v 1.15 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: history.c,v 1.16 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include "sh.h"
-#include "ksh_stat.h"
#ifdef HISTORY
# ifdef EASY_HISTORY
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/io.c
--- a/bin/ksh/io.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/io.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: io.c,v 1.15 2017/06/30 02:51:14 kamil Exp $ */
+/* $NetBSD: io.c,v 1.16 2017/06/30 03:56:12 kamil Exp $ */
/*
* shell buffered IO and formatted output
@@ -6,13 +6,12 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: io.c,v 1.15 2017/06/30 02:51:14 kamil Exp $");
+__RCSID("$NetBSD: io.c,v 1.16 2017/06/30 03:56:12 kamil Exp $");
#endif
-
+#include <sys/stat.h>
#include <ctype.h>
#include "sh.h"
-#include "ksh_stat.h"
static int initio_done;
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/jobs.c
--- a/bin/ksh/jobs.c Fri Jun 30 03:43:57 2017 +0000
+++ b/bin/ksh/jobs.c Fri Jun 30 03:56:12 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: jobs.c,v 1.17 2017/06/30 03:23:18 kamil Exp $ */
+/* $NetBSD: jobs.c,v 1.18 2017/06/30 03:56:12 kamil Exp $ */
/*
* Process and job control
@@ -21,14 +21,14 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: jobs.c,v 1.17 2017/06/30 03:23:18 kamil Exp $");
+__RCSID("$NetBSD: jobs.c,v 1.18 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include <sys/times.h>
#include <sys/wait.h>
#include "sh.h"
-#include "ksh_stat.h"
#include "tty.h"
/* Start of system configuration stuff */
diff -r 8c2fedf7fb25 -r e0202b23c100 bin/ksh/ksh_stat.h
--- a/bin/ksh/ksh_stat.h Fri Jun 30 03:43:57 2017 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
Home |
Main Index |
Thread Index |
Old Index