This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA:] Provide rlim_t for bootstrap problem


 > + 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]