* add definition of __RCSID if not yet existant (GNU/Linux)
* add declarations of strlcpy and strlcat (for GNU/Linux, again) * always include <sys/resource.h> * some more compile / warning fixes
This commit is contained in:
parent
f7402a2cc8
commit
8266c126ac
9
funcs.c
9
funcs.c
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/funcs.c,v 1.1 2005/05/23 03:06:07 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/funcs.c,v 1.2 2005/05/23 14:19:13 tg Exp $ */
|
||||
/* $OpenBSD: c_ksh.c,v 1.27 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: c_sh.c,v 1.29 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: c_test.c,v 1.17 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
@ -7,14 +7,13 @@
|
||||
#include "sh.h"
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#if defined(__OpenBSD__)
|
||||
#include <sys/resource.h>
|
||||
#else
|
||||
#include <ctype.h>
|
||||
#if !defined(__OpenBSD__)
|
||||
#include <ulimit.h>
|
||||
#endif
|
||||
#include <ctype.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.1 2005/05/23 03:06:07 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.2 2005/05/23 14:19:13 tg Exp $");
|
||||
|
||||
int
|
||||
c_cd(char **wp)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.3 2005/05/23 12:06:39 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.4 2005/05/23 14:19:14 tg Exp $ */
|
||||
/* $OpenBSD: history.c,v 1.30 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: trap.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.3 2005/05/23 12:06:39 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.4 2005/05/23 14:19:14 tg Exp $");
|
||||
|
||||
static int histfd;
|
||||
static int hsize;
|
||||
@ -975,7 +975,7 @@ mksh_signame(int s)
|
||||
static const struct _mksh_sigpair {
|
||||
int nr;
|
||||
const char *name;
|
||||
} const mksh_sigpair[] = {
|
||||
} mksh_sigpair[] = {
|
||||
#include "signames.inc"
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
13
sh.h
13
sh.h
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/sh.h,v 1.1 2005/05/23 03:06:09 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/sh.h,v 1.2 2005/05/23 14:19:14 tg Exp $ */
|
||||
/* $OpenBSD: sh.h,v 1.27 2005/03/28 21:33:04 deraadt Exp $ */
|
||||
/* $OpenBSD: shf.h,v 1.5 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: table.h,v 1.6 2004/12/18 20:55:52 millert Exp $ */
|
||||
@ -38,10 +38,14 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(__gnu_linux__)
|
||||
#if defined(__gnu_linux__) && !defined(_POSIX_SOURCE)
|
||||
#define _POSIX_SOURCE
|
||||
#endif
|
||||
|
||||
#ifndef __RCSID
|
||||
#define __RCSID(x) static const char __rcsid[] __attribute__((used)) = (x)
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <limits.h>
|
||||
@ -1288,4 +1292,9 @@ extern void tty_close(void);
|
||||
#endif
|
||||
#undef I__
|
||||
|
||||
#if defined(__gnu_linux__)
|
||||
size_t strlcat(char *, const char *, size_t);
|
||||
size_t strlcpy(char *, const char *, size_t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user