diff options
author | Ruslan Ermilov <ru@FreeBSD.org> | 2004-12-06 11:26:33 +0000 |
---|---|---|
committer | Ruslan Ermilov <ru@FreeBSD.org> | 2004-12-06 11:26:33 +0000 |
commit | d45ba9f4a2f536a4e296925cf83e08b9b422b671 (patch) | |
tree | d78bad7000cf40a053208f6921d232baa5215a2e | |
parent | e73d3f5b4f15a870b77748399fe0e0d51f91c1fa (diff) |
Fixed to work on amd64.
Notes
Notes:
svn path=/head/; revision=123307
-rw-r--r-- | misc/deco/Makefile | 2 | ||||
-rw-r--r-- | misc/deco/files/patch-cmd.c | 86 | ||||
-rw-r--r-- | misc/deco/files/patch-run.c | 26 |
3 files changed, 113 insertions, 1 deletions
diff --git a/misc/deco/Makefile b/misc/deco/Makefile index 5754b9ef7c9e..420515ae44b8 100644 --- a/misc/deco/Makefile +++ b/misc/deco/Makefile @@ -7,7 +7,7 @@ PORTNAME= deco PORTVERSION= 3.9 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= misc MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= ${PORTNAME} diff --git a/misc/deco/files/patch-cmd.c b/misc/deco/files/patch-cmd.c new file mode 100644 index 000000000000..264e9720f05d --- /dev/null +++ b/misc/deco/files/patch-cmd.c @@ -0,0 +1,86 @@ +--- cmd.c Wed Mar 7 20:38:30 2001 ++++ cmd.c Mon Dec 6 13:16:58 2004 +@@ -452,7 +452,7 @@ + VClear (); + VSync (); + VRestore (); +- runl (0, ABSSHELL, SHELL, "-i", 0); ++ runl (0, ABSSHELL, SHELL, "-i", NULL); + VReopen (); + VClear (); + setdir (cur == &left ? &right : &left, 0); +@@ -551,7 +551,7 @@ + error ("%s is a directory", buf); + return; + } +- if (runl (1, "/bin/cp", "cp", "-f", "-p", p->name, name, 0)) { ++ if (runl (1, "/bin/cp", "cp", "-f", "-p", p->name, name, NULL)) { + error ("Cannot copy %s to %s", p->name, name); + return; + } +@@ -624,7 +624,7 @@ + error ("%s is a directory", buf); + return; + } +- if (runl (1, "/bin/ln", "ln", "-f", p->name, name, 0)) { ++ if (runl (1, "/bin/ln", "ln", "-f", p->name, name, NULL)) { + error ("Cannot link %s to %s", p->name, name); + return; + } +@@ -698,7 +698,7 @@ + error ("%s is a directory", buf); + return; + } +- if (runl (1, "/bin/ln", "ln", "-s", "-f", p->name, name, 0)) { ++ if (runl (1, "/bin/ln", "ln", "-s", "-f", p->name, name, NULL)) { + error ("Cannot symlink %s to %s", p->name, name); + return; + } +@@ -779,7 +779,7 @@ + error ("Directory %s exists", buf); + return; + } +- if (runl (1, "/bin/mv", "mv", "-f", p->name, name, 0)) { ++ if (runl (1, "/bin/mv", "mv", "-f", p->name, name, NULL)) { + error ("Cannot move %s to %s", p->name, name); + return; + } +@@ -801,7 +801,7 @@ + error ("%s is a directory", buf); + return; + } +- if (runl (1, "/bin/mv", "mv", "-f", p->name, name, 0)) { ++ if (runl (1, "/bin/mv", "mv", "-f", p->name, name, NULL)) { + error ("Cannot move %s to %s", p->name, name); + return; + } +@@ -827,7 +827,7 @@ + error ("Directory %s already exists", p); + break; + case 0: +- if (runl (1, "/bin/mkdir", "mkdir", p, 0)) { ++ if (runl (1, "/bin/mkdir", "mkdir", p, NULL)) { + error ("Cannot create directory %s", p); + break; + } +@@ -863,7 +863,7 @@ + if (getchoice (0, " Delete ", "Do you wish to delete directory", + p->name, " Delete ", " Cancel ", 0)) + return; +- if (runl (1, "/bin/rmdir", "rmdir", p->name, 0)) { ++ if (runl (1, "/bin/rmdir", "rmdir", p->name, NULL)) { + error ("Cannot delete directory %s", p->name); + return; + } +@@ -1037,9 +1037,9 @@ + + if (metas (s)) { + if (usecshell) +- runl (0, cshabsname, cshname, "-f", "-c", s, 0); ++ runl (0, cshabsname, cshname, "-f", "-c", s, NULL); + else +- runl (0, shabsname, shname, "-c", s, 0); ++ runl (0, shabsname, shname, "-c", s, NULL); + return; + } + status = doexec (s); diff --git a/misc/deco/files/patch-run.c b/misc/deco/files/patch-run.c new file mode 100644 index 000000000000..0f2fcd6a7360 --- /dev/null +++ b/misc/deco/files/patch-run.c @@ -0,0 +1,26 @@ +--- run.c Wed Mar 7 19:37:47 2001 ++++ run.c Sun Dec 5 22:51:12 2004 +@@ -136,10 +136,22 @@ + { + va_list ap; + int err; ++ char **argv, **argp; ++ int argc; + ++ argc = 1; + va_start (ap, name); +- err = run (name, ap, execve, silent); ++ while (va_arg (ap, char *) != NULL) ++ argc++; + va_end (ap); ++ argv = (char **) malloc (argc * sizeof (char *)); ++ argp = argv; ++ va_start (ap, name); ++ while ((*argp++ = va_arg (ap, char *)) != NULL); ++ *argp = NULL; ++ va_end (ap); ++ err = run (name, argv, execve, silent); ++ free (argv); + return err; + } + |