Stub for setrlimit

Change-Id: I54c7233d71805711bd72e1e751456aad30fd3e35
This commit is contained in:
2014-04-28 10:05:45 +02:00
parent e39e890e08
commit ac5b3e53d8
10 changed files with 49 additions and 25 deletions

View File

@@ -841,7 +841,7 @@ main(int argc, char **argv)
progname++;
else
progname = argv[0];
#if !defined(__minix) && (defined(MAKE_NATIVE) || (defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)))
#if defined(MAKE_NATIVE) || (defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE))
/*
* get rid of resource limit on file descriptors
*/

View File

@@ -124,21 +124,17 @@ main(int argc, char *argv[])
struct filelist filelist;
int num_input_files;
FILE *outfp = NULL;
#if !defined(__minix)
struct rlimit rl;
#endif /* !defined(__minix) */
struct stat st;
setlocale(LC_ALL, "");
#if !defined(__minix)
/* bump RLIMIT_NOFILE to maximum our hard limit allows */
if (getrlimit(RLIMIT_NOFILE, &rl) < 0)
err(2, "getrlimit");
rl.rlim_cur = rl.rlim_max;
if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
err(2, "setrlimit");
#endif /* !defined(__minix) */
d_mask[REC_D = '\n'] = REC_D_F;
d_mask['\t'] = d_mask[' '] = BLANK | FLD_D;