head 1.2; access; symbols pkgsrc-2013Q2:1.2.0.4 pkgsrc-2013Q2-base:1.2 pkgsrc-2012Q4:1.2.0.2 pkgsrc-2012Q4-base:1.2; locks; strict; comment @# @; 1.2 date 2012.03.10.14.57.31; author ryoon; state dead; branches; next 1.1; 1.1 date 2012.03.10.03.26.05; author ryoon; state Exp; branches; next ; desc @@ 1.2 log @Remove necessary backups of the patches. @ text @$NetBSD: patch-aw.orig,v 1.1 2012/03/10 03:26:05 ryoon Exp $ --- mozilla/xulrunner/stub/nsXULStub.cpp.orig 2009-08-24 17:53:30.000000000 +0200 +++ mozilla/xulrunner/stub/nsXULStub.cpp @@@@ -44,6 +44,27 @@@@ #include "nsILocalFile.h" #include +#include +/* + * On netbsd-4, ulimit -n is 64 by default; too few for us. + */ +static void netbsd_fixrlimit(void) { + struct rlimit rlp; + if (getrlimit(RLIMIT_NOFILE, &rlp) == -1) { + fprintf(stderr, "warning: getrlimit failed\n"); + return; + } + if (rlp.rlim_cur >= 512) + return; + if (rlp.rlim_max < 512) { + fprintf(stderr, "warning: hard limit of 'ulimit -n' too low\n"); + rlp.rlim_cur = rlp.rlim_max; + } + else + rlp.rlim_cur = 512; + if (setrlimit(RLIMIT_NOFILE, &rlp) == -1) + fprintf(stderr, "warning: setrlimit failed\n"); +} #ifdef XP_WIN #include @@@@ -205,6 +226,7 @@@@ main(int argc, char **argv) char tmpPath[MAXPATHLEN]; char greDir[MAXPATHLEN]; PRBool greFound = PR_FALSE; + netbsd_fixrlimit(); #if defined(XP_MACOSX) CFBundleRef appBundle = CFBundleGetMainBundle(); @ 1.1 log @Update to 2.7.2 * Many new features. * Security bugfixes. * See http://www.seamonkey-project.org/releases/seamonkey2.7/ @ text @d1 1 a1 1 $NetBSD: patch-aw,v 1.3 2010/03/16 10:59:10 tnn Exp $ @