Module Name: src
Committed By: kamil
Date: Fri Jun 30 03:56:12 UTC 2017
Modified Files:
src/bin/ksh: c_ksh.c c_sh.c c_test.c config.h edit.c emacs.c eval.c
exec.c history.c io.c jobs.c mail.c main.c path.c shf.c tty.c var.c
vi.c
Removed Files:
src/bin/ksh: ksh_stat.h
Log Message:
ksh: Drop support for systems without <sys/stat.h>
In future the order of includes will be normalized with KNF.
No functional change intended.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/ksh/c_ksh.c
cvs rdiff -u -r1.21 -r1.22 src/bin/ksh/c_sh.c src/bin/ksh/exec.c
cvs rdiff -u -r1.6 -r1.7 src/bin/ksh/c_test.c src/bin/ksh/mail.c
cvs rdiff -u -r1.50 -r1.51 src/bin/ksh/config.h
cvs rdiff -u -r1.30 -r1.31 src/bin/ksh/edit.c
cvs rdiff -u -r1.35 -r1.36 src/bin/ksh/emacs.c
cvs rdiff -u -r1.20 -r1.21 src/bin/ksh/eval.c
cvs rdiff -u -r1.15 -r1.16 src/bin/ksh/history.c src/bin/ksh/io.c
cvs rdiff -u -r1.17 -r1.18 src/bin/ksh/jobs.c
cvs rdiff -u -r1.3 -r0 src/bin/ksh/ksh_stat.h
cvs rdiff -u -r1.19 -r1.20 src/bin/ksh/main.c
cvs rdiff -u -r1.12 -r1.13 src/bin/ksh/path.c src/bin/ksh/shf.c
cvs rdiff -u -r1.7 -r1.8 src/bin/ksh/tty.c
cvs rdiff -u -r1.18 -r1.19 src/bin/ksh/var.c
cvs rdiff -u -r1.16 -r1.17 src/bin/ksh/vi.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/ksh/c_ksh.c
diff -u src/bin/ksh/c_ksh.c:1.24 src/bin/ksh/c_ksh.c:1.25
--- src/bin/ksh/c_ksh.c:1.24 Thu Jun 22 19:41:07 2017
+++ src/bin/ksh/c_ksh.c Fri Jun 30 03:56:12 2017
@@ -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,13 +6,14 @@
#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 "sh.h"
-#include "ksh_stat.h"
+#include <sys/stat.h>
#include <ctype.h>
+#include "sh.h"
+
int
c_cd(wp)
char **wp;
Index: src/bin/ksh/c_sh.c
diff -u src/bin/ksh/c_sh.c:1.21 src/bin/ksh/c_sh.c:1.22
--- src/bin/ksh/c_sh.c:1.21 Fri Jun 30 03:43:57 2017
+++ src/bin/ksh/c_sh.c Fri Jun 30 03:56:12 2017
@@ -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));
Index: src/bin/ksh/exec.c
diff -u src/bin/ksh/exec.c:1.21 src/bin/ksh/exec.c:1.22
--- src/bin/ksh/exec.c:1.21 Fri Jun 30 02:38:10 2017
+++ src/bin/ksh/exec.c Fri Jun 30 03:56:12 2017
@@ -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
Index: src/bin/ksh/c_test.c
diff -u src/bin/ksh/c_test.c:1.6 src/bin/ksh/c_test.c:1.7
--- src/bin/ksh/c_test.c:1.6 Sun Jun 26 19:09:00 2005
+++ src/bin/ksh/c_test.c Fri Jun 30 03:56:12 2017
@@ -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:
Index: src/bin/ksh/mail.c
diff -u src/bin/ksh/mail.c:1.6 src/bin/ksh/mail.c:1.7
--- src/bin/ksh/mail.c:1.6 Fri Jun 30 03:43:57 2017
+++ src/bin/ksh/mail.c Fri Jun 30 03:56:12 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mail.c,v 1.6 2017/06/30 03:43:57 kamil Exp $ */
+/* $NetBSD: mail.c,v 1.7 2017/06/30 03:56:12 kamil Exp $ */
/*
* Mailbox checking code by Robert J. Gibson, adapted for PD ksh by
@@ -7,17 +7,17 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mail.c,v 1.6 2017/06/30 03:43:57 kamil Exp $");
+__RCSID("$NetBSD: mail.c,v 1.7 2017/06/30 03:56:12 kamil Exp $");
#endif
#include "config.h"
#ifdef KSH
+#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include "sh.h"
-#include "ksh_stat.h"
#define MBMESSAGE "You have mail in $_"
Index: src/bin/ksh/config.h
diff -u src/bin/ksh/config.h:1.50 src/bin/ksh/config.h:1.51
--- src/bin/ksh/config.h:1.50 Fri Jun 30 03:43:57 2017
+++ src/bin/ksh/config.h Fri Jun 30 03:56:12 2017
@@ -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
Index: src/bin/ksh/edit.c
diff -u src/bin/ksh/edit.c:1.30 src/bin/ksh/edit.c:1.31
--- src/bin/ksh/edit.c:1.30 Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/edit.c Fri Jun 30 03:56:12 2017
@@ -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 @@ __RCSID("$NetBSD: edit.c,v 1.30 2017/06/
#include "edit.h"
#undef EXTERN
#include <sys/ioctl.h>
+#include <sys/stat.h>
#include <ctype.h>
-#include "ksh_stat.h"
#if defined(TIOCGWINSZ)
Index: src/bin/ksh/emacs.c
diff -u src/bin/ksh/emacs.c:1.35 src/bin/ksh/emacs.c:1.36
--- src/bin/ksh/emacs.c:1.35 Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/emacs.c Fri Jun 30 03:56:12 2017
@@ -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;
Index: src/bin/ksh/eval.c
diff -u src/bin/ksh/eval.c:1.20 src/bin/ksh/eval.c:1.21
--- src/bin/ksh/eval.c:1.20 Fri Jun 30 02:06:59 2017
+++ src/bin/ksh/eval.c Fri Jun 30 03:56:12 2017
@@ -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
Index: src/bin/ksh/history.c
diff -u src/bin/ksh/history.c:1.15 src/bin/ksh/history.c:1.16
--- src/bin/ksh/history.c:1.15 Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/history.c Fri Jun 30 03:56:12 2017
@@ -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
Index: src/bin/ksh/io.c
diff -u src/bin/ksh/io.c:1.15 src/bin/ksh/io.c:1.16
--- src/bin/ksh/io.c:1.15 Fri Jun 30 02:51:14 2017
+++ src/bin/ksh/io.c Fri Jun 30 03:56:12 2017
@@ -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;
Index: src/bin/ksh/jobs.c
diff -u src/bin/ksh/jobs.c:1.17 src/bin/ksh/jobs.c:1.18
--- src/bin/ksh/jobs.c:1.17 Fri Jun 30 03:23:18 2017
+++ src/bin/ksh/jobs.c Fri Jun 30 03:56:12 2017
@@ -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 */
Index: src/bin/ksh/main.c
diff -u src/bin/ksh/main.c:1.19 src/bin/ksh/main.c:1.20
--- src/bin/ksh/main.c:1.19 Fri Jun 30 03:43:57 2017
+++ src/bin/ksh/main.c Fri Jun 30 03:56:12 2017
@@ -1,22 +1,22 @@
-/* $NetBSD: main.c,v 1.19 2017/06/30 03:43:57 kamil Exp $ */
+/* $NetBSD: main.c,v 1.20 2017/06/30 03:56:12 kamil Exp $ */
/*
* startup, main loop, environments and error handling
*/
#include <sys/cdefs.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <locale.h>
#include <time.h>
#ifndef lint
-__RCSID("$NetBSD: main.c,v 1.19 2017/06/30 03:43:57 kamil Exp $");
+__RCSID("$NetBSD: main.c,v 1.20 2017/06/30 03:56:12 kamil Exp $");
#endif
#define EXTERN /* define EXTERNs in sh.h */
#include "sh.h"
-#include "ksh_stat.h"
extern char **environ;
Index: src/bin/ksh/path.c
diff -u src/bin/ksh/path.c:1.12 src/bin/ksh/path.c:1.13
--- src/bin/ksh/path.c:1.12 Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/path.c Fri Jun 30 03:56:12 2017
@@ -1,13 +1,13 @@
-/* $NetBSD: path.c,v 1.12 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: path.c,v 1.13 2017/06/30 03:56:12 kamil Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: path.c,v 1.12 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: path.c,v 1.13 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include "sh.h"
-#include "ksh_stat.h"
/*
* Contains a routine to search a : separated list of
Index: src/bin/ksh/shf.c
diff -u src/bin/ksh/shf.c:1.12 src/bin/ksh/shf.c:1.13
--- src/bin/ksh/shf.c:1.12 Fri Jun 30 02:51:14 2017
+++ src/bin/ksh/shf.c Fri Jun 30 03:56:12 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: shf.c,v 1.12 2017/06/30 02:51:14 kamil Exp $ */
+/* $NetBSD: shf.c,v 1.13 2017/06/30 03:56:12 kamil Exp $ */
/*
* Shell file I/O routines
@@ -6,12 +6,12 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: shf.c,v 1.12 2017/06/30 02:51:14 kamil Exp $");
+__RCSID("$NetBSD: shf.c,v 1.13 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include "sh.h"
-#include "ksh_stat.h"
#include "ksh_limval.h"
Index: src/bin/ksh/tty.c
diff -u src/bin/ksh/tty.c:1.7 src/bin/ksh/tty.c:1.8
--- src/bin/ksh/tty.c:1.7 Fri Jun 23 00:11:01 2017
+++ src/bin/ksh/tty.c Fri Jun 30 03:56:12 2017
@@ -1,14 +1,14 @@
-/* $NetBSD: tty.c,v 1.7 2017/06/23 00:11:01 kamil Exp $ */
+/* $NetBSD: tty.c,v 1.8 2017/06/30 03:56:12 kamil Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: tty.c,v 1.7 2017/06/23 00:11:01 kamil Exp $");
+__RCSID("$NetBSD: tty.c,v 1.8 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include "sh.h"
-#include "ksh_stat.h"
#define EXTERN
#include "tty.h"
#undef EXTERN
Index: src/bin/ksh/var.c
diff -u src/bin/ksh/var.c:1.18 src/bin/ksh/var.c:1.19
--- src/bin/ksh/var.c:1.18 Fri Jun 30 03:43:57 2017
+++ src/bin/ksh/var.c Fri Jun 30 03:56:12 2017
@@ -1,18 +1,18 @@
-/* $NetBSD: var.c,v 1.18 2017/06/30 03:43:57 kamil Exp $ */
+/* $NetBSD: var.c,v 1.19 2017/06/30 03:56:12 kamil Exp $ */
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: var.c,v 1.18 2017/06/30 03:43:57 kamil Exp $");
+__RCSID("$NetBSD: var.c,v 1.19 2017/06/30 03:56:12 kamil Exp $");
#endif
+#include <sys/stat.h>
#include <sys/time.h>
#include <time.h>
#include <ctype.h>
#include "sh.h"
#include "ksh_limval.h"
-#include "ksh_stat.h"
/*
* Variables
Index: src/bin/ksh/vi.c
diff -u src/bin/ksh/vi.c:1.16 src/bin/ksh/vi.c:1.17
--- src/bin/ksh/vi.c:1.16 Thu Jun 22 14:20:46 2017
+++ src/bin/ksh/vi.c Fri Jun 30 03:56:12 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: vi.c,v 1.16 2017/06/22 14:20:46 kamil Exp $ */
+/* $NetBSD: vi.c,v 1.17 2017/06/30 03:56:12 kamil Exp $ */
/*
* vi command editing
@@ -9,15 +9,15 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: vi.c,v 1.16 2017/06/22 14:20:46 kamil Exp $");
+__RCSID("$NetBSD: vi.c,v 1.17 2017/06/30 03:56:12 kamil Exp $");
#endif
#include "config.h"
#ifdef VI
#include "sh.h"
+#include <sys/stat.h>
#include <ctype.h>
-#include "ksh_stat.h" /* completion */
#include "edit.h"
#define CMDLEN 1024