mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-02-04 17:30:11 +08:00
configure.in: Check for functions getrlimit and setrlimit.
* configure.in: Check for functions getrlimit and setrlimit. * cccp.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition to RLIMIT_STACK to see if we can call getrlimit and setrlimit. From-SVN: r17023
This commit is contained in:
parent
67437d5b5d
commit
0a232106fc
@ -1,3 +1,9 @@
|
||||
Tue Dec 9 00:57:38 1997 Manfred Hollstein <manfred@s-direktnet.de>
|
||||
|
||||
* configure.in: Check for functions getrlimit and setrlimit.
|
||||
* cccp.c (main): Check HAVE_GETRLIMIT and HAVE_SETRLIMIT in addition
|
||||
to RLIMIT_STACK to see if we can call getrlimit and setrlimit.
|
||||
|
||||
Mon Dec 8 23:53:26 1997 Jay Sachs <sachs@bull.cs.williams.edu>
|
||||
|
||||
* Makefile.in (compare*): Handle losing behavior from 4.4bsd make.
|
||||
|
@ -1230,7 +1230,7 @@ main (argc, argv)
|
||||
/* Target-name to write with the dependency information. */
|
||||
char *deps_target = 0;
|
||||
|
||||
#ifdef RLIMIT_STACK
|
||||
#if defined (RLIMIT_STACK) && defined (HAVE_GETRLIMIT) && defined (HAVE_SETRLIMIT)
|
||||
/* Get rid of any avoidable limit on stack size. */
|
||||
{
|
||||
struct rlimit rlim;
|
||||
|
158
gcc/configure
vendored
158
gcc/configure
vendored
@ -2415,14 +2415,124 @@ else
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in getrlimit
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2422: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2427 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
#include <assert.h>
|
||||
/* 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 $ac_func();
|
||||
|
||||
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_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
$ac_func();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
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>&6
|
||||
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_func 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_func in setrlimit
|
||||
do
|
||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||
echo "configure:2477: checking for $ac_func" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2482 "configure"
|
||||
#include "confdefs.h"
|
||||
/* System header to define __stub macros and hopefully few prototypes,
|
||||
which can conflict with char $ac_func(); below. */
|
||||
#include <assert.h>
|
||||
/* 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 $ac_func();
|
||||
|
||||
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_$ac_func) || defined (__stub___$ac_func)
|
||||
choke me
|
||||
#else
|
||||
$ac_func();
|
||||
#endif
|
||||
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
|
||||
rm -rf conftest*
|
||||
eval "ac_cv_func_$ac_func=yes"
|
||||
else
|
||||
echo "configure: failed program was:" >&5
|
||||
cat conftest.$ac_ext >&5
|
||||
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>&6
|
||||
ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
|
||||
cat >> confdefs.h <<EOF
|
||||
#define $ac_tr_func 1
|
||||
EOF
|
||||
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
echo $ac_n "checking whether malloc must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2421: checking whether malloc must be declared" >&5
|
||||
echo "configure:2531: checking whether malloc must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_malloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2426 "configure"
|
||||
#line 2536 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2449,7 +2559,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) malloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_malloc=no
|
||||
else
|
||||
@ -2471,12 +2581,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether realloc must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2475: checking whether realloc must be declared" >&5
|
||||
echo "configure:2585: checking whether realloc must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_realloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2480 "configure"
|
||||
#line 2590 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2503,7 +2613,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) realloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2507: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_realloc=no
|
||||
else
|
||||
@ -2525,12 +2635,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether calloc must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2529: checking whether calloc must be declared" >&5
|
||||
echo "configure:2639: checking whether calloc must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_calloc'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2534 "configure"
|
||||
#line 2644 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2557,7 +2667,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) calloc
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2671: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_calloc=no
|
||||
else
|
||||
@ -2579,12 +2689,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether free must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2583: checking whether free must be declared" >&5
|
||||
echo "configure:2693: checking whether free must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_free'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2588 "configure"
|
||||
#line 2698 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2611,7 +2721,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) free
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2725: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_free=no
|
||||
else
|
||||
@ -2633,12 +2743,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether index must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2637: checking whether index must be declared" >&5
|
||||
echo "configure:2747: checking whether index must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_index'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2642 "configure"
|
||||
#line 2752 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2665,7 +2775,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) index
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_index=no
|
||||
else
|
||||
@ -2687,12 +2797,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether rindex must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2691: checking whether rindex must be declared" >&5
|
||||
echo "configure:2801: checking whether rindex must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_rindex'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2696 "configure"
|
||||
#line 2806 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2719,7 +2829,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) rindex
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_rindex=no
|
||||
else
|
||||
@ -2741,12 +2851,12 @@ EOF
|
||||
fi
|
||||
|
||||
echo $ac_n "checking whether getenv must be declared""... $ac_c" 1>&6
|
||||
echo "configure:2745: checking whether getenv must be declared" >&5
|
||||
echo "configure:2855: checking whether getenv must be declared" >&5
|
||||
if eval "test \"`echo '$''{'gcc_cv_decl_needed_getenv'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2750 "configure"
|
||||
#line 2860 "configure"
|
||||
#include "confdefs.h"
|
||||
|
||||
#include <stdio.h>
|
||||
@ -2773,7 +2883,7 @@ int main() {
|
||||
char *(*pfn) = (char *(*)) getenv
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2777: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
gcc_cv_decl_needed_getenv=no
|
||||
else
|
||||
@ -2796,12 +2906,12 @@ fi
|
||||
|
||||
|
||||
echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
|
||||
echo "configure:2800: checking for sys_siglist declaration in signal.h or unistd.h" >&5
|
||||
echo "configure:2910: checking for sys_siglist declaration in signal.h or unistd.h" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_decl_sys_siglist'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 2805 "configure"
|
||||
#line 2915 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
@ -2813,7 +2923,7 @@ int main() {
|
||||
char *msg = *(sys_siglist + 1);
|
||||
; return 0; }
|
||||
EOF
|
||||
if { (eval echo configure:2817: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
if { (eval echo configure:2927: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
|
||||
rm -rf conftest*
|
||||
ac_cv_decl_sys_siglist=yes
|
||||
else
|
||||
|
@ -172,6 +172,8 @@ AC_CHECK_FUNCS(bcmp)
|
||||
AC_CHECK_FUNCS(index)
|
||||
AC_CHECK_FUNCS(rindex)
|
||||
AC_CHECK_FUNCS(kill)
|
||||
AC_CHECK_FUNCS(getrlimit)
|
||||
AC_CHECK_FUNCS(setrlimit)
|
||||
|
||||
GCC_NEED_DECLARATION(malloc)
|
||||
GCC_NEED_DECLARATION(realloc)
|
||||
|
Loading…
Reference in New Issue
Block a user