summaryrefslogtreecommitdiff
path: root/textproc/wdiff
diff options
context:
space:
mode:
authoritohy <itohy>2003-01-24 14:12:03 +0000
committeritohy <itohy>2003-01-24 14:12:03 +0000
commiteb612e8533cccbe00e34c20955588b4baf6c50c9 (patch)
treefe614457ad56ff498c89349f2419eea651f2665e /textproc/wdiff
parent35b0281705bccb81c8b1f6a32921e1164856a34a (diff)
downloadpkgsrc-eb612e8533cccbe00e34c20955588b4baf6c50c9.tar.gz
- Enable termcap. Chack tputs() after -ltermcap is detected (configure*).
- Use mkstemp() instead of tmpnam(), for safety.
Diffstat (limited to 'textproc/wdiff')
-rw-r--r--textproc/wdiff/distinfo7
-rw-r--r--textproc/wdiff/patches/patch-aa20
-rw-r--r--textproc/wdiff/patches/patch-ab116
-rw-r--r--textproc/wdiff/patches/patch-ac14
-rw-r--r--textproc/wdiff/patches/patch-ad27
-rw-r--r--textproc/wdiff/patches/patch-ae89
6 files changed, 272 insertions, 1 deletions
diff --git a/textproc/wdiff/distinfo b/textproc/wdiff/distinfo
index c780b6cb877..1fa1f0e6bba 100644
--- a/textproc/wdiff/distinfo
+++ b/textproc/wdiff/distinfo
@@ -1,4 +1,9 @@
-$NetBSD: distinfo,v 1.2 2001/04/20 15:05:12 skrll Exp $
+$NetBSD: distinfo,v 1.3 2003/01/24 14:12:03 itohy Exp $
SHA1 (wdiff-0.5.tar.gz) = 44e18850e16518633139cf24a83165e62e3baa95
Size (wdiff-0.5.tar.gz) = 129267 bytes
+SHA1 (patch-aa) = ae9ed3d3f993f5ee2ed22599b9ce5ac7b47be0ab
+SHA1 (patch-ab) = 9c969894e3a5ef8f9454c6577e230ca9d1e06a06
+SHA1 (patch-ac) = 97311dd14a9a47688463ba325aec7874f69887a9
+SHA1 (patch-ad) = 57c285a1fa9d79c543cdc7811255446dba6eaaa1
+SHA1 (patch-ae) = 8889518350ee790575bf24b02ba5c01e6ee76f9e
diff --git a/textproc/wdiff/patches/patch-aa b/textproc/wdiff/patches/patch-aa
new file mode 100644
index 00000000000..4aa693a7c7c
--- /dev/null
+++ b/textproc/wdiff/patches/patch-aa
@@ -0,0 +1,20 @@
+$NetBSD: patch-aa,v 1.1 2003/01/24 14:12:04 itohy Exp $
+
+--- configure.in.orig Sun Nov 6 13:15:50 1994
++++ configure.in Fri Jan 24 22:23:43 2003
+@@ -40,7 +40,6 @@
+ AC_HEADER_STDC
+ AC_TYPE_SIGNAL
+
+-AC_CHECK_FUNCS(strerror tputs)
+ AC_FUNC_ALLOCA
+ test "$ALLOCA" = alloca.o && LIBOBJS="$LIBOBJS xmalloc.o"
+ AC_FUNC_VPRINTF
+@@ -60,6 +59,7 @@
+ AC_MSG_RESULT(no)
+ LIBS="$LIBS -ltermcap"
+ ])
++AC_CHECK_FUNCS(strerror tputs mkstemp)
+
+ AC_MSG_CHECKING(if cbars is wanted)
+ AC_ARG_ENABLE(cbars,
diff --git a/textproc/wdiff/patches/patch-ab b/textproc/wdiff/patches/patch-ab
new file mode 100644
index 00000000000..dac438c53eb
--- /dev/null
+++ b/textproc/wdiff/patches/patch-ab
@@ -0,0 +1,116 @@
+$NetBSD: patch-ab,v 1.1 2003/01/24 14:12:04 itohy Exp $
+
+--- configure.orig Sun Nov 6 16:59:26 1994
++++ configure Fri Jan 24 22:23:42 2003
+@@ -1159,55 +1159,6 @@
+
+
+
+-for ac_func in strerror tputs
+-do
+-echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
+-if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
+- echo $ac_n "(cached) $ac_c" 1>&4
+-else
+- cat > conftest.$ac_ext <<EOF
+-#line 1170 "configure"
+-#include "confdefs.h"
+-#include <ctype.h> /* Arbitrary system header to define __stub macros. */
+-/* Override any gcc2 internal prototype to avoid an error. */
+-char $ac_func();
+-
+-int main() { return 0; }
+-int t() {
+-
+-/* The GNU C library defines this for functions which it implements
+- to always fail with ENOSYS. Some functions are actually named
+- something starting with __ and the normal name is an alias. */
+-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+-choke me
+-#else
+-$ac_func();
+-#endif
+-
+-; return 0; }
+-EOF
+-if eval $ac_link; then
+- rm -rf conftest*
+- eval "ac_cv_func_$ac_func=yes"
+-else
+- rm -rf conftest*
+- eval "ac_cv_func_$ac_func=no"
+-fi
+-rm -f conftest*
+-
+-fi
+-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+- echo "$ac_t""yes" 1>&4
+- ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
+- cat >> confdefs.h <<EOF
+-#define $ac_tr_func 1
+-EOF
+-
+-else
+- echo "$ac_t""no" 1>&4
+-fi
+-done
+-
+ # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+ # for constant arguments. Useless!
+ echo $ac_n "checking for working alloca.h""... $ac_c" 1>&4
+@@ -1712,6 +1663,55 @@
+
+ fi
+ rm -f conftest*
++
++for ac_func in strerror tputs mkstemp
++do
++echo $ac_n "checking for $ac_func""... $ac_c" 1>&4
++if eval "test \"`echo '${'ac_cv_func_$ac_func'+set}'`\" = set"; then
++ echo $ac_n "(cached) $ac_c" 1>&4
++else
++ cat > conftest.$ac_ext <<EOF
++#line 1170 "configure"
++#include "confdefs.h"
++#include <ctype.h> /* Arbitrary system header to define __stub macros. */
++/* Override any gcc2 internal prototype to avoid an error. */
++char $ac_func();
++
++int main() { return 0; }
++int t() {
++
++/* The GNU C library defines this for functions which it implements
++ to always fail with ENOSYS. Some functions are actually named
++ something starting with __ and the normal name is an alias. */
++#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
++choke me
++#else
++$ac_func();
++#endif
++
++; return 0; }
++EOF
++if eval $ac_link; then
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=yes"
++else
++ rm -rf conftest*
++ eval "ac_cv_func_$ac_func=no"
++fi
++rm -f conftest*
++
++fi
++if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
++ echo "$ac_t""yes" 1>&4
++ ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
++ cat >> confdefs.h <<EOF
++#define $ac_tr_func 1
++EOF
++
++else
++ echo "$ac_t""no" 1>&4
++fi
++done
+
+
+ echo $ac_n "checking if cbars is wanted""... $ac_c" 1>&4
diff --git a/textproc/wdiff/patches/patch-ac b/textproc/wdiff/patches/patch-ac
new file mode 100644
index 00000000000..993e96951ce
--- /dev/null
+++ b/textproc/wdiff/patches/patch-ac
@@ -0,0 +1,14 @@
+$NetBSD: patch-ac,v 1.1 2003/01/24 14:12:04 itohy Exp $
+
+--- config.h.in.orig Wed Nov 2 02:23:02 1994
++++ config.h.in Fri Jan 24 22:30:16 2003
+@@ -79,6 +79,9 @@
+ /* Define if you have the tputs function. */
+ #undef HAVE_TPUTS
+
++/* Define if you have the mkstemp function. */
++#undef HAVE_MKSTEMP
++
+ /* Define if you have the <string.h> header file. */
+ #undef HAVE_STRING_H
+
diff --git a/textproc/wdiff/patches/patch-ad b/textproc/wdiff/patches/patch-ad
new file mode 100644
index 00000000000..814131b9e26
--- /dev/null
+++ b/textproc/wdiff/patches/patch-ad
@@ -0,0 +1,27 @@
+$NetBSD: patch-ad,v 1.1 2003/01/24 14:12:04 itohy Exp $
+
+--- Makefile.in.orig Sun Nov 6 16:45:13 1994
++++ Makefile.in Fri Jan 24 22:33:44 2003
+@@ -194,17 +194,17 @@
+ CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status
+ config.status: configure
+ ./config.status --recheck
+-configure: configure.in aclocal.m4
+- cd $(srcdir) && autoconf
++#configure: configure.in aclocal.m4
++# cd $(srcdir) && autoconf
+
+ config.h: stamp-h
+ stamp-h: config.h.in config.status
+ CONFIG_FILES= CONFIG_HEADERS=config.h ./config.status
+ date > stamp-h
+ config.h.in: stamp-h.in
+-stamp-h.in: configure.in aclocal.m4 acconfig.h
+- cd $(srcdir) && autoheader
+- date > $(srcdir)/stamp-h.in
++#stamp-h.in: configure.in aclocal.m4 acconfig.h
++# cd $(srcdir) && autoheader
++# date > $(srcdir)/stamp-h.in
+
+ # Tell versions [3.59,3.63) of GNU make not to export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/textproc/wdiff/patches/patch-ae b/textproc/wdiff/patches/patch-ae
new file mode 100644
index 00000000000..6fe3e7bfb90
--- /dev/null
+++ b/textproc/wdiff/patches/patch-ae
@@ -0,0 +1,89 @@
+$NetBSD: patch-ae,v 1.1 2003/01/24 14:12:04 itohy Exp $
+
+--- wdiff.c.orig Sun Nov 6 16:57:23 1994
++++ wdiff.c Fri Jan 24 22:41:01 2003
+@@ -168,6 +168,10 @@
+ # define L_tmpnam PATH_MAX
+ #endif
+
++#ifdef HAVE_MKSTEMP
++# define MKSTEMP_TEMPLATE "/tmp/wdiffXXXXXXXX"
++#endif
++
+ typedef struct side SIDE; /* all variables for one side */
+ struct side
+ {
+@@ -555,6 +559,9 @@
+ split_file_into_words (SIDE *side)
+ {
+ struct stat stat_buffer; /* for checking if file is directory */
++#ifdef HAVE_MKSTEMP
++ int fd;
++#endif
+
+ /* Open files. */
+
+@@ -566,10 +573,23 @@
+ this temporary local file. Once done, prepare it for reading.
+ We do not need the file name itself anymore. */
+
++#ifdef HAVE_MKSTEMP
++ strcpy (side->temp_name, MKSTEMP_TEMPLATE);
++ if ((fd = mkstemp(side->temp_name)) < 0)
++ error (EXIT_OTHER_REASON, 0, "mkstemp failed");
++ side->file = fdopen (fd, "w+");
++ if (side->file == NULL)
++ {
++ int e = errno;
++ (void) unlink (side->temp_name);
++ error (EXIT_OTHER_REASON, e, side->temp_name);
++ }
++#else
+ tmpnam (side->temp_name);
+ side->file = fopen (side->temp_name, "w+");
+ if (side->file == NULL)
+ error (EXIT_OTHER_REASON, errno, side->temp_name);
++#endif
+ if (unlink (side->temp_name) != 0)
+ error (EXIT_OTHER_REASON, errno, side->temp_name);
+ while (side->character = getchar (), side->character != EOF)
+@@ -593,10 +613,23 @@
+ side->character = getc (side->file);
+ side->position = 0;
+
++#ifdef HAVE_MKSTEMP
++ strcpy (side->temp_name, MKSTEMP_TEMPLATE);
++ if ((fd = mkstemp(side->temp_name)) < 0)
++ error (EXIT_OTHER_REASON, 0, "mkstemp failed");
++ side->temp_file = fdopen (fd, "w");
++ if (side->temp_file == NULL)
++ {
++ int e = errno;
++ (void) unlink (side->temp_name);
++ error (EXIT_OTHER_REASON, e, side->temp_name);
++ }
++#else
+ tmpnam (side->temp_name);
+ side->temp_file = fopen (side->temp_name, "w");
+ if (side->temp_file == NULL)
+ error (EXIT_OTHER_REASON, errno, side->temp_name);
++#endif
+
+ /* Complete splitting input file into words on output. */
+
+@@ -1135,7 +1168,7 @@
+ | Main program. |
+ `---------------*/
+
+-void
++int
+ main (int argc, char *const argv[])
+ {
+ int option_char; /* option character */
+@@ -1329,5 +1362,5 @@
+ || count_changed_left || count_changed_right)
+ exit (EXIT_ANY_DIFFERENCE);
+
+- exit (EXIT_NO_DIFFERENCES);
++ return EXIT_NO_DIFFERENCES;
+ }