Il 12/06/2012 03:22, Isaac Dunham ha scritto:
Performance, surely. But if there's
consensus that performance does not matter that
much with musl, perhaps we should default to the
slow version with musl.
The test as it stands is error out on unsupported platforms unless
user specifies
On 06/18/2012 06:01 PM, Rich Felker wrote:
If the closeout approach works best for coreutils, that's the
business of the coreutils' maintainers, not my business. However, as I
discussed on the musl list, I think it's bad design, and I would
highly recommend other projects not follow
On Mon, Jun 18, 2012 at 08:17:25PM -0600, Eric Blake wrote:
On 06/18/2012 06:01 PM, Rich Felker wrote:
If the closeout approach works best for coreutils, that's the
business of the coreutils' maintainers, not my business. However, as I
discussed on the musl list, I think it's bad
fi
+],
[dnl The last known bugs in glibc strtold(), as of this writing,
dnl were fixed in version 2.8
AC_EGREP_CPP([Lucky user],
@@ -101,6 +116,8 @@ numeric_equal (long double x, long double y)
[case "$host_os" in
# Guess y
r *argv[])
return 0;
}
+#else
+
+/* No multithreading available. */
+
+#include
+
+int
+main ()
+{
+ fputs ("Skipping test: multithreading not enabled\n", stderr);
+ return 77;
+}
+
+#endif
+
/* Without locking, the results of this test would be:
glibcOK
mus
|| p->tm_sec != s.tm_sec);
-}
- ]])],
- [gl_cv_func_tzset_clobber=no],
- [gl_cv_func_tzset_clobber=yes],
- [case "$host_os" in
- # Guess all is fine on glibc systems.
- *-gnu* | gnu*) gl_cv_func_tzset_clobber="guessing no" ;;
-
# Guess yes on glibc systems.
+*-gnu* | gnu*) gl_cv_func_ffsll_works="guessing yes" ;;
+ # Guess yes on musl systems.
+*-musl*) gl_cv_func_ffsll_works="guessing yes" ;;
+ #
v_func_expm1f_ieee=yes],
+ [gl_cv_func_expm1f_ieee=no],
+ [case "$host_os" in
+# Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_expm1f_ieee="guessing yes" ;;
+# Guess yes on musl systems.
es],
+ [gl_cv_func_localeconv_works=no],
+ [case "$host_os" in
+# Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_localeconv_works="guessing yes" ;;
+# Guess y
@@ read_utmp_from_file (char const *file, idx_t *n_entries, STRUCT_UTMP **utmp_buf,
# if READUTMP_USE_SYSTEMD || HAVE_UTMPX_H || HAVE_UTMP_H
-# if defined UTMP_NAME_FUNCTION /* glibc, musl, macOS, FreeBSD, NetBSD, Minix, AIX, IRIX, Solaris, Cygwin, Android */
+# ifdef __ANDROID__
c b/tests/test-fenv-except-trapping-2.c
index 57b9341f46..257107d2ee 100644
--- a/tests/test-fenv-except-trapping-2.c
+++ b/tests/test-fenv-except-trapping-2.c
@@ -433,8 +433,8 @@ main (int argc, char *argv[])
GNU/kFreeBSD/i386, GNU/kFreeBSD/x86_64,
musl li
in practice.
No, ungetc normally can only unget one character. musl is fairly
unique in allowing you to unget more, and this is not really
intentional, just a consequence of the fact that we don't do any
buffer switching for unget.
Did you miss the end of my last email? I already sent a sketch
).
As for musl, would adding __freadahead be sufficient to make it use
__freadahead, or does gnulib hard-code knowledge about which systems
have which stdio extension functions?
Depending on the function name you choose, we would have to add an m4
check to see if __freadahead() is defined; but once we know
.
As for musl, would adding __freadahead be sufficient to make it use
__freadahead, or does gnulib hard-code knowledge about which systems
have which stdio extension functions?
Depending on the function name you choose, we would have to add an m4
check to see if __freadahead() is defined
to be not worth the effort (as the user experience
with filenames and shell in such locales was found to be terrible).
BTW I see MB_LEN_MAX is 4 on musl libc.
The value of 4 is sufficient to accommodate all stateless encodings in
use, including UTF-8 (which was restricted from max. 6 to 4 bytes
that are
supported are Windows XP and newer. Only the latest version of
mingw is tested; older versions are not supported.
* GNU Hurd 0.7 is rarely tested.
* NetBSD 7.0 or newer is rarely tested.
* Native Windows, with MSVC as compiler, is rarely tested and low
priority.
* musl libc
A testdir created with
./gnulib-tool --create-testdir --dir=../testdir1 --single-configure
--with-c++-tests `./posix-modules`
is now known to build fine on the following platforms:
- glibc
- musl libc
- macOS 10.13
- FreeBSD 12
- NetBSD 7
- OpenBSD 6.5
- Solaris 10, 11.0, 11.4
given.
In this code, it needs to analyze what iconv() actually did and distinguish
replacements that are OK (no need to activate the ASCII fallback) and those
that are worse than the ASCII fallback. For example:
- Replacing 'ç' with '?' (NetBSD, Solaris 11) or '*' (musl) or NUL (IRIX)
esult = !p;
free (p);
return result;]])
@@ -23,22 +24,17 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[ac_cv_func_malloc_0_nonnull=no],
[case "$host_os" in
# Guess yes on platforms where we know the result.
- *-gnu* | gnu* | *-musl* | freebsd* | m
Before testing __GNU_LIBRARY__, one has to include either
(which only exists on glibc, musl, Android, and Cygwin systems) or some
header file such as or .
2021-07-17 Bruno Haible
Fix cross-compilation test results.
* m4/memmem.m4 (gl_FUNC_MEMMEM_SIMPLE): When cross
gives unlimited permission to copy and/or distribute it,
@@ -20,6 +20,8 @@ AC_DEFUN_ONCE([gl_FENV_EXCEPTIONS_TRACKING]
dnl On musl libc, on those CPUs where fenv-except-tracking-raise.c
dnl uses the "generic" approach, feraiseexcept does not trigger traps
dnl because
d even if it did the little extra is worth to mention our own
operating system in a list of other operating systems.
- Is Alpine Linux a GNU system? (It uses musl libc instead of glibc.) [4]
No, Alpine is not based on the GNU system, much like Android. See
https://www.gnu.org/philosophy/android-an
[
+ #include
+ #ifdef __GNU_LIBRARY__
+#if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 17) || (__GLIBC__ >
2)) && !defined __UCLIBC__
+ Unlucky
+#endif
+ #endif
+ ],
+
char *buf, size_t
bufsize)
# elif HAVE_PTHREAD_API /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX,
Haiku, Cygwin */
extern
-# if defined _WIN32 || defined __CYGWIN__
+# if defined _WIN32 && !defined __CYGWIN__
__declspec(dllimport)
# endif
pthread_mutex_t *gl_get
mp.
Something emacs needs to get fixed. On musl libc systems like Alpine,
you don't have utmp nor wtmp.
Beside that the emacs heuristic to find backups of wmtp is very
questionable, it wouldn't match on any of my systems.
There are better ways to determine the boot time.
> I expect that other
:
musl, FreeBSD, NetBSD, Solaris, Haiku.
This patch does it. (This was on my TODO list for GNU gettext for many years.)
2024-02-14 Bruno Haible
localename: Notice setlocale() invocations on more platforms.
* lib/localename.c (HAVE_LOCALE_NULL): Define also on musl, FreeBSD
.
* doc/posix-functions/feholdexcept.texi: Mention the new module and the
bugs on glibc, musl libc, FreeBSD, AIX, mingw, MSVC.
* doc/posix-functions/fesetenv.texi: Mention the new module and the bugs
on musl libc, FreeBSD, NetBSD, AIX, Solaris, Cygwin, mingw, MSVC
' failed
Aborted
So, to me it looks like a regression between Alpine Linux 3.9 and 3.10.
It's arguably a bug in the test case, since Alpine uses musl libc which does not
support time zone abbreviations longer than 6 bytes, whereas the test case uses
an time zone abbreviation of 2000 bytes (to te
easoning, see
<https://www.openwall.com/lists/musl/2023/04/18/5>.
In particular, the module 'wcscmp' is no longer obsolete.
2023-04-18 Bruno Haible
wcscmp: Add tests.
* tests/test-wcscmp.c: New file, based on tests/unistr/test-strcmp.h.
* modules/wcscmp-tests: New f
Hi Paul, Eric,
I wrote:
It seems to me that
- musl's getopt is POSIX compliant (at least it passes the 3 parts of
the test when run individually).
- The getopt.m4 test fails only because musl does not support one of
the 3 known ways to reset option processing. Does it support
s a mismatch with the
one emitted by install-info.o (the T error symbol) and hence warns.
I imagine this would result is some very strange runtime failures if
anyone ever observed install-info hit an xalloc_die condition.
As a test, building on musl (which lacks the error API, for some reason)
encodings such as ISO-2022-JP-2.
This later turned out to be not worth the effort (as the user experience
with filenames and shell in such locales was found to be terrible).
Excellent. Info like that is nigh on impossible to search for.
BTW I see MB_LEN_MAX is 4 on musl libc.
The value of 4
# For the platforms that support $ORIGIN, see
+ # <https://lekensteyn.nl/rpath.html>.
+ # glibc systems, Linux with musl libc: yes. Android: no.
+ # Hurd: no
<http://lists.gnu.org/archive/html/bug-hurd/2019-02/msg00049.html>.
+ linux*-android*) ;;
+ gnu*) ;;
linux*
afe on
OpenBSD, AIX.
* querying the name of the global locale (LC_ALL case)
A unit test shows that this is not MT-safe on
musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
This info, together with a test program that runs setlocale(...,NULL)
in different threads at different
removed.
+
2019-12-16 Bruno Haible
setlocale-null: Remove need for -lpthread on musl libc, *BSD, Haiku.
diff --git a/lib/dfa.c b/lib/dfa.c
index 6b89613a9..fa947463b 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -422,9 +422,6 @@ struct lexer_state
MB_CUR_MAX > 1. */
wint_t wc
t;);
+ fclose (fp);
+ fp = fopen ("conftest.x", "wx");
+ if (fp != NULL)
+/* 'x' ignored */
+return 1;
+ else if (errno == EEXIST)
+return 0;
+ else
+/* 'x' rejected */
+return 2;
+}]])],
+ [gl_cv_func_fopen_mode_x=yes],
+ [gl_cv_func_fopen_mod
@@
#include
#include
+#include
+#include
-#include "fpe-trapping.h"
#include "macros.h"
/* musl libc does not support floating-point exception trapping, even where
the hardware supports it. See
<https://wiki.musl-libc.org/functional-diff
w %0" : : "m" (*));
-__asm__ __volatile__ ("ldmxcsr %0" : : "m" (*));
- }
- }
-
- return 0;
-}
-
-#elif defined _WIN32 && !defined __CYGWIN__
-/* native Windows */
-
-# include
-
-static int
-sigfpe_on_invalid ()
-{
- /* Documentation:
-
e useful to put it up on gnu.org. I do not recall any such
thing from RMS having been announced around that time, or at all.
> - Is Alpine Linux a GNU system? (It uses musl libc instead of glibc.)
[4]
>
> No, Alpine is not based on the GNU system ...
>
> -
cter. */
buf[0] = c;
+
wc = (char32_t) 0xBADFACE;
ret = mbrtoc32 (, buf, 1, );
ASSERT (ret == 1);
- if (c < 0x80)
-/* c is an ASCII character. */
-ASSERT (wc == c);
- else
-/* argv
ch compiler: $CC = ? $CFLAGS = ? $CPPFLAGS = ? $LDFLAGS = ?
> - which linker is being used by the compiler?,
I am not sure this would be helpful, since as I described my use case is
definitely not something GNU Lib supports, but for the context purposes: the
system is musl based wi
These two patches work around an ISO C compliance bug of wmemcmp()
on several platforms.
The point is that in ISO C, a "wide character" is any wchar_t value.
A "wide character" is not constrained to the range 0..INT_MAX. For
the precise reasoning, see
<https://www.openwall
y, microblaze, nios2,
+x86, arm, mips (32-bit or n32 ABI), powerpc32, sparc32, s390, hppa, m68k, sh, csky, microblaze, nios2,
@item
Linux kernel 5.1 (2019) and later with musl libc 1.2 (2020) and later on x86,
@item
-Linux on arc, loong32, riscv32 and x86_64-x32,
+Linux on arc, loong32, ork1, ris
e makeinfo
+ by default outputs ASCII approximations to characters.
+
2024-01-02 Bruno Haible
strverscmp: Work around bug in musl libc 1.2.3 and in Cygwin.
diff --git a/doc/Makefile b/doc/Makefile
index 19e3c34dde..2cb1dc2e77 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -9,9 +9,11 @@ do
0 - 1900
+ && result->tm_wday == 4
+ && result->tm_yday == 0
+ && result->tm_isdst == 0))
+ {
+fputs ("Skipping test: TZ='Europe/Paris' is not Paris time\n",
+ stderr);
+return 77;
+ }
+ }
+
/* Note: The result->tm_gmtoff values and the result->tm_zone values are the
same (3600, "CET" or 7200, "CEST") across all tested platforms:
glibc, musl, macOS, FreeBSD, NetBSD, OpenBSD, Minix, Cygwin, Android. */
--
2.44.0
/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-03-31 Bruno Haible
+
+ quotearg: Improve documentation.
+ * lib/quotearg.h: Refer to specification of $'...' syntax. Document a
+ limitation of QA_ELIDE_OUTER_QUOTES.
+
2024-03-31 Bruno Haible
canonicalize[-lgpl] tests: Fix test failure
directory on various plaforms:
+ - Linux/glibc systems,
+ - Linux/musl systems,
+ - macOS,
+ - FreeBSD,
+ - NetBSD,
+ - OpenBSD,
+ - AIX,
+ - Solaris 10 and 11,
+ - Cygwin,
+ - Haiku,
+ - Android,
+ - and other platforms of your choice.
+
+There is a continuous integration that regularly p
he @samp{b} directive, required by ISO C23,
+on some platforms:
+glibc 2.34, musl libc, macOS 12.5, FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2,
+AIX 7.2, Solaris 11.4, Cygwin 2.9.0.
+@item
This function does not support the @samp{F} directive on some platforms:
NetBSD 3.0, Cygwin 1.5.x.
@item
d
]])],
+ [gl_cv_func_snprintf_directive_n="guessing
yes"],
+ [gl_cv_func_snprintf_directive_n="guessing
no"])
+ ;;
# Guess yes on musl systems.
*-musl*) gl_cv_func_snprintf_directive_n="guessing
yes";;
# Guess yes on FreeBSD >= 5.
, _lt, sizeof (struct tm)) != 0;
-]])],
- [gl_cv_func_gettimeofday_clobber=no],
- [gl_cv_func_gettimeofday_clobber=yes],
- [# When cross-compiling:
- case "$host_os" in
- # Guess all is fine on glibc systems.
-*-gnu* | gnu*) gl_cv_func_gettimeofday_clobb
5be675..3523dbb8f8 100644
--- a/doc/posix-functions/fesetexceptflag.texi
+++ b/doc/posix-functions/fesetexceptflag.texi
@@ -17,7 +17,7 @@
glibc 2.37/i386, glibc 2.37/x86_64,
@c https://sourceware.org/bugzilla/show_bug.cgi?id=30988
glibc 2.37/powerpc,
-musl libc, Mac OS X 10.5, mingw.
+musl libc, Ma
amp;& errno == ESRCH))
return false;
+# endif
return true;
}
@@ -359,7 +361,9 @@ read_utmp_from_file (char const *file, idx_t *n_entries,
STRUCT_UTMP **utmp_buf,
struct utmp_alloc a = {0};
-# if defined UTMP_NAME_FUNCTION /* glibc, musl, macOS, FreeBSD, NetBSD, Minix,
AIX, IRIX,
This new module implements the ISO C 99 functions for saving and restoring the
floating-point exception flags.
The unit tests uncovered bugs in glibc, musl libc (*), macOS, AIX, mingw.
(*) The one on musl libc is a documented limitation.
2023-10-30 Bruno Haible
fenv-exceptions
nux (!).
Thanks; I intended to propose this change and ask you whether it's OK with you.
I noted the test failure on:
Linux 2.4.22 / glibc 2.3.2 (Fedora 1)
Linux 4.4 / glibc 2.23 (Ubuntu 16.04)
Linux 4.18 / glibc 2.28 (CentOS 8)
Linux 5.8 / glibc 2.32 (Ubuntu 20.10)
as well as
Linux 5.4.4
d list for certain CHOSTs
as Rich suggests to reduce noise, but I don't think we can
do this accurately very quickly.
I think for Gentoo's efforts, I might just build up a set
of cache variables for glibc/musl on each arch to
reduce the noise in logs. But that's time consuming
and brittle stil
gn. */
+# define _PRINTF_NAN_LEN_MAX 3
+# elif (__GLIBC__ >= 2) || MUSL_LIBC || defined __sun || defined __CYGWIN__
+/* glibc, musl libc, Solaris libc, and Cygwin produce "[-]nan". */
+# define _PRINTF_NAN_LEN_MAX 4
+# elif defined _AIX
+/* AIX produces "[-]NaNQ". */
+# def
23-03-19 Bruno Haible
vasnwprintf: Fix test failures on musl libc.
diff --git a/lib/wmemcpy-impl.h b/lib/wmemcpy-impl.h
index f0a7007506..c243acfa15 100644
--- a/lib/wmemcpy-impl.h
+++ b/lib/wmemcpy-impl.h
@@ -4,7 +4,7 @@
This file is free software: you can redistribute it and/or modi
six-functions/wcsncmp.texi
+++ b/doc/posix-functions/wcsncmp.texi
@@ -8,6 +8,14 @@
Portability problems fixed by Gnulib:
@itemize
+@item
+This function compares the wide characters as if they were unsigned, although
+@code{wchar_t} is signed, on some platforms:
+glibc 2.14.1 on x86 or x86_64, m
The type 'char32_t' is a more modern alternative to 'wchar_t', because it
solves the problems mentioned in
<https://www.gnu.org/software/libunistring/manual/html_node/The-wchar_005ft-mess.html>.
To make a migration from 'wchar_t' to 'char32_t' attractive, it is
important that on glibc an
d)
free (needle);
free (haystack);
}
+
+ /* Test case from Yves Bastide.
+ <https://www.openwall.com/lists/musl/2014/04/18/2> */
+ {
+const UNIT input[] =
+ { 'p', 'l', 'a', 'y', 'i', 'n', 'g', ' ', 'p', 'l', 'a', 'y', ' ', 'p',
+'l', 'a', 'y', ' ',
min == 40);
+ASSERT (result->tm_hour == 6);
+ASSERT (result->tm_mday == 26);
+ASSERT (result->tm_mon == 10 - 1);
+ASSERT (result->tm_year == 2017 - 1900);
+ASSERT (result->tm_wday == 4);
+ASSERT (result->tm_yday == 298);
+ASSERT (result->tm_isdst == 0);
+#if HAVE_STRUCT_
native-ld/with-mold that contains a symlink
ld -> /.../bin/mold
and use CC="gcc -B/alternative-ld/with-mold".
On exotic systems with non-ELF binary format, modifying libtool.m4 is needed.
But most distros are not in this situation; they use the glibc or musl dynamic
loader
is missing on some platforms:
+macOS 11.1, musl libc, FreeBSD 5.2.1, NetBSD 5.0, OpenBSD 3.8, Minix 3.1.8, AIX 5.1, HP-UX 11, IRIX 6.5, Solaris 11.4, Cygwin 1.7.7, mingw, MSVC 14, Android 4.4.
@end itemize
Portability problems not fixed by Gnulib:
@itemize
-@item
-This function is missing
/test-unistd-c++.cc: Test also the declaration of 'getpass'.
* doc/glibc-functions/getpass.texi: A length limit exists also on uClibc
and musl.
* NEWS: Mention the change.
diff --git a/NEWS b/NEWS
index 1328e73..e763c91 100644
--- a/NEWS
+++ b/NEWS
@@ -42,6 +42,9 @@ User visibl
1 0 rpl_lstat,chmod
save_cwd,chmod,lchmod,...
HP-UX 1 0 rpl_lstat,chmod
save_cwd,chmod,lchmod,...
musl/Linux 1 0 fchmodat --
glibc/Hurd 1 0 fchmodat
,
+ [ac_cv_func_getgroups_works=no],
+ [case "$host_os" in # ((
+ # Guess yes on glibc systems.
+*-gnu* | gnu*) ac_cv_func_getgroups_works="guessing yes" ;;
+ # Guess yes on musl systems.
+*-musl*) ac_
than 512 or 1024 in integer,
floating-point and pointer output on some platforms:
AIX 7.1, Solaris 10/x86, mingw, MSVC/clang.
diff --git a/doc/posix-functions/fwprintf.texi
b/doc/posix-functions/fwprintf.texi
index db42363cfa..fed553f2b5 100644
--- a/doc/posix-functions/fwprintf.texi
+++ b/doc/posi
ABI), powerpc, sparc, s390, hppa, m68k, sh, csky, microblaze, nios2,
@item
-Linux with musl libc on x86,
-@item
-Linux/riscv32,
-@item
-Mac OS X on x86 and powerpc,
-@item
-GNU/Hurd/x86,
-@item
-GNU/kFreeBSD/x86,
-@item
-FreeBSD/x86,
+Linux kernel 5.1 (2019) and later with musl libc 1.2 (2020) and
}
+ }
+
+ return 0;
+}
+
+#elif defined _WIN32 && !defined __CYGWIN__
+/* native Windows */
+
+# include
+
+static int
+sigfpe_on_invalid ()
+{
+ /* Documentation:
+ <https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/controlfp-s> */
+ unsigned int co
else
/* On most platforms, the bytes 0x80..0xFF map to U+0080..U+00FF.
But on musl libc, the bytes 0x80..0xFF map to U+DF80..U+DFFF. */
- ASSERT (wc == (btowc (c) == 0xDF00 + c ? btowc (c) : c));
+ ASSER
gl_cv_func_signbit_gcc="guessing yes" ;;
+ *-gnu* | gnu*) gl_cv_func_signbit_builtins="guessing yes" ;;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_signbit_gcc="guessing yes" ;;
+ *-musl*) gl_cv_func_signbit
100644
--- a/tests/test-fenv-except-state-2.c
+++ b/tests/test-fenv-except-state-2.c
@@ -21,25 +21,13 @@
/* Specification. */
#include
-#include
-
-#include "fpe-trapping.h"
#include "macros.h"
-/* musl libc does not support floating-point exception trapping, ev
L_LIBC /* musl libc */
/* mbstate_t is defined in .
It is an opaque aligned 8-byte struct, of which at most the first
4 bytes are used.
For more details, see src/multibyte/mbrtowc.c. */
# define _GL_MBSTATE_INIT_SIZE 4
# define _GL_MBSTATE_ZERO_SIZE 4
} is not defined on all non-glibc platforms:
+musl libc, macOS 12.5, FreeBSD 13.2, NetBSD 9.3, OpenBSD 7.2, Minix 3.3, AIX
7.2, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 3.4.6, Android 13.
+@item
+The macro @code{FNM_FILE_NAME} is not defined on some platforms:
+NetBSD 9.3, AIX 7.2, HP-UX 11.31
int fail = 0;
fail |= posixtm_test ();
fail |= tzalloc_test ();
fail |= quarter_test ();
fail |= errno_test ();
+ if (is_C_locale)
+fail |= locales_test (english);
+ else
+{
+#if MUSL_LIBC
+ if (fail == 0)
+{
+ fputs ("Skipping test: musl libc do
it assumes the
> very worst about the operating system when it can't perform runtime
> tests, which leads to the maximum amount of gnulib being enabled.
> Depending on how much of gnulib is included, in the worst case, gnulib
> might attempt to replace large parts of the standard librar
Hi Paul,
> similarly for lchmod on non-symlinks.
When I see a new autoconf test that activates an override, in order to
guarantee a certain documented behaviour, I like to add a unit test -
because in the past we several times had an override that would not
have passed the autoconf test either.
k],
+[gl_cv_func_getcwd_succeeds_beyond_4k],
[# Remove any remnants of a previous test.
rm -rf confdir-14B---
# Arrange for deletion of the temporary directory this test creates.
@@ -126,7 +126,7 @@ main ()
return fail;
}
]])],
- [gl_cv_func_getcwd_abort_bug=no],
+ [gl_cv_func
nts of a previous test.
rm -rf confdir-14B---
# Arrange for deletion of the temporary directory this test creates.
@@ -128,7 +128,7 @@ main ()
return fail;
}
]])],
- [gl_cv_func_getcwd_abort_bug=no],
+ [gl_cv_func_getcwd_succeeds_beyond_4k=yes],
[dnl An abort will pro
+ b/ChangeLog
@@ -1,3 +1,14 @@
+2024-02-02 Ørjan Malde
+
+ Further improve cross-compilation for midipix.
+* m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Guess yes for midipix.
+* m4/rename.m4 (gl_FUNC_RENAME): Treat midipix like Linux with glibc or
+ musl libc.
+*
ux, AIX, HP-UX, IRIX, OSF/1, Solaris, Cygwin, Android */
# include
#endif
-#if HAVE_MACHINE_HAL_SYSINFO_H
+#if HAVE_MACHINE_HAL_SYSINFO_H /* OSF/1 */
# include
#endif
-#if HAVE_SYS_TABLE_H
+#if HAVE_SYS_TABLE_H /* OSF/1 */
# include
#endif
@@ -51,13 +54,16 @@
#endif
#if HAVE_SYS_SYSCTL_H &a
After adding a few more tests for *printf %c and %lc, I noticed yet another
*printf bug. This time not in musl libc, but in _all_ platforms other than
musl libc.
For glibc, I registered it as
https://sourceware.org/bugzilla/show_bug.cgi?id=30257 .
This patch adds a workaround to the (narrow
On Alpine Linux 3.7.0, which uses musl libc, I see these test failures in
libunistring:
FAIL: test-striconveha
==
../../tests/test-striconveha.c:327: assertion 'retval == 0' failed
FAIL test-striconveha (exit status: 134)
FAIL: test-u16-conv-from-enc
@@ OpenBSD 3.8.
@item
The constants @code{ALTMON_1} to @code{ALTMON_12} are not defined on some
platforms:
-glibc 2.26 and many others.
+glibc 2.26, musl libc, Mac OS X 10.13, NetBSD 8.0, OpenBSD 6.5, AIX 7.2, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Haiku, Cygwin 2.9.
@item
The constants @code{ERA}, @code
clang on Windows, by default, does not link with '-loldnames' (like mingw and
MSVC 14 do). This means that programs that use open(), close(), etc. will get
link errors by default.
For more than 10 years, Microsoft has been deprecating these function names:
access
chdir
chmod
close
creat
dup
dup2
quot;/", desired) == 0)
+ result |= 2;
+else if (errno != ENOTDIR)
+ result |= 4;
+return result;
+ ]])],
+ [gl_cv_func_chmod_works=yes],
+ [gl_cv_func_chmod_works=no],
+ [case "$host_os" in
+ # Guess no on AIX, IRIX,
{
@@ -181,7 +181,7 @@ setlocale_null_unlocked (int category, char *buf, size_t bufsize)
#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */
-/* Use a lock, so that no two threads can invoke setlocale_nu
Doc regarding functions introduced in Android API level 33.
diff --git a/lib/freadahead.h b/lib/freadahead.h
index 35052c1c19..f4fc26cbd7 100644
--- a/lib/freadahead.h
+++ b/lib/freadahead.h
@@ -32,7 +32,7 @@
STREAM must not be wide-character oriented. */
-#if HAVE___FREADAHEAD /* musl libc
nd - fp->_IO_read_ptr;
diff --git a/lib/freadseek.c b/lib/freadseek.c
index 5fd2dd7ca..b11845cd5 100644
--- a/lib/freadseek.c
+++ b/lib/freadseek.c
@@ -36,7 +36,8 @@ freadptrinc (FILE *fp, size_t increment)
/* Keep this code in sync with freadptr! */
#if HAVE___FREADPTRINC /*
Since CheriBSD is derived from FreeBSD, it sounds likely that FreeBSD's random()
function is equally not multithread-safe.
To verify this hypothesis, I wrote a MT-safety test for random(). The result
(with a REPEAT_COUNT of 100):
glibc OK
musl libc OK
FreeBSD 11.0 Expected value
CT_UTMP **utmp_buf,
free (sessions);
}
- /* Relocate the string pointers back to their natural position. */
- {
-char *stringlim = (char *) a.utmp + a.alloc_bytes;
-
-for (idx_t i = 0; i < a.filled; i++)
- {
-a.utmp[i].ut_user = (intptr_t) a.utmp[i].ut_user + strin
- m68k, for gcc versions >= 4.7, but only for Linux
# - mips, never at all
# * The NetBSD C library provides this function on
# - arm, arm64,
# - i386,
# - sparc,
# - m68k,
# - riscv64.
# Other C libraries (e.g. glibc, musl libc) do not pr
ate
a18f7ce3c term-style-control tests: Fix link error.
4a468b774 term-style-control: Fix typo in comment.
7c4dbc521 term-style-control: Add tests.
993d0646c term-style-control: New module.
092288d12 autoupdate
0d8714b7c _Noreturn: beware of C's _Noreturn in C++ pre C++11
453ff9404 Support cro
+}
+
+# elif defined __s390__ || defined __s390x__
+
+int
+feclearexcept (int exceptions)
+{
+ exceptions &= FE_ALL_EXCEPT;
+
+ unsigned int fpc, orig_fpc;
+ _FPU_GETCW (orig_fpc);
+# if FE_INEXACT == 8 /* glibc compatible FE_* values */
+ fpc = orig_fpc & ~(exceptions << 16);
+ if ((fpc &a
return ((fp->_flags & _IO_NO_WRITES) != 0
>|| ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
>&& fp->_IO_read_base != NULL));
> diff --git a/lib/freadptr.c b/lib/freadptr.c
> index 5aeadf3da..ffb801039 100644
> --- a/lib/freadp
LL;
size = fp->_IO_read_end - fp->_IO_read_ptr;
diff --git a/lib/freadseek.c b/lib/freadseek.c
index e7b0c7bdb..5fd2dd7ca 100644
--- a/lib/freadseek.c
+++ b/lib/freadseek.c
@@ -36,7 +36,7 @@ freadptrinc (FILE *fp, size_t increment)
/* Keep this code in sync with freadptr! */
#if HAVE
4, powerpc/powerpc64, ia64, s390/s390x,
riscv64, m68k, hppa
* Linux with musl libc
on i386/x86_64
* GNU/kFreeBSD
on i386/x86_64
* Hurd
on i386
* Mac OS X 10.13
on x86_64
* FreeBSD 11 and MidnightBSD 0.8
on i386/x86_64, arm64
* NetBSD 7
on i386/x86_64
new
systems). Making cross-compilation nice helps the development of new
operating systems, and not just for established things like glibc/musl.
As you saw in my gnulib wiki page, I literally inject 120 environment
variables to make gnulib assume the very best about my operating system.
I'd rather be c
82b6..11364d3 100644
--- a/doc/posix-functions/setlocale.texi
+++ b/doc/posix-functions/setlocale.texi
@@ -34,7 +34,7 @@ platforms:
musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
To make these invocations multithread-safe, you need the Gnulib module
@code{setlocale}, or yo
CriticalSection (lock);
+ ret = nl_langinfo_unlocked (item);
+ LeaveCriticalSection (lock);
+
+ return ret;
+}
+
+# elif HAVE_PTHREAD_API
+
+extern
+# if defined _WIN32 || defined __CYGWIN__
+ __declspec(dllimport)
+# endif
+ pthread_mutex_t *gl_get_nl_langinfo_lock (void);
+
+#
301 - 400 of 426 matches
Mail list logo