pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/print/teTeX-bin Avoid using "union wait" in calling wa...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/8246ddaea01a
branches:  trunk
changeset: 481713:8246ddaea01a
user:      minskim <minskim%pkgsrc.org@localhost>
date:      Mon Oct 11 04:54:05 2004 +0000

description:
Avoid using "union wait" in calling wait(2) if possible.  Fall back to
"union wait" only when sys/wait.h is not POSIX-compliant.

diffstat:

 print/teTeX-bin/distinfo         |    6 +-
 print/teTeX-bin/patches/patch-aa |   14 +++
 print/teTeX-bin/patches/patch-ab |  178 +++++++++++++++++++++++++++++++++++++++
 print/teTeX-bin/patches/patch-ae |   12 ++
 print/teTeX-bin/patches/patch-af |   36 +++++++
 5 files changed, 245 insertions(+), 1 deletions(-)

diffs (273 lines):

diff -r fb7fe6bb7222 -r 8246ddaea01a print/teTeX-bin/distinfo
--- a/print/teTeX-bin/distinfo  Sun Oct 10 21:30:23 2004 +0000
+++ b/print/teTeX-bin/distinfo  Mon Oct 11 04:54:05 2004 +0000
@@ -1,8 +1,12 @@
-$NetBSD: distinfo,v 1.4 2003/12/24 12:51:31 jmmv Exp $
+$NetBSD: distinfo,v 1.5 2004/10/11 04:54:05 minskim Exp $
 
 SHA1 (teTeX/tetex-src-2.0.2.tar.gz) = 6445206b14d659458ee352df78d2c2daf8e88ab3
 Size (teTeX/tetex-src-2.0.2.tar.gz) = 11745933 bytes
+SHA1 (patch-aa) = 77feabef32c612ac5d0250b1e4db50a3fc497990
+SHA1 (patch-ab) = 964e7e09867b605db6e448226b04dd7d63551dfa
 SHA1 (patch-ac) = 7e96a7a14090a6b3009d3562b18ee8383d50d3e0
 SHA1 (patch-ad) = 377f52b45ea66b88f682aaa7f0dd72dee8f986fb
+SHA1 (patch-ae) = 68825699db129b82f476c37ba3b6e20a8831ad6e
+SHA1 (patch-af) = d5fd0e1b30b1ea9fd96fe5983088df5a723f04b7
 SHA1 (patch-ap) = 40543e9a2fb87d296557f3a8bd9a7207b2331a8e
 SHA1 (patch-aq) = f90ed07b2de340c55c6d987fdaa59d7ed6d46e0f
