diff options
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index a43b13d..cc93915 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -3651,6 +3651,17 @@ compare_positive_ints (const void *ap, const void *bp) return * (int *) ap - * (int *) bp; } +/* String compare function for qsort. */ + +int +compare_strings (const void *arg1, const void *arg2) +{ + const char **s1 = (const char **) arg1; + const char **s2 = (const char **) arg2; + + return strcmp (*s1, *s2); +} + #define AMBIGUOUS_MESS1 ".\nMatching formats:" #define AMBIGUOUS_MESS2 \ ".\nUse \"set gnutarget format-name\" to specify the format." |