head 1.2; access; symbols pkgsrc-2014Q1:1.1.0.4 pkgsrc-2014Q1-base:1.1 pkgsrc-2013Q4:1.1.0.2 pkgsrc-2013Q4-base:1.1; locks; strict; comment @# @; 1.2 date 2014.06.11.12.36.17; author joerg; state dead; branches; next 1.1; commitid XezNXGnjQIlDq6Ex; 1.1 date 2013.11.13.13.27.45; author ryoon; state Exp; branches; next ; commitid yl48ej1BkkKQs7dx; desc @@ 1.2 log @Retire old thunderbird versions. @ text @$NetBSD: patch-av,v 1.1 2013/11/13 13:27:45 ryoon Exp $ --- mozilla/xulrunner/app/nsXULRunnerApp.cpp.orig 2012-08-25 00:31:36.000000000 +0000 +++ mozilla/xulrunner/app/nsXULRunnerApp.cpp @@@@ -6,6 +6,27 @@@@ #include "nsXPCOMGlue.h" #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"); +} #ifdef XP_WIN #include #define snprintf _snprintf @@@@ -251,6 +272,7 @@@@ private: int main(int argc, char* argv[]) { + netbsd_fixrlimit(); char exePath[MAXPATHLEN]; nsresult rv = mozilla::BinaryPath::Get(argv[0], exePath); if (NS_FAILED(rv)) { @ 1.1 log @Import thunderbird17-17.0.10 as mail/thunderbird17. Mozilla Thunderbird is a redesign of the Mozilla mail component. The goal is to produce a cross platform stand alone mail application using the XUL user interface language. This version uses the gtk2 toolkit. This package tracks 24 ESR release branch. @ text @d1 1 a1 1 $NetBSD: patch-av,v 1.7 2012/09/02 06:43:40 ryoon Exp $ @