mirror of git://gcc.gnu.org/git/gcc.git
Fred Fish <fnf@be.com>
Fred Fish <fnf@be.com>
* configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
* getruntime.c: Only attempt to include sys/resource.h and
use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
are defined.
From-SVN: r26808
This commit is contained in:
parent
3dde7044de
commit
6a071f4a74
|
|
@ -1,3 +1,10 @@
|
||||||
|
Thu May 6 20:34:42 1999 Fred Fish <fnf@be.com>
|
||||||
|
|
||||||
|
* configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
|
||||||
|
* getruntime.c: Only attempt to include sys/resource.h and
|
||||||
|
use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
|
||||||
|
are defined.
|
||||||
|
|
||||||
Mon Apr 26 01:36:06 1999 Donn Terry (donn@interix.com)
|
Mon Apr 26 01:36:06 1999 Donn Terry (donn@interix.com)
|
||||||
|
|
||||||
* configure.in (alloca detection): Handle alloca directly for interix.
|
* configure.in (alloca detection): Handle alloca directly for interix.
|
||||||
|
|
|
||||||
|
|
@ -1055,7 +1055,7 @@ else
|
||||||
fi
|
fi
|
||||||
echo "$ac_t""$CPP" 1>&6
|
echo "$ac_t""$CPP" 1>&6
|
||||||
|
|
||||||
for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h
|
for ac_hdr in sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h
|
||||||
do
|
do
|
||||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||||
|
|
|
||||||
|
|
@ -106,7 +106,7 @@ AC_SUBST_FILE(host_makefile_frag)
|
||||||
# It's OK to check for header files. Although the compiler may not be
|
# It's OK to check for header files. Although the compiler may not be
|
||||||
# able to link anything, it had better be able to at least compile
|
# able to link anything, it had better be able to at least compile
|
||||||
# something.
|
# something.
|
||||||
AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h)
|
AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h)
|
||||||
AC_HEADER_SYS_WAIT
|
AC_HEADER_SYS_WAIT
|
||||||
|
|
||||||
# This is the list of functions which libiberty will provide if they
|
# This is the list of functions which libiberty will provide if they
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#ifdef HAVE_GETRUSAGE
|
#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <sys/resource.h>
|
#include <sys/resource.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -54,7 +54,7 @@ Boston, MA 02111-1307, USA. */
|
||||||
long
|
long
|
||||||
get_run_time ()
|
get_run_time ()
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETRUSAGE
|
#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
|
||||||
struct rusage rusage;
|
struct rusage rusage;
|
||||||
|
|
||||||
getrusage (0, &rusage);
|
getrusage (0, &rusage);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue