* version.h doesn't need an RCS ID

* compat.h does, add it to misc.c, always include it, move if NEED_COMPAT
* major whitespace cleanup in sh.h
This commit is contained in:
tg 2006-08-22 22:16:04 +00:00
parent e20d82c4d1
commit a87ff74cbd
4 changed files with 346 additions and 350 deletions

View File

@ -1,5 +1,6 @@
/* $MirOS: src/bin/mksh/compat.h,v 1.3 2006/08/18 18:59:49 tg Exp $ */
#define MKSH_COMPAT_H_ID "$MirOS: src/bin/mksh/compat.h,v 1.4 2006/08/22 22:16:04 tg Exp $"
#ifdef NEED_COMPAT
/* Part I: extra headers */
#if defined(__sun__) || defined(__INTERIX)
@ -39,7 +40,7 @@
#endif
#ifndef S_ISTXT
#define S_ISTXT 0001000 /* sticky bit */
#define S_ISTXT 0001000
#endif
@ -60,8 +61,10 @@ mode_t getmode(const void *, mode_t);
void *setmode(const char *);
#endif
#if defined(__INTERIX)
#ifdef __INTERIX
#define makedev(x,y) mkdev((x),(y))
extern int __cdecl seteuid(uid_t);
extern int __cdecl setegid(gid_t);
#endif
#endif

4
misc.c
View File

@ -3,8 +3,8 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.13 2006/08/09 20:44:15 tg Exp $"
"\t" MKSH_SH_H_ID);
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.14 2006/08/22 22:16:04 tg Exp $"
"\t" MKSH_SH_H_ID "\t" MKSH_COMPAT_H_ID);
short chtypes[UCHAR_MAX+1]; /* type bits for unsigned char */

11
sh.h
View File

@ -8,7 +8,7 @@
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
/* $OpenBSD: tty.h,v 1.5 2004/12/20 11:34:26 otto Exp $ */
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.35 2006/08/16 00:00:24 tg Exp $"
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.36 2006/08/22 22:16:04 tg Exp $"
#include <sys/param.h>
@ -44,9 +44,8 @@
#include <termios.h>
#include <time.h>
#include <unistd.h>
#if defined(NEED_COMPAT)
#include "compat.h"
#endif
#include "version.h"
/* some useful #defines */
#ifdef EXTERN
@ -560,7 +559,6 @@ struct arg_info {
*/
struct block {
Area area; /* area to allocate things */
/*struct arg_info argi;*/
char **argv;
int argc;
int flags; /* see BF_* */
@ -1141,8 +1139,7 @@ int getn(const char *, int *);
int bi_getn(const char *, int *);
int gmatchx(const char *, const char *, int);
int has_globbing(const char *, const char *);
const unsigned char *pat_scan(const unsigned char *, const unsigned char *,
int);
const unsigned char *pat_scan(const unsigned char *, const unsigned char *, int);
void qsortp(void **, size_t, int (*)(void *, void *));
int xstrcmp(void *, void *);
void ksh_getopt_reset(Getopt *, int);
@ -1270,8 +1267,6 @@ EXTERN struct termios tty_state; /* saved tty state */
extern void tty_init(int);
extern void tty_close(void);
#include "version.h"
/* be sure not to interfere with anyone else's idea about EXTERN */
#ifdef EXTERN_DEFINED
# undef EXTERN_DEFINED

View File

@ -1,3 +1 @@
/* $MirOS: src/bin/mksh/version.h,v 1.7 2006/08/18 13:40:16 tg Exp $ */
EXTERN const char MKSH_VERSION[] I__("@(#)MIRBSD KSH R28 2006/08/18");