SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

View file

@ -0,0 +1,23 @@
Our libiberty does not have filename_cmp(), but since it would simply
call strcmp(), use a macro when building gdb and most of all libbfd.
Fixes linking against libbfd with our system libiberty.
Index: include/filenames.h
--- include/filenames.h.orig
+++ include/filenames.h
@@ -80,11 +80,10 @@ extern "C" {
(IS_DIR_SEPARATOR_1 (dos_based, (f)[0]) \
|| HAS_DRIVE_SPEC_1 (dos_based, f))
-extern int filename_cmp (const char *s1, const char *s2);
-#define FILENAME_CMP(s1, s2) filename_cmp(s1, s2)
+#define FILENAME_CMP(s1, s2) strcmp(s1, s2)
+#define filename_cmp(s1, s2) strcmp(s1, s2)
-extern int filename_ncmp (const char *s1, const char *s2,
- size_t n);
+#define filename_ncmp(s1, s2, n) strncmp(s1, s2, n)
extern hashval_t filename_hash (const void *s);