]> Savannah Git Hosting - gnulib.git/commitdiff
get-rusage-data: Fix link error on FreeBSD 12.2/arm64.
authorBruno Haible <bruno@clisp.org>
Mon, 7 Dec 2020 18:43:06 +0000 (19:43 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 7 Dec 2020 18:43:06 +0000 (19:43 +0100)
* modules/get-rusage-data (configure.ac): Test whether sbrk exists.
* lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
trivially of sbrk is not available.
* doc/glibc-functions/sbrk.texi: Mention that the function does not
exist in FreeBSD 12.2/arm64.
* doc/glibc-functions/brk.texi: Likewise.

ChangeLog
doc/glibc-functions/brk.texi
doc/glibc-functions/sbrk.texi
lib/get-rusage-data.c
modules/get-rusage-data

index 249a50ba1152d305d9aab45f8fc5d8735f249ab9..3458610f9a5cf370559055f9a942f781f7c2bf0a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2020-12-07  Bruno Haible  <bruno@clisp.org>
+
+       get-rusage-data: Fix link error on FreeBSD 12.2/arm64.
+       * modules/get-rusage-data (configure.ac): Test whether sbrk exists.
+       * lib/get-rusage-data.c (get_rusage_data_via_setrlimit): Define
+       trivially of sbrk is not available.
+       * doc/glibc-functions/sbrk.texi: Mention that the function does not
+       exist in FreeBSD 12.2/arm64.
+       * doc/glibc-functions/brk.texi: Likewise.
+
 2020-12-07  Bruno Haible  <bruno@clisp.org>
 
        Correct interaction between gl_ANSI_CXX and AC_PROG_CXX.
index bc046ca4dd8b5e577e2ac7dcc6e275bbd46f5707..2ca966dd4c858e639121758ae1d3f377cb75c385 100644 (file)
@@ -25,5 +25,5 @@ Portability problems not fixed by Gnulib:
 @itemize
 @item
 This function is missing on some platforms:
-AIX 5.1, Cygwin 2.9, mingw, MSVC 14.
+FreeBSD 12.2/arm64, AIX 5.1, Cygwin 2.9, mingw, MSVC 14.
 @end itemize
index 8a3d5ab6776b638c3c2797fabe7ab125ccbc1643..c09459fc9bae476a1c2a98fde4baa20d69f8b30e 100644 (file)
@@ -14,5 +14,5 @@ Portability problems not fixed by Gnulib:
 @itemize
 @item
 This function is missing on some platforms:
-AIX 5.1, mingw, MSVC 14.
+FreeBSD 12.2/arm64, AIX 5.1, mingw, MSVC 14.
 @end itemize
index 411be94423848b5598af46eb88b8e845089751c9..234442c36ec5d7d594488bd175260308b66619c4 100644 (file)
 #if !(defined __APPLE__ && defined __MACH__) || defined TEST
 /* Implement get_rusage_data_via_setrlimit().  */
 
-# if HAVE_SETRLIMIT && defined RLIMIT_DATA && !defined __HAIKU__
+# if HAVE_SETRLIMIT && defined RLIMIT_DATA && HAVE_SBRK && !defined __HAIKU__
 
 #  ifdef _AIX
 #   define errno_expected() (errno == EINVAL || errno == EFAULT)
@@ -166,9 +166,9 @@ get_rusage_data_via_setrlimit (void)
   struct rlimit orig_limit;
 
 #  ifdef __hpux
-  /* On HP-UX 11.00, setrlimit() RLIMIT_DATA of does not work: It cannot
+  /* On HP-UX 11.00, setrlimit() of RLIMIT_DATA does not work: It cannot
      restore the previous limits.
-     On HP-UX 11.11, setrlimit() RLIMIT_DATA of does not work: It sometimes
+     On HP-UX 11.11, setrlimit() of RLIMIT_DATA does not work: It sometimes
      has no effect on the next sbrk() call.  */
   {
     struct utsname buf;
index 6840116589eca3ec304705eec587e7d40fa3bafa..4206ec964275ab945ffa558acbc8deee984c6a0a 100644 (file)
@@ -14,7 +14,7 @@ getpagesize
 vma-iter
 
 configure.ac:
-AC_CHECK_FUNCS_ONCE([setrlimit])
+AC_CHECK_FUNCS_ONCE([sbrk setrlimit])
 gl_FUNC_MMAP_ANON
 
 Makefile.am: