diff options
author | Kaveh R. Ghazi <ghazi@caip.rutgers.edu> | 1998-06-30 11:10:55 +0000 |
---|---|---|
committer | Kaveh Ghazi <ghazi@gcc.gnu.org> | 1998-06-30 11:10:55 +0000 |
commit | d2cabf16295972b2397970e4154e0433dbd01a1a (patch) | |
tree | 6a1d94fc07040fc795481149a70a21bbded1f9e6 /gcc/system.h | |
parent | 70198e3dd05040e173ecac2f997e9ef7d9e868ad (diff) | |
download | gcc-d2cabf16295972b2397970e4154e0433dbd01a1a.zip gcc-d2cabf16295972b2397970e4154e0433dbd01a1a.tar.gz gcc-d2cabf16295972b2397970e4154e0433dbd01a1a.tar.bz2 |
Add the ability to GCC_NEED_DECLARATION{S} for looking in arbitrary header...
Add the ability to GCC_NEED_DECLARATION{S} for looking in arbitrary
header files when searching for function declarations. Use this
functionality to check for getrlimit/setrlimit.
* aclocal.m4 (GCC_NEED_DECLARATION): Accept an optional second
argument, which is typically preprocessor code used to draw in
additional header files when looking for a function declaration.
(GCC_NEED_DECLARATIONS): Likewise.
* configure.in (GCC_NEED_DECLARATIONS): Add checks for getrlimit
and setrlimit, search for them in sys/resource.h.
* acconfig.h: Add stubs for NEED_DECLARATION_GETRLIMIT and
NEED_DECLARATION_SETRLIMIT.
* system.h: Prototype getrlimit/setrlimit if necessary.
From-SVN: r20831
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index acb195f..27b1fee 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -235,6 +235,22 @@ extern int sys_nerr; extern char *sys_errlist[]; #endif /* HAVE_STRERROR */ +#ifdef HAVE_GETRLIMIT +# ifdef NEED_DECLARATION_GETRLIMIT +# ifndef getrlimit +extern int getrlimit (); +# endif +# endif +#endif + +#ifdef HAVE_SETRLIMIT +# ifdef NEED_DECLARATION_SETRLIMIT +# ifndef setrlimit +extern int setrlimit (); +# endif +# endif +#endif + /* HAVE_VOLATILE only refers to the stage1 compiler. We also check __STDC__ and assume gcc sets it and has volatile in stage >=2. */ #if !defined(HAVE_VOLATILE) && !defined(__STDC__) && !defined(volatile) |