diff -r fb7fe6bb7222 -r 8246ddaea01a print/teTeX-bin/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/teTeX-bin/patches/patch-aa  Mon Oct 11 04:54:05 2004 +0000
@@ -0,0 +1,14 @@
+$NetBSD: patch-aa,v 1.4 2004/10/11 04:54:05 minskim Exp $
+
+--- texk/configure.in.orig     Mon Jan 13 11:32:40 2003
++++ texk/configure.in
+@@ -29,6 +29,9 @@ dnl Pass this down from the top level so
+ dnl install kpathsea a command line value is propagated.
+ AC_PROG_INSTALL
+ 
++AC_CONFIG_HEADER(ac_config.h)
++AC_HEADER_SYS_WAIT
++
+ dnl If the other programs ever acquire their own --with or --enable
+ dnl options, they must be added, so configure --help at the top level
+ dnl will show all the options.
diff -r fb7fe6bb7222 -r 8246ddaea01a print/teTeX-bin/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/teTeX-bin/patches/patch-ab  Mon Oct 11 04:54:05 2004 +0000
@@ -0,0 +1,178 @@
+$NetBSD: patch-ab,v 1.4 2004/10/11 04:54:05 minskim Exp $
+
+--- texk/configure.orig        Mon Feb 17 22:12:51 2003
++++ texk/configure
+@@ -1082,6 +1082,50 @@ test -z "$INSTALL_DATA" && INSTALL_DATA=
+ 
+ 
+ 
++echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
++echo "configure:1070: checking for sys/wait.h that is POSIX.1 compatible" >&5
++if eval "test \"`echo '$''{'ac_cv_header_sys_wait_h'+set}'`\" = set"; then
++  echo $ac_n "(cached) $ac_c" 1>&6
++else
++  cat > conftest.$ac_ext <<EOF
++#line 1075 "configure"
++#include "confdefs.h"
++#include <sys/types.h>
++#include <sys/wait.h>
++#ifndef WEXITSTATUS
++#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
++#endif
++#ifndef WIFEXITED
++#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
++#endif
++int main() {
++int s;
++wait (&s);
++s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
++; return 0; }
++EOF
++if { (eval echo configure:1091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
++  rm -rf conftest*
++  ac_cv_header_sys_wait_h=yes
++else
++  echo "configure: failed program was:" >&5
++  cat conftest.$ac_ext >&5
++  rm -rf conftest*
++  ac_cv_header_sys_wait_h=no
++fi
++rm -f conftest*
++fi
++
++echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
++if test $ac_cv_header_sys_wait_h = yes; then
++  cat >> confdefs.h <<\EOF
++#define HAVE_SYS_WAIT_H 1
++EOF
++
++fi
++
++
++
+ 
+ # Check whether --with-bibtex8 or --without-bibtex8 was given.
+ if test "${with_bibtex8+set}" = set; then
+@@ -2010,7 +2054,7 @@ done
+ ac_given_srcdir=$srcdir
+ ac_given_INSTALL="$INSTALL"
+ 
+-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
++trap 'rm -fr `echo "Makefile ac_config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
+ 
+@@ -2199,6 +2243,113 @@ s%@INSTALL@%$INSTALL%g
+ " | (eval "$ac_sed_cmds") > $ac_file
+ fi; done
+ rm -f conftest.s*
++
++# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
++# NAME is the cpp macro being defined and VALUE is the value it is being given.
++#
++# ac_d sets the value in "#define NAME VALUE" lines.
++ac_dA='s%^\([         ]*\)#\([        ]*define[       ][      ]*\)'
++ac_dB='\([    ][      ]*\)[^  ]*%\1#\2'
++ac_dC='\3'
++ac_dD='%g'
++# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
++ac_uA='s%^\([         ]*\)#\([        ]*\)undef\([    ][      ]*\)'
++ac_uB='\([    ]\)%\1#\2define\3'
++ac_uC=' '
++ac_uD='\4%g'
++# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
++ac_eA='s%^\([         ]*\)#\([        ]*\)undef\([    ][      ]*\)'
++ac_eB='$%\1#\2define\3'
++ac_eC=' '
++ac_eD='%g'
++
++if test "${CONFIG_HEADERS+set}" != set; then
++EOF
++cat >> $CONFIG_STATUS <<EOF
++  CONFIG_HEADERS="ac_config.h"
++EOF
++cat >> $CONFIG_STATUS <<\EOF
++fi
++for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
++  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
++  case "$ac_file" in
++  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
++       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
++  *) ac_file_in="${ac_file}.in" ;;
++  esac
++
++  echo creating $ac_file
++
++  rm -f conftest.frag conftest.in conftest.out
++  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
++  cat $ac_file_inputs > conftest.in
++
++EOF
++
++# Transform confdefs.h into a sed script conftest.vals that substitutes
++# the proper values into ac_config.h.in to produce ac_config.h.  And first:
++# Protect against being on the right side of a sed subst in config.status.
++# Protect against being in an unquoted here document in config.status.
++rm -f conftest.vals
++cat > conftest.hdr <<\EOF
++s/[\\&%]/\\&/g
++s%[\\$`]%\\&%g
++s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
++s%ac_d%ac_u%gp
++s%ac_u%ac_e%gp
++EOF
++sed -n -f conftest.hdr confdefs.h > conftest.vals
++rm -f conftest.hdr
++
++# This sed command replaces #undef with comments.  This is necessary, for
++# example, in the case of _POSIX_SOURCE, which is predefined and required
++# on some systems where configure will not decide to define it.
++cat >> conftest.vals <<\EOF
++s%^[  ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
++EOF
++
++# Break up conftest.vals because some shells have a limit on
++# the size of here documents, and old seds have small limits too.
++
++rm -f conftest.tail
++while :
++do
++  ac_lines=`grep -c . conftest.vals`
++  # grep -c gives empty output for an empty file on some AIX systems.
++  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
++  # Write a limited-size here document to conftest.frag.
++  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
++  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
++  echo 'CEOF
++  sed -f conftest.frag conftest.in > conftest.out
++  rm -f conftest.in
++  mv conftest.out conftest.in
++' >> $CONFIG_STATUS
++  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
++  rm -f conftest.vals
++  mv conftest.tail conftest.vals
++done
++rm -f conftest.vals
++
++cat >> $CONFIG_STATUS <<\EOF
++  rm -f conftest.frag conftest.h
++  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
++  cat conftest.in >> conftest.h
++  rm -f conftest.in
++  if cmp -s $ac_file conftest.h 2>/dev/null; then
++    echo "$ac_file is unchanged"
++    rm -f conftest.h
++  else
++    # Remove last slash and all that follows it.  Not all systems have dirname.
++      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
++      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
++      # The file is in a subdirectory.
++      test ! -d "$ac_dir" && mkdir "$ac_dir"
++    fi
++    rm -f $ac_file
++    mv conftest.h $ac_file
++  fi
++fi; done
+ 
+ EOF
+ cat >> $CONFIG_STATUS <<EOF
diff -r fb7fe6bb7222 -r 8246ddaea01a print/teTeX-bin/patches/patch-ae
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/teTeX-bin/patches/patch-ae  Mon Oct 11 04:54:05 2004 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ae,v 1.3 2004/10/11 04:54:05 minskim Exp $
+
+--- texk/ac_config.h.in.orig   Sun Oct 10 22:15:08 2004
++++ texk/ac_config.h.in
+@@ -0,0 +1,7 @@
++/* ac_config.h.in.  Generated automatically from configure.in by autoheader.  */
++
++/* Define if you have <sys/wait.h> that is POSIX.1 compatible.  */
++#undef HAVE_SYS_WAIT_H
++
++/* Define if you need to in order for stat and other things to work.  */
++#undef _POSIX_SOURCE
diff -r fb7fe6bb7222 -r 8246ddaea01a print/teTeX-bin/patches/patch-af
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/print/teTeX-bin/patches/patch-af  Mon Oct 11 04:54:05 2004 +0000
@@ -0,0 +1,36 @@
+$NetBSD: patch-af,v 1.3 2004/10/11 04:54:05 minskim Exp $
+
+--- texk/web2c/lib/coredump.c.orig     Thu Jan 16 13:51:12 1997
++++ texk/web2c/lib/coredump.c
+@@ -9,6 +9,7 @@
+    you.  Perl has some things to say about these days.  */
+ 
+ #include "config.h"
++#include "ac_config.h"
+ 
+ /* Do not try to compile this Unix-y unportable stuff unless it's needed.  */
+ 
+@@ -29,7 +30,11 @@ funny_core_dump P1H(void)
+   }
+ #else /* !__EMX__ */
+   int pid, w;
++#ifdef HAVE_SYS_WAIT_H
++  int status;
++#else
+   union wait status;
++#endif
+ 
+   switch (pid = fork ())
+     {
+@@ -48,7 +53,11 @@ funny_core_dump P1H(void)
+     default:          /* parent */
+       while ((w = wait (&status)) != pid && w != -1)
+       ;
++#ifdef HAVE_SYS_WAIT_H
++      if (WCOREDUMP(status))
++#else
+       if (status.w_coredump)
++#endif
+       exit (0);
+       (void) write (2, "attempt to dump core failed\n", 28);
+       exit (1);



Home | Main Index | Thread Index | Old Index