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-ay.orig,v 1.1 2012/03/10 03:26:05 ryoon Exp $ --- mozilla/browser/app/nsBrowserApp.cpp.orig 2011-09-22 20:20:17.000000000 +0000 +++ mozilla/browser/app/nsBrowserApp.cpp @@@@ -49,6 +49,27 @@@@ #include #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 "plstr.h" #include "prprf.h" @@@@ -203,6 +224,7 @@@@ static int do_main(const char *exePath, int main(int argc, char* argv[]) { char exePath[MAXPATHLEN]; + netbsd_fixrlimit(); nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); if (NS_FAILED(rv)) { @ 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-ay,v 1.2 2011/11/12 16:41:43 tnn Exp $ @