Dash:
[t2-trunk.git] / package / base / mmv / qd-fix.patch
blob62ed586f77dc20e086556b9ed40cf76fb588e723
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
3 #
4 # T2 SDE: package/.../mmv/qd-fix.patch
5 # Copyright (C) 2004 - 2005 The T2 SDE Project
6 # Copyright (C) 1998 - 2003 ROCK Linux Project
7 #
8 # More information can be found in the files COPYING and README.
9 #
10 # This patch file is dual-licensed. It is available under the license the
11 # patched project is licensed under, as long as it is an OpenSource license
12 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
13 # of the GNU General Public License as published by the Free Software
14 # Foundation; either version 2 of the License, or (at your option) any later
15 # version.
16 # --- T2-COPYRIGHT-NOTE-END ---
18 --- ./mmv.c.orig Mon Oct 25 11:29:39 1993
19 +++ ./mmv.c Sat Mar 24 04:10:46 2001
20 @@ -126,7 +126,7 @@
22 extern char *getenv();
23 extern long lseek();
24 -extern char *malloc();
25 +extern void *malloc();
27 #ifdef HAS_DIRENT
28 #include <dirent.h>
29 @@ -390,7 +390,7 @@
30 static int snap(/* REP *first, REP *p */);
31 static void showdone(/* REP *fin */);
32 static void breakout(/* */);
33 -static int breakrep(/* */);
34 +static __sighandler_t breakrep(/* */);
35 static void breakstat(/* */);
36 static void quit(/* */);
37 static int copymove(/* REP *p */);
38 @@ -436,7 +436,7 @@
39 static SLICER slicer[2] = {{NULL, NULL, 0}, {NULL, NULL, 0}};
41 static int badreps = 0, paterr = 0, direrr, failed = 0, gotsig = 0, repbad;
42 -static FILE *outfile = stdout;
43 +static FILE *outfile;
45 static char IDF[] = "$$mmvdid.";
46 static char TEMP[] = "$$mmvtmp.";
47 @@ -497,6 +497,7 @@
49 char *frompat, *topat;
51 + outfile = stdout;
52 init();
53 procargs(argc, argv, &frompat, &topat);
54 domatch(frompat, topat);
55 @@ -2383,7 +2384,7 @@
56 #ifdef IS_MSDOS
57 ctrlbrk(breakrep);
58 #else
59 - signal(SIGINT, breakrep);
60 + signal(SIGINT, (void(*)(int))breakrep);
61 #endif
63 for (first = hrep.r_next, k = 0; first != NULL; first = first->r_next) {
64 @@ -2578,10 +2579,10 @@
68 -static int breakrep()
69 +static __sighandler_t breakrep()
71 gotsig = 1;
72 - return(1);
73 + return(SIG_IGN);
77 --- ./Makefile.orig Mon Oct 25 11:35:35 1993
78 +++ ./Makefile Sat Mar 24 04:05:06 2001
79 @@ -1,22 +1,20 @@
80 # Possible defines in CONF:
81 # IS_MSDOS IS_SYSV IS_V7 IS_BSD HAS_DIRENT HAS_RENAME MV_DIR
83 -CC =gcc -traditional
84 +CC =gcc
85 LD =$(CC)
86 CONF =-DIS_SYSV -DHAS_DIRENT -DHAS_RENAME
87 -CFLAGS =-O2 -m486 $(CONF)
88 -LDFLAGS =-s -N
89 +CFLAGS =-O2 $(CONF)
90 +LDFLAGS =
92 -IBIN =$(LOCAL)$(ARCH)/bin
93 -IMAN =$(LOCAL)$(ANY)/man
94 +BINDIR = /usr/bin
95 +MANDIR = /usr/share/man/man1/
97 mmv: mmv.o
99 clean:
100 rm -f mmv mmv.o
102 -install: $(DEST)$(IBIN)/mmv
103 -install: $(DEST)$(IMAN)/man1/mmv.1
105 -$(DEST)$(IBIN)/mmv: mmv; cp $? $@
106 -$(DEST)$(IMAN)/man1/mmv.1: mmv.1; cp $? $@
107 +install: mmv
108 + install -s mmv $(BINDIR)
109 + cp mmv.1 $(MANDIR)