Re: Issues with posix functions on modern macOS/Xcode

2020-12-01 Thread Martin Storsjö
On Tue, 1 Dec 2020, Martin Storsjö wrote: On Xcode 12.2 on macOS 11.0 on arm64, the following sequence fails to build: $ ./gnulib-tool --create-testdir --dir=/tmp/testdir-posix \ --single-configure --avoid=havelib-tests \ `./posix-modules` $ cd /tmp/testdir-posix

Predefined defines on arm64-macOS

2020-12-01 Thread Martin Storsjö
With Xcode 12.2 on arm64 macOS: $ : | gcc -E -dM - | sort > predefs.out $ grep -i '\(apple\|mach\|arm\|aarch\)' predefs.out #define __AARCH64EL__ 1 #define __AARCH64_SIMD__ 1 #define __APPLE_CC__ 6000 #define __APPLE__ 1 #define __ARM64_ARCH_8__ 1 #define __ARM_64BIT_STATE 1 #define __ARM_ACLE 20

Re: Issues with C++ overloaded math functions in math.h in the wrong scope

2020-01-04 Thread Martin Storsjö
On Sat, 4 Jan 2020, Bruno Haible wrote: Hi Martin, In this particular case, this math.h header ends up included in a context wrapped in 'extern "C" {}' surrounding it, which breaks the C++ function overloading. The general convention is that header files must be included outside of any 'exte

Re: Issues with _GL_CXXALIAS_SYS (strndup)

2020-01-04 Thread Martin Storsjö
Hi Bruno, On Sat, 4 Jan 2020, Bruno Haible wrote: Hi Martin, Thank you for the careful analysis. The root cause for this issue seems to be that clang has a builtin for the strndup function, even if the target platform actually doesn't have it. This manifests itself during configure like thi

Issues with C++ overloaded math functions in math.h in the wrong scope

2020-01-02 Thread Martin Storsjö
Hi, When building a test package shared in https://savannah.gnu.org/bugs/?57406 (https://haible.de/bruno/gnu/testdir-posix-mingw.tar.gz) with my mingw/clang/libc++ based toolchain, I ran into some errors in the gltests subdirectory. One of the errors looks like this: In file included from

Issues with _GL_CXXALIAS_SYS (strndup)

2020-01-02 Thread Martin Storsjö
Hi, When building a test package shared in https://savannah.gnu.org/bugs/?57406 (https://haible.de/bruno/gnu/testdir-posix-mingw.tar.gz) with my mingw/clang/libc++ based toolchain, I ran into some errors in the gltests subdirectory. One of the issues looks like this: ../gllib/string.h:920:

Re: isnan function conflicts with C++ standard library declarations

2019-08-29 Thread Martin Storsjö
On Wed, 28 Aug 2019, Bruno Haible wrote: This issue can crop up e.g. when trying to build gettext for mingw (which has got the gnulib isnan function bundled, even if it isn't used). I'm regularly building gettext on mingw and haven't seen this issue. Therefore thanks again for the reproduction

Re: isnan function conflicts with C++ standard library declarations

2019-08-28 Thread Martin Storsjö
Hi Bruno, On Wed, 28 Aug 2019, Bruno Haible wrote: Hi Martin, Well in addition to macOS, I can also still reproduce the issue on Linux (Ubuntu 18.04, with its default GCC 7) as well, so maybe it's an issue with newer C++ standard headers, regardless of platform? Indeed. I can reproduce it w

Re: isnan function conflicts with C++ standard library declarations

2019-08-28 Thread Martin Storsjö
Hi, On Wed, 28 Aug 2019, Bruno Haible wrote: Hi, Martin Storsjö wrote: When the isnan function is enabled in gnulib, the added bits in math.h break if included in C++ translation units. A minimal reproducion example is available at https://martin.st/temp/gnulib-isnan-repro-0.0.0.tar.gz

isnan function conflicts with C++ standard library declarations

2019-08-27 Thread Martin Storsjö
Hi, When the isnan function is enabled in gnulib, the added bits in math.h break if included in C++ translation units. A minimal reproducion example is available at https://martin.st/temp/gnulib-isnan-repro-0.0.0.tar.gz (preconfigured and directly buildable) and https://martin.st/temp/gnuli