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.37; author ryoon; state dead; branches; next 1.1; 1.1 date 2012.03.10.03.26.07; author ryoon; state Exp; branches; next ; desc @@ 1.2 log @Remove necessary backups of the patches. @ text @$NetBSD: patch-zc.orig,v 1.1 2012/03/10 03:26:07 ryoon Exp $ --- suite/app/nsSuiteApp.cpp.orig 2009-10-25 15:29:07.000000000 +0100 +++ suite/app/nsSuiteApp.cpp @@@@ -44,6 +44,27 @@@@ #include #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"); +} #include "nsCOMPtr.h" #include "nsILocalFile.h" @@@@ -83,6 +104,7 @@@@ public: int main(int argc, char* argv[]) { + netbsd_fixrlimit(); ScopedLogging log; nsCOMPtr appini; @ 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-zc,v 1.1 2009/11/29 00:40:48 tnn Exp $ @