fix name clash with openlog(3) and sync patches

This commit is contained in:
naddy 2009-03-26 18:25:28 +00:00
parent 64a30eb044
commit f4f099a01e
5 changed files with 41 additions and 17 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.21 2007/09/15 23:54:17 merdely Exp $
# $OpenBSD: Makefile,v 1.22 2009/03/26 18:25:28 naddy Exp $
COMMENT= Unix menuing shell
DISTNAME= mshell
PKGNAME= mshell-1.0
PKGNAME= mshell-1.0p0
CATEGORIES= misc
MASTER_SITES= ${MASTER_SITE_BACKUP}

View File

@ -0,0 +1,21 @@
$OpenBSD: patch-main_c,v 1.1 2009/03/26 18:25:28 naddy Exp $
--- main.c.orig Thu Mar 26 12:20:24 2009
+++ main.c Thu Mar 26 12:20:40 2009
@@ -62,7 +62,7 @@ char ** argv;
set_resource_limits();
rc();
- openlog();
+ open_log();
load_macrofile(GLOBAL_MACRO_FILE);
load_macrofile(".mshellmac");
@@ -86,7 +86,7 @@ rc()
#endif
FILE *logfp;
-openlog()
+open_log()
{
struct passwd *pw;
char fn[32];

View File

@ -1,16 +1,18 @@
$OpenBSD: patch-mshell_c,v 1.1 2002/12/23 07:42:00 pvalchev Exp $
--- mshell.c.orig Sun Dec 22 23:47:32 2002
+++ mshell.c Sun Dec 22 23:47:32 2002
@@ -1,6 +1,8 @@
$OpenBSD: patch-mshell_c,v 1.2 2009/03/26 18:25:28 naddy Exp $
--- mshell.c.orig Thu Mar 26 12:17:55 2009
+++ mshell.c Thu Mar 26 12:18:03 2009
@@ -1,8 +1,10 @@
#include "mshell.h"
#include <setjmp.h>
-char * index ();
+
+#include <stdlib.h>
+#include <string.h>
+
extern char G_homevar [];
extern char G_uservar [];
extern char G_termvar [];
@@ -26,8 +28,7 @@ char *m;
exec_string [DESCLEN],
*args [MAXARGS],

View File

@ -1,6 +1,6 @@
$OpenBSD: patch-settatr_c,v 1.1 2002/12/23 07:42:00 pvalchev Exp $
--- settatr.c.orig Sun Dec 22 23:47:32 2002
+++ settatr.c Sun Dec 22 23:47:32 2002
$OpenBSD: patch-settatr_c,v 1.2 2009/03/26 18:25:28 naddy Exp $
--- settatr.c.orig Thu Mar 26 12:17:56 2009
+++ settatr.c Thu Mar 26 12:18:04 2009
@@ -15,7 +15,7 @@ set_terminal_attributes()
ioctl ( 0, TIOCGETP, &sg );
if (access(".stty", 0) == -1) { /* not already set up */

View File

@ -1,12 +1,12 @@
$OpenBSD: patch-string_c,v 1.2 2004/01/02 22:12:55 espie Exp $
--- string.c.orig 2004-01-02 23:06:35.000000000 +0100
+++ string.c 2004-01-02 23:07:59.000000000 +0100
@@ -4,6 +4,19 @@
$OpenBSD: patch-string_c,v 1.3 2009/03/26 18:25:28 naddy Exp $
--- string.c.orig Thu Mar 26 12:17:56 2009
+++ string.c Thu Mar 26 12:18:04 2009
@@ -4,7 +4,20 @@
#define strchr index
#endif
+char *strsave(char *);
+
+char *
+gets (char *s)
+{
@ -18,9 +18,10 @@ $OpenBSD: patch-string_c,v 1.2 2004/01/02 22:12:55 espie Exp $
+ }
+ return x;
+}
+
/* function to find the position of sub_string in main_string
* ---------------------------------------------------------- */
@@ -260,7 +273,6 @@ char *string;
/* if it has a multi-command delim, save rest for next time */
#define MULTI_CMD_DELIM ','