ports/devel/gdb/patches/patch-include_filenames_h

23 lines
785 B
Text

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);