head 1.2; access; symbols pkgsrc-2014Q1:1.1.1.1.0.18 pkgsrc-2014Q1-base:1.1.1.1 pkgsrc-2013Q4:1.1.1.1.0.16 pkgsrc-2013Q4-base:1.1.1.1 pkgsrc-2013Q3:1.1.1.1.0.14 pkgsrc-2013Q3-base:1.1.1.1 pkgsrc-2013Q2:1.1.1.1.0.12 pkgsrc-2013Q2-base:1.1.1.1 pkgsrc-2013Q1:1.1.1.1.0.10 pkgsrc-2013Q1-base:1.1.1.1 pkgsrc-2012Q4:1.1.1.1.0.8 pkgsrc-2012Q4-base:1.1.1.1 pkgsrc-2012Q3:1.1.1.1.0.6 pkgsrc-2012Q3-base:1.1.1.1 pkgsrc-2012Q2:1.1.1.1.0.4 pkgsrc-2012Q2-base:1.1.1.1 pkgsrc-2012Q1:1.1.1.1.0.2 pkgsrc-2012Q1-base:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.2 date 2014.06.11.12.36.16; author joerg; state dead; branches; next 1.1; commitid XezNXGnjQIlDq6Ex; 1.1 date 2012.03.15.09.45.29; author ryoon; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2012.03.15.09.45.29; author ryoon; state Exp; branches; next ; desc @@ 1.2 log @Retire old thunderbird versions. @ text @$NetBSD: patch-ay,v 1.1 2012/03/15 09:45:29 ryoon Exp $ --- mozilla/browser/app/nsBrowserApp.cpp.orig 2012-02-16 10:24:45.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 @Initial revision @ text @d1 1 a1 1 $NetBSD: patch-ay,v 1.4 2012/03/10 11:42:38 ryoon Exp $ @ 1.1.1.1 log @Import thunderbird10-10.0.3 as mail/thunderbird10 * This is ESR (Extended Support Release) version. * Fix security bugs @ text @@