diff --git a/bin/ksh/config.h b/bin/ksh/config.h index 1038407fdd66..7de04671e8c9 100644 --- a/bin/ksh/config.h +++ b/bin/ksh/config.h @@ -1,4 +1,4 @@ -/* $NetBSD: config.h,v 1.36 2017/06/23 00:20:22 kamil Exp $ */ +/* $NetBSD: config.h,v 1.37 2017/06/23 00:29:42 kamil Exp $ */ /* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader. */ @@ -172,12 +172,6 @@ /* Include game-of-life? */ /* #undef SILLY */ -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - /* Define if you have the _setjmp function. */ #define HAVE__SETJMP diff --git a/bin/ksh/jobs.c b/bin/ksh/jobs.c index 96fdacd95b3f..2efa2cbcc466 100644 --- a/bin/ksh/jobs.c +++ b/bin/ksh/jobs.c @@ -1,4 +1,4 @@ -/* $NetBSD: jobs.c,v 1.13 2017/06/22 14:20:46 kamil Exp $ */ +/* $NetBSD: jobs.c,v 1.14 2017/06/23 00:29:42 kamil Exp $ */ /* * Process and job control @@ -26,7 +26,7 @@ #include #ifndef lint -__RCSID("$NetBSD: jobs.c,v 1.13 2017/06/22 14:20:46 kamil Exp $"); +__RCSID("$NetBSD: jobs.c,v 1.14 2017/06/23 00:29:42 kamil Exp $"); #endif @@ -142,7 +142,7 @@ struct job { int status; /* exit status of last process */ pid_t pgrp; /* process group of job */ pid_t ppid; /* pid of process that forked job */ - INT32 age; /* number of jobs started */ + int_least32_t age; /* number of jobs started */ clock_t systime; /* system time used by job */ clock_t usrtime; /* user time used by job */ Proc *proc_list; /* process list */ @@ -183,7 +183,7 @@ static Job *async_job; static pid_t async_pid; static int nzombie; /* # of zombies owned by this process */ -static INT32 njobs; /* # of jobs started */ +static int_least32_t njobs; /* # of jobs started */ static int child_max; /* CHILD_MAX */ diff --git a/bin/ksh/sh.h b/bin/ksh/sh.h index ee09184675d5..a2f014dde0ce 100644 --- a/bin/ksh/sh.h +++ b/bin/ksh/sh.h @@ -1,10 +1,10 @@ -/* $NetBSD: sh.h,v 1.28 2017/06/23 00:18:01 kamil Exp $ */ +/* $NetBSD: sh.h,v 1.29 2017/06/23 00:29:42 kamil Exp $ */ /* * Public Domain Bourne/Korn shell */ -/* $Id: sh.h,v 1.28 2017/06/23 00:18:01 kamil Exp $ */ +/* $Id: sh.h,v 1.29 2017/06/23 00:29:42 kamil Exp $ */ #include "config.h" /* system and option configuration info */ @@ -26,6 +26,7 @@ #include #include #include +#include #ifndef O_ACCMODE # define O_ACCMODE (O_RDONLY|O_WRONLY|O_RDWR) @@ -118,20 +119,6 @@ typedef RETSIGTYPE (*handler_t) ARGS((int)); /* signal handler */ # define ksh_jmp_buf jmp_buf #endif /* HAVE_SIGSETJMP */ -/* Find a integer type that is at least 32 bits (or die) - SIZEOF_* defined - * by autoconf (assumes an 8 bit byte, but I'm not concerned). - * NOTE: INT32 may end up being more than 32 bits. - */ -#if SIZEOF_INT >= 4 -# define INT32 int -#else /* SIZEOF_INT */ -# if SIZEOF_LONG >= 4 -# define INT32 long -# else /* SIZEOF_LONG */ - #error cannot find 32 bit type... -# endif /* SIZEOF_LONG */ -#endif /* SIZEOF_INT */ - /* end of common headers */ /* Stop gcc and lint from complaining about possibly uninitialized variables */ @@ -187,7 +174,7 @@ typedef int bool_t; #define BIT(i) (1<<(i)) /* define bit in flag */ /* Table flag type - needs > 16 and < 32 bits */ -typedef INT32 Tflag; +typedef int_least32_t Tflag; #define NUFILE 32 /* Number of user-accessible files */ #define FDBASE 10 /* First file usable by Shell */ @@ -495,7 +482,7 @@ EXTERN Getopt user_opt; /* parsing state for getopts builtin command */ #ifdef KSH /* This for co-processes */ -typedef INT32 Coproc_id; /* something that won't (realisticly) wrap */ +typedef int_least32_t Coproc_id; /* something that won't (realisticly) wrap */ struct coproc { int read; /* pipe from co-process's stdout */ int readw; /* other side of read (saved temporarily) */