From: Ulrich Drepper Date: Mon, 6 Oct 1997 02:03:17 +0000 (+0000) Subject: Add LFS definitions. X-Git-Tag: glibc-2.16-ports-before-merge~3409 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a6db5ab69f840e3d990ebec98023762585eb898;p=thirdparty%2Fglibc.git Add LFS definitions. --- diff --git a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h index ff55773e693..f51262d92d1 100644 --- a/sysdeps/unix/bsd/sun/sunos4/bits/resource.h +++ b/sysdeps/unix/bsd/sun/sunos4/bits/resource.h @@ -22,6 +22,8 @@ and `setrlimit' are not system calls, these are the values used by the C library to emulate them. */ +#include + /* Kinds of resource limit. */ enum __rlimit_resource { @@ -52,19 +54,47 @@ enum __rlimit_resource #define RLIMIT_NOFILE RLIMIT_NOFILE #define RLIMIT_OFILE RLIMIT_OFILE - RLIM_NLIMITS, - - RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */ -#define RLIM_INFINITY RLIM_INFINITY + RLIM_NLIMITS }; +/* Value to indicate that there is no limit. */ +#ifndef __USE_FILE_OFFSET64 +# define RLIM_INFINITY 0x7fffffff +#else +# define RLIM_INFINITY 0x7fffffffffffffffL +#endif + +#ifdef __USE_LARGEFILE64 +# define RLIM64_INFINITY 0x7fffffffffffffffL +#endif + + +/* Type to represent quantities in resource limits. */ +#ifndef __USE_FILE_OFFSET64 +typedef __rlim_t rlim_t; +#else +typedef __rlim64_t rlim_t; +#endif + struct rlimit { /* The current (soft) limit. */ - int rlim_cur; + rlim_t rlim_cur; + /* The hard limit. */ + rlim_t rlim_max; + }; + +#ifdef __USE_LARGEFILE64 +typedef __rlim64_t rlim64_t; + +struct rlimit64 + { + /* The current (soft) limit. */ + rlim64_t rlim_cur; /* The hard limit. */ - int rlim_max; + rlim64_t rlim_max; }; +#endif /* Whose usage statistics do you want? */ enum __rusage_who