summary refs log tree commit diff
path: root/src/miscbltin.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 18:24:12 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 21:40:05 +1000
commitf97c2127a619c956f0a330f272877a3fa4074f94 (patch)
tree69abddf606a01c61ef79ebd5c33abf9306b5a4d9 /src/miscbltin.c
parent[SIGNAL] Added default implementation of killpg (diff)
downloaddash-f97c2127a619c956f0a330f272877a3fa4074f94.tar.gz
dash-f97c2127a619c956f0a330f272877a3fa4074f94.zip
[BUILTIN] Disable ulimit if there is no getrlimit
For systems without getrlimit (e.g., klibc) we will disable ulimit.

In order to achieve this, builtins.def is now produced by cpp which
allows us to use macros such as HAVE_GETRLIMIT in it.

Thie also means that we can get rid of the cflags parsing code in
mkbuiltins.
Diffstat (limited to 'src/miscbltin.c')
-rw-r--r--src/miscbltin.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/miscbltin.c b/src/miscbltin.c
index 81033e3..3f91bc3 100644
--- a/src/miscbltin.c
+++ b/src/miscbltin.c
@@ -58,10 +58,6 @@
 
 #undef rflag
 
-#if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR__ < 1
-typedef enum __rlimit_resource rlim_t;
-#endif
-
 
 
 /*
@@ -276,6 +272,7 @@ umaskcmd(int argc, char **argv)
 	return 0;
 }
 
+#ifdef HAVE_GETRLIMIT
 /*
  * ulimit builtin
  *
@@ -457,3 +454,4 @@ ulimitcmd(int argc, char **argv)
 	}
 	return 0;
 }
+#endif