aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/utils.h')
-rw-r--r--gdb/utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/utils.h b/gdb/utils.h
index 6df752fd00a..48330a16f7f 100644
--- a/gdb/utils.h
+++ b/gdb/utils.h
@@ -59,6 +59,14 @@ extern int subset_compare (const char *, const char *);
int compare_positive_ints (const void *ap, const void *bp);
int compare_strings (const void *ap, const void *bp);
+/* Compare C strings for std::sort. */
+
+static inline bool
+compare_cstrings (const char *str1, const char *str2)
+{
+ return strcmp (str1, str2) < 0;
+}
+
/* A wrapper for bfd_errmsg to produce a more helpful error message
in the case of bfd_error_file_ambiguously recognized.
MATCHING, if non-NULL, is the corresponding argument to