From be8efac78d067c138ad8dda03df4336e73f94887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sat, 8 Jan 2022 11:51:07 +0100 Subject: New upstream version 1.0 --- tests/zerosize-ptr.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/zerosize-ptr.h') diff --git a/tests/zerosize-ptr.h b/tests/zerosize-ptr.h index d5592c58..af4ca713 100644 --- a/tests/zerosize-ptr.h +++ b/tests/zerosize-ptr.h @@ -1,5 +1,5 @@ /* Return a pointer to a zero-size object in memory. - Copyright (C) 2009-2018 Free Software Foundation, Inc. + Copyright (C) 2009-2022 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -36,8 +36,9 @@ /* Test whether mmap() and mprotect() are available. We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX. HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an - mprotect() function in libgcc.a. */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT + mprotect() function in libgcc.a. + And OS/2 kLIBC has and mprotect(), but not mmap(). */ +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __KLIBC__ # include # include # include @@ -58,7 +59,7 @@ zerosize_ptr (void) { /* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is not defined on HP-UX 11 (since it does not support MAP_FIXED). */ -#if HAVE_SYS_MMAN_H && HAVE_MPROTECT +#if HAVE_SYS_MMAN_H && HAVE_MPROTECT && !defined __KLIBC__ # if HAVE_MAP_ANONYMOUS const int flags = MAP_ANONYMOUS | MAP_PRIVATE; const int fd = -1; -- cgit v1.2.3