From: Harlan Stenn Date: Mon, 21 Sep 2015 10:53:44 +0000 (+0000) Subject: Update the patch for bug 2817. Harlan Stenn. X-Git-Tag: NTP_4_3_72~2^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a35323b448cd4f780a6afc456570a3dc711a20da;p=thirdparty%2Fntp.git Update the patch for bug 2817. Harlan Stenn. bk: 55ffe1b8dxRUkGB8F5bW41wFbUhkFg --- diff --git a/ChangeLog b/ChangeLog index c5670e34c..b5c2197ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -117,6 +117,7 @@ fixed formatting. Tomasz Flendrich * Pthread autoconf macro cleanup. Harlan Stenn. * Fix progname definition in unity runner scripts. Harlan Stenn. * Clean trailing whitespace in tests/ntpd/Makefile.am. Harlan Stenn. +* Update the patch for bug 2817. Harlan Stenn. --- (4.2.8p3) 2015/06/29 Released by Harlan Stenn diff --git a/configure.ac b/configure.ac index 6e8022ee5..d0214456a 100644 --- a/configure.ac +++ b/configure.ac @@ -929,60 +929,6 @@ esac NTP_RLIMIT_ITEMS -# HMS: Only if we are doing the MLOCKALL stuff... -AC_MSG_CHECKING([for the default number of 4k stack pages]) -AC_ARG_WITH( - [stack-limit], - [AS_HELP_STRING( - [--with-stack-limit], - [? =50 (200 for openbsd) 4k pages] - )], - [ans=$withval], - [ans=yes] -) -case "$ans" in - yes | no) - case "$host" in - *-*-openbsd*) - ans=200 - ;; - *) ans=50 - ;; - esac - ;; - [[1-9]][[0-9]]*) - ;; - *) AC_MSG_ERROR(["--with-stack-limit requires an integer argument."]) - ;; -esac -AC_MSG_RESULT([$ans]) -AC_DEFINE_UNQUOTED([DFLT_RLIMIT_STACK], [$ans], - [Default number of 4k pages for RLIMIT_STACK]) - -# HMS: only if we have RLIMIT_MEMLOCK -AC_MSG_CHECKING([for the default number of megabytes to MEMLOCK]) -AC_ARG_WITH( - [memlock], - [AS_HELP_STRING( - [--with-memlock], - [? =32 (megabytes)] - )], - [ans=$withval], - [ans=yes] -) -case "$ans" in - yes | no) - ans=32 - ;; - [[1-9]][[0-9]]*) ;; - *) AC_MSG_ERROR(["--with-memlock requires an integer argument."]) - ;; -esac -AC_MSG_RESULT([$ans]) -AC_DEFINE_UNQUOTED([DFLT_RLIMIT_MEMLOCK], [$ans], - [Default number of megabytes for RLIMIT_MEMLOCK]) - - # some OSes prefer _exit() in forked children to exit() AC_CHECK_FUNCS([_exit]) ntp_worker_child_exit=exit diff --git a/sntp/m4/ntp_rlimit.m4 b/sntp/m4/ntp_rlimit.m4 index 40317b3fb..3be1adefc 100644 --- a/sntp/m4/ntp_rlimit.m4 +++ b/sntp/m4/ntp_rlimit.m4 @@ -31,9 +31,10 @@ case "$ntp_cv_rlimit_memlock" in AC_SUBST([HAVE_RLIMIT_MEMLOCK]) case "$host" in *-*-*linux*) - HAVE_RLIMIT_MEMLOCK=" memlock 0" ;; - *) HAVE_RLIMIT_MEMLOCK=" memlock 32" ;; + ntp_dflt_rlimit_memlock="0" ;; + *) ntp_dflt_rlimit_memlock="32" ;; esac + HAVE_RLIMIT_MEMLOCK=" memlock $ntp_dflt_rlimit_memlock" ;; esac AC_CACHE_CHECK( @@ -66,5 +67,59 @@ case "$ntp_cv_rlimit_stack" in HAVE_RLIMIT_STACK=" stacksize 50" esac +# HMS: Only if we are doing the MLOCKALL stuff... +AC_MSG_CHECKING([for the default number of 4k stack pages]) +AC_ARG_WITH( + [stack-limit], + [AS_HELP_STRING( + [--with-stack-limit], + [? =50 (200 for openbsd) 4k pages] + )], + [ans=$withval], + [ans=yes] +) +case "$ans" in + yes | no) + case "$host" in + *-*-openbsd*) + ans=200 + ;; + *) ans=50 + ;; + esac + ;; + [[1-9]][[0-9]]*) + ;; + *) AC_MSG_ERROR(["--with-stack-limit requires an integer argument."]) + ;; +esac +AC_MSG_RESULT([$ans]) +AC_DEFINE_UNQUOTED([DFLT_RLIMIT_STACK], [$ans], + [Default number of 4k pages for RLIMIT_STACK]) + +# HMS: only if we have RLIMIT_MEMLOCK +AC_MSG_CHECKING([for the default number of megabytes to MEMLOCK]) +AC_ARG_WITH( + [memlock], + [AS_HELP_STRING( + [--with-memlock], + [? =32 (0 on linux) megabytes] + )], + [ans=$withval], + [ans=yes] +) +case "$ans" in + yes | no) + ans=$ntp_dflt_rlimit_memlock + ;; + [[1-9]][[0-9]]*) ;; + *) AC_MSG_ERROR(["--with-memlock requires an integer argument."]) + ;; +esac +AC_MSG_RESULT([$ans]) +AC_DEFINE_UNQUOTED([DFLT_RLIMIT_MEMLOCK], [$ans], + [Default number of megabytes for RLIMIT_MEMLOCK]) + ])dnl + dnl ======================================================================