newsgnulib - GNU portability library - News: Gnulib can help your C++ programs

 
 
Latest News
Gnulib helps you porting to Android posted by haible, Sat 15 Apr 2023 10:31:06 PM UTC
Gnulib helps you get away from fork() + exec() posted by haible, Sun 20 Nov 2022 04:27:43 PM UTC
Gnulib provides versatile bit-set implementations posted by akim, Wed 13 Jan 2021 12:17:37 PM UTC
Gnulib supports portable multithreading posted by haible, Wed 30 Dec 2020 03:10:08 PM UTC
Gnulib helps you write efficient algorithms posted by haible, Wed 23 Dec 2020 01:42:02 PM UTC

Gnulib can help your C++ programs

Item posted by Bruno Haible <haible> on Wed 16 Dec 2020 08:31:05 PM UTC.

Typically you test your programs on glibc systems.  Gnulib helps you to have the same program compile and work fine on other platforms, such as musl libc systems, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Solaris, Cygwin, mingw, MSVC, Haiku, and even Minix and Android.

To do so, Gnulib implements many functions specified by POSIX or found in glibc if the platforms lacks them, and adds workarounds for bugs in the platform implementations.  These substitutes are now (since 2019, actually) available also to C++ programs, if your program accesses these functions directly.

This does, however, not mean that if the libstdc++ or some boost library use the libc functions, they will benefit from the same workarounds; this is outside the scope of what Gnulib can provide.

Also, portability problems in the libstdc++ library itself are outside of the scope of Gnulib as well.

Despite these limitations: enjoy!

 

Back to the top

Powered by Savane 3.13-4448.
Corresponding source code