Re: [PATCH] doc: Fix example for all Win32 compiler

2021-12-29 Thread Paul Eggert
If is right, the symbol _WIN32 is really confusing since it doesn't mean one is building for 32-bit Microsoft Windows systems, which is the natural interpretation of that symbol for those who are not already expert in developing for Microsoft Windows. Als

Re: [PATCH] doc: Fix example for all Win32 compiler

2021-12-29 Thread Bruno Haible
Biswapriyo Nath wrote: > AFAIK, HAVE_VISIBILITY is specific to autotools > and it is not defined by the compiler itself. Sure. But the piece of documentation we're talking about is in the Gnulib manual, and Gnulib assumes Autoconf. > gcc documentation also suggests to use _WIN32[1]. > > [1]: htt

Re: [PATCH] doc: Fix example for all Win32 compiler

2021-12-29 Thread Biswapriyo Nath
Thanks for the review. AFAIK, HAVE_VISIBILITY is specific to autotools and it is not defined by the compiler itself. But _WIN32 is defined in the compiler targeting Win32 platform. Using that _WIN32 logic will not be dependent on compiler and build toolchain. Also, clang in mingw does not define _M

Re: [PATCH] doc: Fix example for all Win32 compiler

2021-12-28 Thread Bruno Haible
Hi, As far as I know, with the GCC compiler on native Windows (mingw), HAVE_VISIBILITY gets defined to 1. And the clang compiler on native Windows does define _MSC_VER, in order to be able to use the header files from MSVC. So, your proposed change is a no-op, AFAICS. Bruno

[PATCH] doc: Fix example for all Win32 compiler

2021-12-28 Thread Biswapriyo Nath
From 11c9c60a14a5529f50b50bc06773d8be62fd3da6 Mon Sep 17 00:00:00 2001 From: Biswapriyo Nath Date: Tue, 28 Dec 2021 23:18:52 +0530 Subject: [PATCH] doc: Fix example for all Win32 compiler dllexport and dllimport attributes are available with all compilers targeting Win32 platform. In general