gnulib - GNU portability library - News
posted by haible, Fri 26 Apr 2024 10:12:40 AM UTC
If you are developer on a package that uses GNU gnulib as part of its build system:
gnulib-tool has been known for being slow for many years. We have listened to your complaints. We have rewritten gnulib-tool in another programming language (Python). It is between 8 times and 100 times faster than the previous implementation.
[...]
posted by haible, Sun 21 Apr 2024 10:47:35 AM UTC
If you are developer on a package that uses GNU gnulib as part of its build system:
gnulib-tool has been known for being slow for many years. We have listened to your complaints. A rewrite of gnulib-tool in another programming language (Python) is ready for beta-testing. It is between 8 times and 100 times faster than the original gnulib-tool.
[...]
posted by haible, Sat 15 Apr 2023 10:31:06 PM UTC
An Android app has a UI written in Java, not on top of a C/C++ based GUI toolkit (GNOME, Qt, KDE, wxWidgets, ...). Gnulib cannot help you porting this part of an application to Android.
But when an application has a large part written in C, and you want to reuse this part in the Android app, Gnulib is useful. Recently, Android has been added to
[...]
posted by haible, Sun 20 Nov 2022 04:27:43 PM UTC
Spawning a new process has traditionally been coded by a fork() call, followed by an execv/execl/execlp/execvp call in the child process. This is often referred to as the fork + exec idiom.
In 90% of the cases, there is something better: the posix_spawn/posix_spawnp functions.
[...]
posted by akim, Wed 13 Jan 2021 12:17:37 PM UTC
Gnulib features bitset, a module to support operations on lists of bits.
Its API is rich, and includes:
- all the expected operations on single bit (set, toggle, test, etc.);
- all the traditional binary bitwise operators (and, or, xor), often in two flavors (return new values, or perform in place);
posted by haible, Wed 30 Dec 2020 03:10:08 PM UTC
There are three main motivations for using multiple threads in a program:
- To get computational tasks done is less time, by using more than one CPU core at once.
- For event handling. The older approach with signals and/or file descriptors in non-blocking mode leads to brittle and racey programs. Using separate threads that use read() or
posted by haible, Wed 23 Dec 2020 01:42:02 PM UTC
When writing algorithmic code, the classical approach is to define the data structures, write the algorithm, debug it, and then profile it. It often occurs that you notice that a certain list, set, or map can get large and that this costs CPU time. Then, you change the data structure, adapt the code (often substantial changes), debug it again, and [...]
posted by haible, 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. [...]
posted by eggert, Tue 08 Dec 2020 01:47:09 AM UTC
Gnulib's intprops module has new macros INT_ADD_OK, INT_SUBTRACT_OK, and INT_MULTIPLY_OK that support portable overflow checking while doing integer arithmetic. On GNU platforms the macros typically use only a single machine instruction more than ordinary integer arithmetic would.
posted by haible, Sat 21 Apr 2012 07:22:08 PM UTC
New major features were added recently:
- Large File Support on native Windows: The new module 'largefile' enables upport for files larger than 2 GiB not only on Unix platforms, but also on native Windows.
- The Microsoft Visual C compiler is now supported for most modules, through the wrapper scripts 'compile' and 'ar-lib' from Automake.
Powered by Savane 3.13-4b4b.
Corresponding source code