summaryrefslogtreecommitdiff
path: root/bits/resource.h
diff options
context:
space:
mode:
Diffstat (limited to 'bits/resource.h')
-rw-r--r--bits/resource.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/bits/resource.h b/bits/resource.h
index e72836d3c7..e29be98210 100644
--- a/bits/resource.h
+++ b/bits/resource.h
@@ -66,11 +66,20 @@ enum __rlimit_resource
RLIMIT_NLIMITS, /* Number of limit flavors. */
RLIM_NLIMITS = RLIMIT_NLIMITS, /* Traditional name for same. */
-
- RLIM_INFINITY = 0x7fffffff /* Value to indicate that there is no limit. */
-#define RLIM_INFINITY RLIM_INFINITY
};
+/* Value to indicate that there is no limit. */
+#ifndef __USE_FILE_OFFSET64
+# define RLIM_INFINITY 0x7fffffff
+#else
+# define RLIM_INFINITY 0x7fffffffffffffffLL
+#endif
+
+#ifdef __USE_LARGEFILE64
+# define RLIM64_INFINITY 0x7fffffffffffffffLL
+#endif
+
+
/* Type for resource quantity measurement. */
#ifndef __USE_FILE_OFFSET64
typedef __rlim_t rlim_t;