Add wrappers for [gs]etrlimit
authorIan Lynagh <igloo@earth.li>
Tue, 20 May 2008 16:24:11 +0000 (16:24 +0000)
committerIan Lynagh <igloo@earth.li>
Tue, 20 May 2008 16:24:11 +0000 (16:24 +0000)
This is for #2038: macros are used in the Linux .h includes to redirect
to a 64-bit version when large file support is enabled.

include/HsBase.h

index 1f1837b..1992342 100644 (file)
@@ -691,6 +691,16 @@ INLINE int __hscore_mkstemp(char *filetemplate) {
     return (mkstemp(filetemplate));
 }
 
+#if !defined(__MINGW32__) && !defined(irix_HOST_OS)
+INLINE int __hscore_getrlimit(int resource, struct rlimit *rlim) {
+    return (getrlimit(resource, rlim));
+}
+
+INLINE int __hscore_setrlimit(int resource, struct rlimit *rlim) {
+    return (setrlimit(resource, rlim));
+}
+#endif
+
 // select-related stuff
 
 #if !defined(__MINGW32__)