From 26d8290859c997fb624b9fbd23062bcedae2aedd Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 1 Nov 1999 03:40:55 +0000 Subject: [PATCH] Remove more dependencies upon $ac_cv_mingw32 --- configure | 136 ++++++++++++++++++++---------------------- configure.in | 20 +++---- include/portable.h.in | 6 +- 3 files changed, 76 insertions(+), 86 deletions(-) diff --git a/configure b/configure index 5b9e2fe633..3bddee00f1 100755 --- a/configure +++ b/configure @@ -14251,22 +14251,21 @@ EOF fi -if test "$ac_cv_mingw32" = yes ; then - echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 -echo "configure:14257: checking for _snprintf" >&5 -if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then +echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 +echo "configure:14256: checking for _spawnlp" >&5 +if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char _snprintf(); +char _spawnlp(); char (*f)(); int main() { @@ -14274,55 +14273,52 @@ int main() { /* 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__snprintf) || defined (__stub____snprintf) +#if defined (__stub__spawnlp) || defined (__stub____spawnlp) choke me #else -f = _snprintf; +f = _spawnlp; #endif ; return 0; } EOF -if { (eval echo configure:14286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14285: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func__snprintf=yes" + eval "ac_cv_func__spawnlp=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func__snprintf=no" + eval "ac_cv_func__spawnlp=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ac_cv_func_snprintf=yes - cat >> confdefs.h <<\EOF -#define snprintf _snprintf + cat >> confdefs.h <<\EOF +#define HAVE_SPAWNLP 1 EOF - else echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 -echo "configure:14313: checking for _vsnprintf" >&5 -if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then +echo $ac_n "checking for _snprintf""... $ac_c" 1>&6 +echo "configure:14309: checking for _snprintf" >&5 +if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char _vsnprintf(); +char _snprintf(); char (*f)(); int main() { @@ -14330,55 +14326,54 @@ int main() { /* 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__vsnprintf) || defined (__stub____vsnprintf) +#if defined (__stub__snprintf) || defined (__stub____snprintf) choke me #else -f = _vsnprintf; +f = _snprintf; #endif ; return 0; } EOF -if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func__vsnprintf=yes" + eval "ac_cv_func__snprintf=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func__vsnprintf=no" + eval "ac_cv_func__snprintf=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 - - ac_cv_func_vsnprintf=yes + ac_cv_func_snprintf=yes cat >> confdefs.h <<\EOF -#define vsnprintf _vsnprintf +#define snprintf _snprintf EOF - + else echo "$ac_t""no" 1>&6 fi - echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6 -echo "configure:14369: checking for _spawnlp" >&5 -if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then +echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6 +echo "configure:14364: checking for _vsnprintf" >&5 +if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ -char _spawnlp(); +char _vsnprintf(); char (*f)(); int main() { @@ -14386,45 +14381,46 @@ int main() { /* 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__spawnlp) || defined (__stub____spawnlp) +#if defined (__stub__vsnprintf) || defined (__stub____vsnprintf) choke me #else -f = _spawnlp; +f = _vsnprintf; #endif ; return 0; } EOF -if { (eval echo configure:14398: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* - eval "ac_cv_func__spawnlp=yes" + eval "ac_cv_func__vsnprintf=yes" else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - eval "ac_cv_func__spawnlp=no" + eval "ac_cv_func__vsnprintf=no" fi rm -f conftest* fi -if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then +if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define HAVE_SPAWNLP 1 + ac_cv_func_vsnprintf=yes + cat >> confdefs.h <<\EOF +#define vsnprintf _vsnprintf EOF + else echo "$ac_t""no" 1>&6 fi -fi echo $ac_n "checking for vprintf""... $ac_c" 1>&6 -echo "configure:14423: checking for vprintf" >&5 +echo "configure:14419: checking for vprintf" >&5 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -14472,12 +14468,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 -echo "configure:14476: checking for _doprnt" >&5 +echo "configure:14472: checking for _doprnt" >&5 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -14530,12 +14526,12 @@ if test $ac_cv_func_vprintf = yes ; then for ac_func in vsnprintf vsprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14534: checking for $ac_func" >&5 +echo "configure:14530: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14636,12 +14632,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14640: checking for $ac_func" >&5 +echo "configure:14636: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14665: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14693,12 +14689,12 @@ done for ac_func in getopt tempnam do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:14697: checking for $ac_func" >&5 +echo "configure:14693: checking for $ac_func" >&5 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -14759,13 +14755,13 @@ fi # Check Configuration echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6 -echo "configure:14763: checking declaration of sys_errlist" >&5 +echo "configure:14759: checking declaration of sys_errlist" >&5 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < @@ -14778,7 +14774,7 @@ int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:14782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:14778: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ol_cv_dcl_sys_errlist=yes ol_cv_have_sys_errlist=yes @@ -14801,20 +14797,20 @@ EOF echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6 -echo "configure:14805: checking existence of sys_errlist" >&5 +echo "configure:14801: checking existence of sys_errlist" >&5 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < int main() { char *c = (char *) *sys_errlist ; return 0; } EOF -if { (eval echo configure:14818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:14814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ol_cv_have_sys_errlist=yes else diff --git a/configure.in b/configure.in index 1658bd1576..02253ff9f1 100644 --- a/configure.in +++ b/configure.in @@ -1968,23 +1968,17 @@ dnl AM_FUNC_STRTOD OL_FUNC_INET_ATON -dnl Check for Mingw32 specific functions. -if test "$ac_cv_mingw32" = yes ; then - AC_CHECK_FUNC(_snprintf, [ - ac_cv_func_snprintf=yes +dnl Check for NT specific routines +AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()])) + +AC_CHECK_FUNC(_snprintf, [ac_cv_func_snprintf=yes AC_DEFINE(snprintf, _snprintf, [define to snprintf routine]) - ]) +]) - AC_CHECK_FUNC(_vsnprintf, [ - ac_cv_func_vsnprintf=yes +AC_CHECK_FUNC(_vsnprintf, [ac_cv_func_vsnprintf=yes AC_DEFINE(vsnprintf, _vsnprintf, [define to vsnprintf routine]) - ]) - - AC_CHECK_FUNC(_spawnlp, AC_DEFINE(HAVE_SPAWNLP,1,[if you have spawnlp()])) -fi +]) -dnl we should use vfork instead of fork in a number of places... -dnl AC_FUNC_VFORK AC_FUNC_VPRINTF if test $ac_cv_func_vprintf = yes ; then diff --git a/include/portable.h.in b/include/portable.h.in index 9280da3824..252ddb1ddf 100644 --- a/include/portable.h.in +++ b/include/portable.h.in @@ -816,15 +816,15 @@ typedef char * caddr_t; /* define to you inet_aton(3) is available */ #undef HAVE_INET_ATON +/* if you have spawnlp() */ +#undef HAVE_SPAWNLP + /* define to snprintf routine */ #undef snprintf /* define to vsnprintf routine */ #undef vsnprintf -/* if you have spawnlp() */ -#undef HAVE_SPAWNLP - /* define if sys_errlist is not declared in stdio.h or errno.h */ #undef DECL_SYS_ERRLIST -- 2.39.5