Avoid LGPL incompatibility issues by removing assert.
* lib/cpu-supports.c (hwcaps_allowed): Replace assert()s
with defensive returns allowing the passed hwcap.
* modules/cpu-supports: Remove the dependency.
+2025-09-16 Pádraig Brady <P@draigBrady.com>
+
+ cpu-supports: remove assert dependency
+ Avoid LGPL incompatibility issues by removing assert.
+ * lib/cpu-supports.c (hwcaps_allowed): Replace assert()s
+ with defensive returns allowing the passed hwcap.
+ * modules/cpu-supports: Remove the dependency.
+
2025-09-16 Bruno Haible <bruno@clisp.org>
Document msvcrt (native Windows) bugs regarding console output.
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#include <config.h>
-#include <assert.h>
#include <stdlib.h>
#include <string.h>
if (! glibc_hwcap)
return true;
- assert (*glibc_hwcap == '-'); /* Pass HWCAP with a leading - */
+ if (*glibc_hwcap != '-') /* Need to pass HWCAP with a leading - */
+ return true;
/* Match how GLIBC parses tunables as indicated with:
GLIBC_TUNABLES=glibc.cpu.hwcaps=... ld.so --list-tunables | grep hwcaps
hwcaps = "";
}
- assert (hwcaps);
+ if (! hwcaps) /* Shouldn't happen. */
+ return true;
if (! *hwcaps)
return true;
lib/cpu-supports.c
Depends-on:
-assert
attribute
bool
c99