Thu Feb 21 16:50:08 2008 UTC ()
libnbcompat-20080221:
- Use AC_FUNC_VFORK, needed on IRIX to get missing vfork() defined
  to fork(). Ok by joerg.


(tnn)
diff -r1.56 -r1.57 pkgsrc/pkgtools/libnbcompat/Makefile
diff -r1.57 -r1.58 pkgsrc/pkgtools/libnbcompat/files/configure
diff -r1.58 -r1.59 pkgsrc/pkgtools/libnbcompat/files/configure.ac
diff -r1.19 -r1.20 pkgsrc/pkgtools/libnbcompat/files/nbcompat/config.h.in

cvs diff -r1.56 -r1.57 pkgsrc/pkgtools/libnbcompat/Makefile (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/Makefile 2008/02/12 13:43:23 1.56
+++ pkgsrc/pkgtools/libnbcompat/Makefile 2008/02/21 16:50:07 1.57
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1# $NetBSD: Makefile,v 1.56 2008/02/12 13:43:23 joerg Exp $ 1# $NetBSD: Makefile,v 1.57 2008/02/21 16:50:07 tnn Exp $
2# 2#
3# NOTE: If you update this package, it is *mandatory* that you update 3# NOTE: If you update this package, it is *mandatory* that you update
4# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual 4# pkgsrc/pkgtools/libnbcompat/files/README to reflect the actual
5# list of tested and supported platforms. 5# list of tested and supported platforms.
6# 6#
7 7
8DISTNAME= libnbcompat-20080212 8DISTNAME= libnbcompat-20080221
9CATEGORIES= pkgtools devel 9CATEGORIES= pkgtools devel
10MASTER_SITES= # empty 10MASTER_SITES= # empty
11DISTFILES= # empty 11DISTFILES= # empty
12 12
13MAINTAINER= grant@NetBSD.org 13MAINTAINER= grant@NetBSD.org
14HOMEPAGE= http://www.NetBSD.org/ 14HOMEPAGE= http://www.NetBSD.org/
15COMMENT= Portable NetBSD compatibility library 15COMMENT= Portable NetBSD compatibility library
16 16
17NO_PKGTOOLS_REQD_CHECK= yes 17NO_PKGTOOLS_REQD_CHECK= yes
18NO_CHECKSUM= yes 18NO_CHECKSUM= yes
19NO_MTREE= yes 19NO_MTREE= yes
20 20
21GNU_CONFIGURE= yes 21GNU_CONFIGURE= yes

cvs diff -r1.57 -r1.58 pkgsrc/pkgtools/libnbcompat/files/configure (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/files/configure 2007/09/21 19:51:58 1.57
+++ pkgsrc/pkgtools/libnbcompat/files/configure 2008/02/21 16:50:08 1.58
@@ -8779,26 +8779,580 @@ fi @@ -8779,26 +8779,580 @@ fi
8779 fi 8779 fi
8780 8780
8781fi 8781fi
8782{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5 8782{ echo "$as_me:$LINENO: result: $ac_cv_func_strerror_r_char_p" >&5
8783echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; } 8783echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6; }
8784if test $ac_cv_func_strerror_r_char_p = yes; then 8784if test $ac_cv_func_strerror_r_char_p = yes; then
8785 8785
8786cat >>confdefs.h <<\_ACEOF 8786cat >>confdefs.h <<\_ACEOF
8787#define STRERROR_R_CHAR_P 1 8787#define STRERROR_R_CHAR_P 1
8788_ACEOF 8788_ACEOF
8789 8789
8790fi 8790fi
8791 8791
 8792{ echo "$as_me:$LINENO: checking for pid_t" >&5
 8793echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
 8794if test "${ac_cv_type_pid_t+set}" = set; then
 8795 echo $ECHO_N "(cached) $ECHO_C" >&6
 8796else
 8797 cat >conftest.$ac_ext <<_ACEOF
 8798/* confdefs.h. */
 8799_ACEOF
 8800cat confdefs.h >>conftest.$ac_ext
 8801cat >>conftest.$ac_ext <<_ACEOF
 8802/* end confdefs.h. */
 8803$ac_includes_default
 8804typedef pid_t ac__type_new_;
 8805int
 8806main ()
 8807{
 8808if ((ac__type_new_ *) 0)
 8809 return 0;
 8810if (sizeof (ac__type_new_))
 8811 return 0;
 8812 ;
 8813 return 0;
 8814}
 8815_ACEOF
 8816rm -f conftest.$ac_objext
 8817if { (ac_try="$ac_compile"
 8818case "(($ac_try" in
 8819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 8820 *) ac_try_echo=$ac_try;;
 8821esac
 8822eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 8823 (eval "$ac_compile") 2>conftest.er1
 8824 ac_status=$?
 8825 grep -v '^ *+' conftest.er1 >conftest.err
 8826 rm -f conftest.er1
 8827 cat conftest.err >&5
 8828 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 8829 (exit $ac_status); } && {
 8830 test -z "$ac_c_werror_flag" ||
 8831 test ! -s conftest.err
 8832 } && test -s conftest.$ac_objext; then
 8833 ac_cv_type_pid_t=yes
 8834else
 8835 echo "$as_me: failed program was:" >&5
 8836sed 's/^/| /' conftest.$ac_ext >&5
 8837
 8838 ac_cv_type_pid_t=no
 8839fi
 8840
 8841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 8842fi
 8843{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
 8844echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
 8845if test $ac_cv_type_pid_t = yes; then
 8846 :
 8847else
 8848
 8849cat >>confdefs.h <<_ACEOF
 8850#define pid_t int
 8851_ACEOF
 8852
 8853fi
 8854
 8855
 8856for ac_header in vfork.h
 8857do
 8858as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
 8859if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 8860 { echo "$as_me:$LINENO: checking for $ac_header" >&5
 8861echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
 8862if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 8863 echo $ECHO_N "(cached) $ECHO_C" >&6
 8864fi
 8865ac_res=`eval echo '${'$as_ac_Header'}'`
 8866 { echo "$as_me:$LINENO: result: $ac_res" >&5
 8867echo "${ECHO_T}$ac_res" >&6; }
 8868else
 8869 # Is the header compilable?
 8870{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
 8871echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
 8872cat >conftest.$ac_ext <<_ACEOF
 8873/* confdefs.h. */
 8874_ACEOF
 8875cat confdefs.h >>conftest.$ac_ext
 8876cat >>conftest.$ac_ext <<_ACEOF
 8877/* end confdefs.h. */
 8878$ac_includes_default
 8879#include <$ac_header>
 8880_ACEOF
 8881rm -f conftest.$ac_objext
 8882if { (ac_try="$ac_compile"
 8883case "(($ac_try" in
 8884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 8885 *) ac_try_echo=$ac_try;;
 8886esac
 8887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 8888 (eval "$ac_compile") 2>conftest.er1
 8889 ac_status=$?
 8890 grep -v '^ *+' conftest.er1 >conftest.err
 8891 rm -f conftest.er1
 8892 cat conftest.err >&5
 8893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 8894 (exit $ac_status); } && {
 8895 test -z "$ac_c_werror_flag" ||
 8896 test ! -s conftest.err
 8897 } && test -s conftest.$ac_objext; then
 8898 ac_header_compiler=yes
 8899else
 8900 echo "$as_me: failed program was:" >&5
 8901sed 's/^/| /' conftest.$ac_ext >&5
 8902
 8903 ac_header_compiler=no
 8904fi
 8905
 8906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 8907{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 8908echo "${ECHO_T}$ac_header_compiler" >&6; }
 8909
 8910# Is the header present?
 8911{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
 8912echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
 8913cat >conftest.$ac_ext <<_ACEOF
 8914/* confdefs.h. */
 8915_ACEOF
 8916cat confdefs.h >>conftest.$ac_ext
 8917cat >>conftest.$ac_ext <<_ACEOF
 8918/* end confdefs.h. */
 8919#include <$ac_header>
 8920_ACEOF
 8921if { (ac_try="$ac_cpp conftest.$ac_ext"
 8922case "(($ac_try" in
 8923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 8924 *) ac_try_echo=$ac_try;;
 8925esac
 8926eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 8927 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
 8928 ac_status=$?
 8929 grep -v '^ *+' conftest.er1 >conftest.err
 8930 rm -f conftest.er1
 8931 cat conftest.err >&5
 8932 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 8933 (exit $ac_status); } >/dev/null && {
 8934 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
 8935 test ! -s conftest.err
 8936 }; then
 8937 ac_header_preproc=yes
 8938else
 8939 echo "$as_me: failed program was:" >&5
 8940sed 's/^/| /' conftest.$ac_ext >&5
 8941
 8942 ac_header_preproc=no
 8943fi
 8944
 8945rm -f conftest.err conftest.$ac_ext
 8946{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
 8947echo "${ECHO_T}$ac_header_preproc" >&6; }
 8948
 8949# So? What about this header?
 8950case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
 8951 yes:no: )
 8952 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
 8953echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
 8954 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
 8955echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
 8956 ac_header_preproc=yes
 8957 ;;
 8958 no:yes:* )
 8959 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
 8960echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
 8961 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
 8962echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
 8963 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
 8964echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
 8965 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
 8966echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
 8967 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
 8968echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
 8969 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
 8970echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
 8971 ( cat <<\_ASBOX
 8972## ------------------------------- ##
 8973## Report this to grant@NetBSD.org ##
 8974## ------------------------------- ##
 8975_ASBOX
 8976 ) | sed "s/^/$as_me: WARNING: /" >&2
 8977 ;;
 8978esac
 8979{ echo "$as_me:$LINENO: checking for $ac_header" >&5
 8980echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
 8981if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
 8982 echo $ECHO_N "(cached) $ECHO_C" >&6
 8983else
 8984 eval "$as_ac_Header=\$ac_header_preproc"
 8985fi
 8986ac_res=`eval echo '${'$as_ac_Header'}'`
 8987 { echo "$as_me:$LINENO: result: $ac_res" >&5
 8988echo "${ECHO_T}$ac_res" >&6; }
 8989
 8990fi
 8991if test `eval echo '${'$as_ac_Header'}'` = yes; then
 8992 cat >>confdefs.h <<_ACEOF
 8993#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
 8994_ACEOF
 8995
 8996fi
 8997
 8998done
 8999
 9000
 9001
 9002for ac_func in fork vfork
 9003do
 9004as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
 9005{ echo "$as_me:$LINENO: checking for $ac_func" >&5
 9006echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
 9007if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
 9008 echo $ECHO_N "(cached) $ECHO_C" >&6
 9009else
 9010 cat >conftest.$ac_ext <<_ACEOF
 9011/* confdefs.h. */
 9012_ACEOF
 9013cat confdefs.h >>conftest.$ac_ext
 9014cat >>conftest.$ac_ext <<_ACEOF
 9015/* end confdefs.h. */
 9016/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
 9017 For example, HP-UX 11i <limits.h> declares gettimeofday. */
 9018#define $ac_func innocuous_$ac_func
 9019
 9020/* System header to define __stub macros and hopefully few prototypes,
 9021 which can conflict with char $ac_func (); below.
 9022 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
 9023 <limits.h> exists even on freestanding compilers. */
 9024
 9025#ifdef __STDC__
 9026# include <limits.h>
 9027#else
 9028# include <assert.h>
 9029#endif
 9030
 9031#undef $ac_func
 9032
 9033/* Override any GCC internal prototype to avoid an error.
 9034 Use char because int might match the return type of a GCC
 9035 builtin and then its argument prototype would still apply. */
 9036#ifdef __cplusplus
 9037extern "C"
 9038#endif
 9039char $ac_func ();
 9040/* The GNU C library defines this for functions which it implements
 9041 to always fail with ENOSYS. Some functions are actually named
 9042 something starting with __ and the normal name is an alias. */
 9043#if defined __stub_$ac_func || defined __stub___$ac_func
 9044choke me
 9045#endif
 9046
 9047int
 9048main ()
 9049{
 9050return $ac_func ();
 9051 ;
 9052 return 0;
 9053}
 9054_ACEOF
 9055rm -f conftest.$ac_objext conftest$ac_exeext
 9056if { (ac_try="$ac_link"
 9057case "(($ac_try" in
 9058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 9059 *) ac_try_echo=$ac_try;;
 9060esac
 9061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 9062 (eval "$ac_link") 2>conftest.er1
 9063 ac_status=$?
 9064 grep -v '^ *+' conftest.er1 >conftest.err
 9065 rm -f conftest.er1
 9066 cat conftest.err >&5
 9067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 9068 (exit $ac_status); } && {
 9069 test -z "$ac_c_werror_flag" ||
 9070 test ! -s conftest.err
 9071 } && test -s conftest$ac_exeext &&
 9072 $as_test_x conftest$ac_exeext; then
 9073 eval "$as_ac_var=yes"
 9074else
 9075 echo "$as_me: failed program was:" >&5
 9076sed 's/^/| /' conftest.$ac_ext >&5
 9077
 9078 eval "$as_ac_var=no"
 9079fi
 9080
 9081rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
 9082 conftest$ac_exeext conftest.$ac_ext
 9083fi
 9084ac_res=`eval echo '${'$as_ac_var'}'`
 9085 { echo "$as_me:$LINENO: result: $ac_res" >&5
 9086echo "${ECHO_T}$ac_res" >&6; }
 9087if test `eval echo '${'$as_ac_var'}'` = yes; then
 9088 cat >>confdefs.h <<_ACEOF
 9089#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
 9090_ACEOF
 9091
 9092fi
 9093done
 9094
 9095if test "x$ac_cv_func_fork" = xyes; then
 9096 { echo "$as_me:$LINENO: checking for working fork" >&5
 9097echo $ECHO_N "checking for working fork... $ECHO_C" >&6; }
 9098if test "${ac_cv_func_fork_works+set}" = set; then
 9099 echo $ECHO_N "(cached) $ECHO_C" >&6
 9100else
 9101 if test "$cross_compiling" = yes; then
 9102 ac_cv_func_fork_works=cross
 9103else
 9104 cat >conftest.$ac_ext <<_ACEOF
 9105/* confdefs.h. */
 9106_ACEOF
 9107cat confdefs.h >>conftest.$ac_ext
 9108cat >>conftest.$ac_ext <<_ACEOF
 9109/* end confdefs.h. */
 9110$ac_includes_default
 9111int
 9112main ()
 9113{
 9114
 9115 /* By Ruediger Kuhlmann. */
 9116 return fork () < 0;
 9117
 9118 ;
 9119 return 0;
 9120}
 9121_ACEOF
 9122rm -f conftest$ac_exeext
 9123if { (ac_try="$ac_link"
 9124case "(($ac_try" in
 9125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 9126 *) ac_try_echo=$ac_try;;
 9127esac
 9128eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 9129 (eval "$ac_link") 2>&5
 9130 ac_status=$?
 9131 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 9132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 9133 { (case "(($ac_try" in
 9134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 9135 *) ac_try_echo=$ac_try;;
 9136esac
 9137eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 9138 (eval "$ac_try") 2>&5
 9139 ac_status=$?
 9140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 9141 (exit $ac_status); }; }; then
 9142 ac_cv_func_fork_works=yes
 9143else
 9144 echo "$as_me: program exited with status $ac_status" >&5
 9145echo "$as_me: failed program was:" >&5
 9146sed 's/^/| /' conftest.$ac_ext >&5
 9147
 9148( exit $ac_status )
 9149ac_cv_func_fork_works=no
 9150fi
 9151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 9152fi
 9153
 9154
 9155fi
 9156{ echo "$as_me:$LINENO: result: $ac_cv_func_fork_works" >&5
 9157echo "${ECHO_T}$ac_cv_func_fork_works" >&6; }
 9158
 9159else
 9160 ac_cv_func_fork_works=$ac_cv_func_fork
 9161fi
 9162if test "x$ac_cv_func_fork_works" = xcross; then
 9163 case $host in
 9164 *-*-amigaos* | *-*-msdosdjgpp*)
 9165 # Override, as these systems have only a dummy fork() stub
 9166 ac_cv_func_fork_works=no
 9167 ;;
 9168 *)
 9169 ac_cv_func_fork_works=yes
 9170 ;;
 9171 esac
 9172 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
 9173echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
 9174fi
 9175ac_cv_func_vfork_works=$ac_cv_func_vfork
 9176if test "x$ac_cv_func_vfork" = xyes; then
 9177 { echo "$as_me:$LINENO: checking for working vfork" >&5
 9178echo $ECHO_N "checking for working vfork... $ECHO_C" >&6; }
 9179if test "${ac_cv_func_vfork_works+set}" = set; then
 9180 echo $ECHO_N "(cached) $ECHO_C" >&6
 9181else
 9182 if test "$cross_compiling" = yes; then
 9183 ac_cv_func_vfork_works=cross
 9184else
 9185 cat >conftest.$ac_ext <<_ACEOF
 9186/* confdefs.h. */
 9187_ACEOF
 9188cat confdefs.h >>conftest.$ac_ext
 9189cat >>conftest.$ac_ext <<_ACEOF
 9190/* end confdefs.h. */
 9191/* Thanks to Paul Eggert for this test. */
 9192$ac_includes_default
 9193#include <sys/wait.h>
 9194#ifdef HAVE_VFORK_H
 9195# include <vfork.h>
 9196#endif
 9197/* On some sparc systems, changes by the child to local and incoming
 9198 argument registers are propagated back to the parent. The compiler
 9199 is told about this with #include <vfork.h>, but some compilers
 9200 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
 9201 static variable whose address is put into a register that is
 9202 clobbered by the vfork. */
 9203static void
 9204#ifdef __cplusplus
 9205sparc_address_test (int arg)
 9206# else
 9207sparc_address_test (arg) int arg;
 9208#endif
 9209{
 9210 static pid_t child;
 9211 if (!child) {
 9212 child = vfork ();
 9213 if (child < 0) {
 9214 perror ("vfork");
 9215 _exit(2);
 9216 }
 9217 if (!child) {
 9218 arg = getpid();
 9219 write(-1, "", 0);
 9220 _exit (arg);
 9221 }
 9222 }
 9223}
 9224
 9225int
 9226main ()
 9227{
 9228 pid_t parent = getpid ();
 9229 pid_t child;
 9230
 9231 sparc_address_test (0);
 9232
 9233 child = vfork ();
 9234
 9235 if (child == 0) {
 9236 /* Here is another test for sparc vfork register problems. This
 9237 test uses lots of local variables, at least as many local
 9238 variables as main has allocated so far including compiler
 9239 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
 9240 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
 9241 reuse the register of parent for one of the local variables,
 9242 since it will think that parent can't possibly be used any more
 9243 in this routine. Assigning to the local variable will thus
 9244 munge parent in the parent process. */
 9245 pid_t
 9246 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
 9247 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
 9248 /* Convince the compiler that p..p7 are live; otherwise, it might
 9249 use the same hardware register for all 8 local variables. */
 9250 if (p != p1 || p != p2 || p != p3 || p != p4
 9251 || p != p5 || p != p6 || p != p7)
 9252 _exit(1);
 9253
 9254 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
 9255 from child file descriptors. If the child closes a descriptor
 9256 before it execs or exits, this munges the parent's descriptor
 9257 as well. Test for this by closing stdout in the child. */
 9258 _exit(close(fileno(stdout)) != 0);
 9259 } else {
 9260 int status;
 9261 struct stat st;
 9262
 9263 while (wait(&status) != child)
 9264 ;
 9265 return (
 9266 /* Was there some problem with vforking? */
 9267 child < 0
 9268
 9269 /* Did the child fail? (This shouldn't happen.) */
 9270 || status
 9271
 9272 /* Did the vfork/compiler bug occur? */
 9273 || parent != getpid()
 9274
 9275 /* Did the file descriptor bug occur? */
 9276 || fstat(fileno(stdout), &st) != 0
 9277 );
 9278 }
 9279}
 9280_ACEOF
 9281rm -f conftest$ac_exeext
 9282if { (ac_try="$ac_link"
 9283case "(($ac_try" in
 9284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 9285 *) ac_try_echo=$ac_try;;
 9286esac
 9287eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 9288 (eval "$ac_link") 2>&5
 9289 ac_status=$?
 9290 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 9291 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
 9292 { (case "(($ac_try" in
 9293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
 9294 *) ac_try_echo=$ac_try;;
 9295esac
 9296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
 9297 (eval "$ac_try") 2>&5
 9298 ac_status=$?
 9299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
 9300 (exit $ac_status); }; }; then
 9301 ac_cv_func_vfork_works=yes
 9302else
 9303 echo "$as_me: program exited with status $ac_status" >&5
 9304echo "$as_me: failed program was:" >&5
 9305sed 's/^/| /' conftest.$ac_ext >&5
 9306
 9307( exit $ac_status )
 9308ac_cv_func_vfork_works=no
 9309fi
 9310rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
 9311fi
 9312
 9313
 9314fi
 9315{ echo "$as_me:$LINENO: result: $ac_cv_func_vfork_works" >&5
 9316echo "${ECHO_T}$ac_cv_func_vfork_works" >&6; }
 9317
 9318fi;
 9319if test "x$ac_cv_func_fork_works" = xcross; then
 9320 ac_cv_func_vfork_works=$ac_cv_func_vfork
 9321 { echo "$as_me:$LINENO: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
 9322echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
 9323fi
 9324
 9325if test "x$ac_cv_func_vfork_works" = xyes; then
 9326
 9327cat >>confdefs.h <<\_ACEOF
 9328#define HAVE_WORKING_VFORK 1
 9329_ACEOF
 9330
 9331else
 9332
 9333cat >>confdefs.h <<\_ACEOF
 9334#define vfork fork
 9335_ACEOF
 9336
 9337fi
 9338if test "x$ac_cv_func_fork_works" = xyes; then
 9339
 9340cat >>confdefs.h <<\_ACEOF
 9341#define HAVE_WORKING_FORK 1
 9342_ACEOF
 9343
 9344fi
 9345
8792 9346
8793for ac_func in vprintf 9347for ac_func in vprintf
8794do 9348do
8795as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9349as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8796{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9350{ echo "$as_me:$LINENO: checking for $ac_func" >&5
8797echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9351echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
8798if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 9352if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
8799 echo $ECHO_N "(cached) $ECHO_C" >&6 9353 echo $ECHO_N "(cached) $ECHO_C" >&6
8800else 9354else
8801 cat >conftest.$ac_ext <<_ACEOF 9355 cat >conftest.$ac_ext <<_ACEOF
8802/* confdefs.h. */ 9356/* confdefs.h. */
8803_ACEOF 9357_ACEOF
8804cat confdefs.h >>conftest.$ac_ext 9358cat confdefs.h >>conftest.$ac_ext

cvs diff -r1.58 -r1.59 pkgsrc/pkgtools/libnbcompat/files/configure.ac (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/files/configure.ac 2007/09/21 19:51:58 1.58
+++ pkgsrc/pkgtools/libnbcompat/files/configure.ac 2008/02/21 16:50:08 1.59
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1dnl $NetBSD: configure.ac,v 1.58 2007/09/21 19:51:58 joerg Exp $ 1dnl $NetBSD: configure.ac,v 1.59 2008/02/21 16:50:08 tnn Exp $
2 2
3dnl Process this file with autoconf to produce a configure script. 3dnl Process this file with autoconf to produce a configure script.
4AC_PREREQ(2.52) 4AC_PREREQ(2.52)
5AC_INIT([libnbcompat], [20070622], [grant@NetBSD.org]) 5AC_INIT([libnbcompat], [20070622], [grant@NetBSD.org])
6AC_CONFIG_HEADER(nbcompat/config.h) 6AC_CONFIG_HEADER(nbcompat/config.h)
7AC_ARG_PROGRAM 7AC_ARG_PROGRAM
8 8
9AC_CANONICAL_HOST 9AC_CANONICAL_HOST
10CANONICAL_HOST=$host 10CANONICAL_HOST=$host
11AC_SUBST(CANONICAL_HOST) 11AC_SUBST(CANONICAL_HOST)
12AC_SUBST(INCLUDES) 12AC_SUBST(INCLUDES)
13 13
14# Checks for programs. 14# Checks for programs.
@@ -205,26 +205,27 @@ AC_CHECK_TYPES([fsid_t],[],[], @@ -205,26 +205,27 @@ AC_CHECK_TYPES([fsid_t],[],[],
205#endif 205#endif
206#if HAVE_SYS_MOUNT_H 206#if HAVE_SYS_MOUNT_H
207#include <sys/mount.h> 207#include <sys/mount.h>
208#endif 208#endif
209#if HAVE_SYS_VFS_H 209#if HAVE_SYS_VFS_H
210#include <sys/vfs.h> 210#include <sys/vfs.h>
211#endif]) 211#endif])
212AC_C_BIGENDIAN 212AC_C_BIGENDIAN
213AC_CHECK_SIZEOF(off_t, 0) 213AC_CHECK_SIZEOF(off_t, 0)
214 214
215# Checks for library functions. 215# Checks for library functions.
216AC_FUNC_MALLOC 216AC_FUNC_MALLOC
217AC_FUNC_STRERROR_R 217AC_FUNC_STRERROR_R
 218AC_FUNC_VFORK
218AC_FUNC_VPRINTF 219AC_FUNC_VPRINTF
219 220
220AC_REPLACE_FUNCS([asprintf err fgetln fnmatch fparseln getenv isblank \ 221AC_REPLACE_FUNCS([asprintf err fgetln fnmatch fparseln getenv isblank \
221 lchflags lchmod lchown lutimes mkdtemp mkstemp setenv setgroupent \ 222 lchflags lchmod lchown lutimes mkdtemp mkstemp setenv setgroupent \
222 setpassent setprogname snprintf statvfs strdup strerror strlcat \ 223 setpassent setprogname snprintf statvfs strdup strerror strlcat \
223 strlcpy strmode strsep strtoll unsetenv usleep utimes warn 224 strlcpy strmode strsep strtoll unsetenv usleep utimes warn
224]) 225])
225 226
226AC_CHECK_FUNCS([getenv setenv unsetenv], [:], [ 227AC_CHECK_FUNCS([getenv setenv unsetenv], [:], [
227 AC_LIBOBJ(findenv) 228 AC_LIBOBJ(findenv)
228 break 229 break
229]) 230])
230 231

cvs diff -r1.19 -r1.20 pkgsrc/pkgtools/libnbcompat/files/nbcompat/config.h.in (expand / switch to unified diff)

--- pkgsrc/pkgtools/libnbcompat/files/nbcompat/config.h.in 2007/09/21 19:51:58 1.19
+++ pkgsrc/pkgtools/libnbcompat/files/nbcompat/config.h.in 2008/02/21 16:50:08 1.20
@@ -59,26 +59,29 @@ @@ -59,26 +59,29 @@
59 59
60/* Define to 1 if you have the <fcntl.h> header file. */ 60/* Define to 1 if you have the <fcntl.h> header file. */
61#undef HAVE_FCNTL_H 61#undef HAVE_FCNTL_H
62 62
63/* Define to 1 if you have the `fgetln' function. */ 63/* Define to 1 if you have the `fgetln' function. */
64#undef HAVE_FGETLN 64#undef HAVE_FGETLN
65 65
66/* Define to 1 if you have the `fnmatch' function. */ 66/* Define to 1 if you have the `fnmatch' function. */
67#undef HAVE_FNMATCH 67#undef HAVE_FNMATCH
68 68
69/* Define to 1 if you have the <fnmatch.h> header file. */ 69/* Define to 1 if you have the <fnmatch.h> header file. */
70#undef HAVE_FNMATCH_H 70#undef HAVE_FNMATCH_H
71 71
 72/* Define to 1 if you have the `fork' function. */
 73#undef HAVE_FORK
 74
72/* Define to 1 if you have the `fparseln' function. */ 75/* Define to 1 if you have the `fparseln' function. */
73#undef HAVE_FPARSELN 76#undef HAVE_FPARSELN
74 77
75/* Define to 1 if the system has the type `fsid_t'. */ 78/* Define to 1 if the system has the type `fsid_t'. */
76#undef HAVE_FSID_T 79#undef HAVE_FSID_T
77 80
78/* Define to 1 if you have the <fts.h> header file. */ 81/* Define to 1 if you have the <fts.h> header file. */
79#undef HAVE_FTS_H 82#undef HAVE_FTS_H
80 83
81/* Define to 1 if you have the `getenv' function. */ 84/* Define to 1 if you have the `getenv' function. */
82#undef HAVE_GETENV 85#undef HAVE_GETENV
83 86
84/* Define to 1 if you have the `getmode' function. */ 87/* Define to 1 if you have the `getmode' function. */
@@ -460,41 +463,53 @@ @@ -460,41 +463,53 @@
460 463
461/* Define to 1 if the system has the type `u_int16_t'. */ 464/* Define to 1 if the system has the type `u_int16_t'. */
462#undef HAVE_U_INT16_T 465#undef HAVE_U_INT16_T
463 466
464/* Define to 1 if the system has the type `u_int32_t'. */ 467/* Define to 1 if the system has the type `u_int32_t'. */
465#undef HAVE_U_INT32_T 468#undef HAVE_U_INT32_T
466 469
467/* Define to 1 if the system has the type `u_int64_t'. */ 470/* Define to 1 if the system has the type `u_int64_t'. */
468#undef HAVE_U_INT64_T 471#undef HAVE_U_INT64_T
469 472
470/* Define to 1 if the system has the type `u_int8_t'. */ 473/* Define to 1 if the system has the type `u_int8_t'. */
471#undef HAVE_U_INT8_T 474#undef HAVE_U_INT8_T
472 475
 476/* Define to 1 if you have the `vfork' function. */
 477#undef HAVE_VFORK
 478
 479/* Define to 1 if you have the <vfork.h> header file. */
 480#undef HAVE_VFORK_H
 481
473/* Define to 1 if you have the `vis' function. */ 482/* Define to 1 if you have the `vis' function. */
474#undef HAVE_VIS 483#undef HAVE_VIS
475 484
476/* Define to 1 if you have the <vis.h> header file. */ 485/* Define to 1 if you have the <vis.h> header file. */
477#undef HAVE_VIS_H 486#undef HAVE_VIS_H
478 487
479/* Define to 1 if you have the `vprintf' function. */ 488/* Define to 1 if you have the `vprintf' function. */
480#undef HAVE_VPRINTF 489#undef HAVE_VPRINTF
481 490
482/* Define to 1 if you have the `warn' function. */ 491/* Define to 1 if you have the `warn' function. */
483#undef HAVE_WARN 492#undef HAVE_WARN
484 493
 494/* Define to 1 if `fork' works. */
 495#undef HAVE_WORKING_FORK
 496
485/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */ 497/* Define to 1 if `long long' is supported and sizeof(off_t) >= 8. */
486#undef HAVE_WORKING_LONG_LONG 498#undef HAVE_WORKING_LONG_LONG
487 499
 500/* Define to 1 if `vfork' works. */
 501#undef HAVE_WORKING_VFORK
 502
488/* define if your compiler has __attribute__ */ 503/* define if your compiler has __attribute__ */
489#undef HAVE___ATTRIBUTE__ 504#undef HAVE___ATTRIBUTE__
490 505
491/* Define to the address where bug reports for this package should be sent. */ 506/* Define to the address where bug reports for this package should be sent. */
492#undef PACKAGE_BUGREPORT 507#undef PACKAGE_BUGREPORT
493 508
494/* Define to the full name of this package. */ 509/* Define to the full name of this package. */
495#undef PACKAGE_NAME 510#undef PACKAGE_NAME
496 511
497/* Define to the full name and version of this package. */ 512/* Define to the full name and version of this package. */
498#undef PACKAGE_STRING 513#undef PACKAGE_STRING
499 514
500/* Define to the one symbol short name of this package. */ 515/* Define to the one symbol short name of this package. */
@@ -512,27 +527,33 @@ @@ -512,27 +527,33 @@
512/* Define to 1 if strerror_r returns char *. */ 527/* Define to 1 if strerror_r returns char *. */
513#undef STRERROR_R_CHAR_P 528#undef STRERROR_R_CHAR_P
514 529
515/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */ 530/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
516#undef TIME_WITH_SYS_TIME 531#undef TIME_WITH_SYS_TIME
517 532
518/* Define to 1 if your processor stores words with the most significant byte 533/* Define to 1 if your processor stores words with the most significant byte
519 first (like Motorola and SPARC, unlike Intel and VAX). */ 534 first (like Motorola and SPARC, unlike Intel and VAX). */
520#undef WORDS_BIGENDIAN 535#undef WORDS_BIGENDIAN
521 536
522/* Define to rpl_malloc if the replacement function should be used. */ 537/* Define to rpl_malloc if the replacement function should be used. */
523#undef malloc 538#undef malloc
524 539
 540/* Define to `int' if <sys/types.h> does not define. */
 541#undef pid_t
 542
525/* Define to `unsigned int' if <sys/types.h> does not define. */ 543/* Define to `unsigned int' if <sys/types.h> does not define. */
526#undef size_t 544#undef size_t
527 545
528/* Define to the type of an unsigned integer type wide enough to hold a 546/* Define to the type of an unsigned integer type wide enough to hold a
529 pointer, if such a type exists, and if the system does not define it. */ 547 pointer, if such a type exists, and if the system does not define it. */
530#undef uintptr_t 548#undef uintptr_t
531 549
 550/* Define as `fork' if `vfork' does not work. */
 551#undef vfork
 552
532 553
533/* NBCOMPAT template section follows. */ 554/* NBCOMPAT template section follows. */
534 555
535#ifndef HAVE___ATTRIBUTE__ 556#ifndef HAVE___ATTRIBUTE__
536# define __attribute__(x) 557# define __attribute__(x)
537#endif 558#endif
538 559