Re: relocatable-lib-lgpl: Don't export symbols from static MSVC .obj files

2023-09-07 Thread Simon Josefsson via Gnulib discussion list
Bruno Haible writes: > -#define LIBFOO_DLL_EXPORTED __attribute__((__visibility__("default"))) > -#elif (defined _WIN32 && !defined __CYGWIN__) && BUILDING_SHARED && > BUILDING_LIBFOO > -#define LIBFOO_DLL_EXPORTED __declspec(dllexport) > -#elif (defined _WIN32 && !defined __CYGWIN__) &&

Re: chown and chgrp won't change on systems without sys_lchown()

2023-09-07 Thread Bruno Haible
Jordi Sanfeliu wrote in : > I've detected that chown and chgrp commands will not change the > owner/group of a device file (char or block) that doesn't exist on a > system that don't has the system call sys_lchown. On which

Re: mbcel module for Gnulib?, incomplete multibyte sequences

2023-09-07 Thread Paul Eggert
On 2023-08-07 00:32, Paul Eggert wrote: I'll think about naming. It's been a month and I couldn't think of anything better than to shorten the name from mbcel to mcel, so I did that and installed the attached patches. These patches shouldn't affect behavior; that is, they should only add

Don't use 'throw ()' in C++ 11 or newer

2023-09-07 Thread Bruno Haible
The syntax 'throw ()' is no longer valid in C++ 20, and is deprecated in C++ 17. See . Gnulib was partially up-to-date (lib/cdefs.h since 2021-01-05, m4/gnulib-common.m4 since 2023-09-04). This patch updates the remaining occurrences.

Re: Add info about recommended warning options

2023-09-07 Thread Bruno Haible
I wrote: > 2023-09-05 Bruno Haible > > Add info about recommended warning options. > * HACKING: New section "Warning Options". Going through the same process with clang: I started with most of the ca. 900 diagnostic options at

uchar: Fix references to overridden functions with GNULIB_NAMESPACE

2023-09-07 Thread Bruno Haible
clang 16 also produces these warnings: ../gllib/uchar.h:696:10: warning: The symbol ::iswalnum refers to the system function. Use gnulib::iswalnum instead. [-Wuser-defined-warnings] ../gllib/uchar.h:711:10: warning: The symbol ::iswalpha refers to the system function. Use gnulib::iswalpha

tests: Fix some clang -Wimplicit-fallthrough warnings

2023-09-07 Thread Bruno Haible
Some clang -Wimplicit-fallthrough warnings are easy to fix: test-execute-main.c:95:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] test-sys_file.c:33:5: warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough] 2023-09-07 Bruno

unictype/category-none: Fix clang -Wpedantic warning

2023-09-07 Thread Bruno Haible
clang also gives this warning: unictype/categ_none.c:30:13: warning: initializing 'const void *' with an expression of type 'bool (*)(ucs4_t, uint32_t)' (aka 'bool (*)(unsigned int, unsigned int)') converts between void pointer and function pointer [-Wpedantic] The problem is the initializer

c-*snprintf: Fix some clang -Wmissing-prototypes warnings

2023-09-07 Thread Bruno Haible
Building a gnulib testdir with clang 16 and many warning options, I get these warnings: ./vasnprintf.c:2204:1: warning: no previous prototype for function 'c_vasnprintf' [-Wmissing-prototypes] c-snprintf.c:41:1: warning: no previous prototype for function 'c_snprintf' [-Wmissing-prototypes]