]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Update the patch for bug 2817. Harlan Stenn.
authorHarlan Stenn <stenn@ntp.org>
Mon, 21 Sep 2015 10:53:44 +0000 (10:53 +0000)
committerHarlan Stenn <stenn@ntp.org>
Mon, 21 Sep 2015 10:53:44 +0000 (10:53 +0000)
bk: 55ffe1b8dxRUkGB8F5bW41wFbUhkFg

ChangeLog
configure.ac
sntp/m4/ntp_rlimit.m4

index c5670e34c3df51eefea1c9f92a00e80dac119f92..b5c2197edeb769cfafab72d739bb03696247931c 100644 (file)
--- 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 <stenn@ntp.org>
 
index 6e8022ee5be884ccc58fc7ffdb001e9afd7c07f6..d0214456a3d477c84d69851d94a17053bc97b67c 100644 (file)
@@ -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
index 40317b3fba2215269fed4a0b1f6babaf169d7adc..3be1adefc7da7bd91199b09814345cf4b32626f6 100644 (file)
@@ -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 ======================================================================