This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA:] Provide rlim_t for bootstrap problem
- From: "Kaveh R. Ghazi" <ghazi at caip dot rutgers dot edu>
- To: hp at bitrange dot com
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 3 Mar 2003 09:16:12 -0500 (EST)
- Subject: Re: [RFA:] Provide rlim_t for bootstrap problem
- References: <Pine.BSF.4.44.0303030053090.71731-100000@dair.pair.com>
> + AC_TRY_COMPILE([#include <sys/resource.h>],[rlim_t l;],,
> + [AC_DEFINE([rlim_t],[long])])
> +
Two suggestions:
1. It would be safer IMHO to include system.h etc. before
sys/resource.h in case resource.h needs things like sys/types.h,
etc. I.e. look at what gcc_AC_CHECK_DECLS does for getrlimit.
2. If you put a comment as a third argument for AC_DEFINE, then you
don't have to add a manual entry in acconfig.h.
E.g. something like this (untested) bit is what I'm thinking:
AC_TRY_COMPILE([
#include <sys/resource.h>
#include "ansidecl.h"
#include "system.h"
#ifdef HAVE_SYS_RESOURCE_H
#include <sys/resource.h>
#endif
],[rlim_t l = 0;],,
[AC_DEFINE([rlim_t],[long],[Define to \`long' if <sys/resource.h> doesn't define.])])
--
Kaveh R. Ghazi ghazi at caip dot rutgers dot edu