From f4f099a01e137286beb14b3f52d0ed992352e18f Mon Sep 17 00:00:00 2001 From: naddy Date: Thu, 26 Mar 2009 18:25:28 +0000 Subject: [PATCH] fix name clash with openlog(3) and sync patches --- misc/mshell/Makefile | 4 ++-- misc/mshell/patches/patch-main_c | 21 +++++++++++++++++++++ misc/mshell/patches/patch-mshell_c | 14 ++++++++------ misc/mshell/patches/patch-settatr_c | 6 +++--- misc/mshell/patches/patch-string_c | 13 +++++++------ 5 files changed, 41 insertions(+), 17 deletions(-) create mode 100644 misc/mshell/patches/patch-main_c diff --git a/misc/mshell/Makefile b/misc/mshell/Makefile index b6023275cf6..5710c36f264 100644 --- a/misc/mshell/Makefile +++ b/misc/mshell/Makefile @@ -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} diff --git a/misc/mshell/patches/patch-main_c b/misc/mshell/patches/patch-main_c new file mode 100644 index 00000000000..c6cd16cebdf --- /dev/null +++ b/misc/mshell/patches/patch-main_c @@ -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]; diff --git a/misc/mshell/patches/patch-mshell_c b/misc/mshell/patches/patch-mshell_c index 44f98b57acf..60c7556b608 100644 --- a/misc/mshell/patches/patch-mshell_c +++ b/misc/mshell/patches/patch-mshell_c @@ -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 -char * index (); -+ + +#include +#include - ++ extern char G_homevar []; + extern char G_uservar []; + extern char G_termvar []; @@ -26,8 +28,7 @@ char *m; exec_string [DESCLEN], *args [MAXARGS], diff --git a/misc/mshell/patches/patch-settatr_c b/misc/mshell/patches/patch-settatr_c index e50d38e1c95..ba739e143d9 100644 --- a/misc/mshell/patches/patch-settatr_c +++ b/misc/mshell/patches/patch-settatr_c @@ -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 */ diff --git a/misc/mshell/patches/patch-string_c b/misc/mshell/patches/patch-string_c index 70852aca702..300d0670fd5 100644 --- a/misc/mshell/patches/patch-string_c +++ b/misc/mshell/patches/patch-string_c @@ -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 ','