minor cleanups from the porting work
This commit is contained in:
parent
083f19dc53
commit
1e313c282c
10
histrap.c
10
histrap.c
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.21 2006/08/12 20:32:33 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.22 2006/08/15 23:43:30 tg Exp $");
|
||||||
|
|
||||||
static int histfd;
|
static int histfd;
|
||||||
static int hsize;
|
static int hsize;
|
||||||
@ -641,10 +641,7 @@ hist_init(Source *s)
|
|||||||
|
|
||||||
hist_source = s;
|
hist_source = s;
|
||||||
|
|
||||||
#ifdef __sun__
|
#if !defined(__sun__)
|
||||||
hname = NULL;
|
|
||||||
histfd = 0;
|
|
||||||
#else
|
|
||||||
hname = str_val(global("HISTFILE"));
|
hname = str_val(global("HISTFILE"));
|
||||||
if (hname == NULL)
|
if (hname == NULL)
|
||||||
return;
|
return;
|
||||||
@ -701,6 +698,9 @@ hist_init(Source *s)
|
|||||||
}
|
}
|
||||||
(void) flock(histfd, LOCK_UN);
|
(void) flock(histfd, LOCK_UN);
|
||||||
hsize = lseek(histfd, 0L, SEEK_END);
|
hsize = lseek(histfd, 0L, SEEK_END);
|
||||||
|
#else
|
||||||
|
hname = NULL;
|
||||||
|
histfd = 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
sh.h
3
sh.h
@ -8,7 +8,7 @@
|
|||||||
/* $OpenBSD: c_test.h,v 1.4 2004/12/20 11:34:26 otto Exp $ */
|
/* $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 $ */
|
/* $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.32 2006/08/09 20:44:16 tg Exp $"
|
#define MKSH_SH_H_ID "$MirOS: src/bin/mksh/sh.h,v 1.33 2006/08/15 23:43:30 tg Exp $"
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
|
|
||||||
@ -27,6 +27,7 @@
|
|||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <libgen.h>
|
#include <libgen.h>
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#if !defined(__sun__)
|
#if !defined(__sun__)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user