diff options
-rw-r--r-- | gdb/ChangeLog | 8 | ||||
-rw-r--r-- | gdb/utils.c | 10 | ||||
-rw-r--r-- | gdb/utils.h | 4 |
3 files changed, 14 insertions, 8 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 232b90b..56e7206 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,11 @@ +2015-03-02 Joel Brobecker <brobecker@adacore.com> + + * utils.h: Remove <stdbool.h> #include. + (producer_is_gcc): Change return type to "int". + * utils.c (producer_is_gcc): Change return type to int. + Return 1 instead of true, and 0 instead of false. + Adjust function documentation accordingly. + 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com> * s390-linux-nat.c (have_regset_vxrs): New static variable. diff --git a/gdb/utils.c b/gdb/utils.c index 3ce5814..4f9f4f0 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -3269,11 +3269,11 @@ producer_is_gcc_ge_4 (const char *producer) return minor; } -/* Returns true if the given PRODUCER string is GCC and sets the MAJOR - and MINOR versions when not NULL. Returns false if the given PRODUCER +/* Returns nonzero if the given PRODUCER string is GCC and sets the MAJOR + and MINOR versions when not NULL. Returns zero if the given PRODUCER is NULL or it isn't GCC. */ -bool +int producer_is_gcc (const char *producer, int *major, int *minor) { const char *cs; @@ -3299,11 +3299,11 @@ producer_is_gcc (const char *producer, int *major, int *minor) if (*cs && isspace (*cs)) cs++; if (sscanf (cs, "%d.%d", major, minor) == 2) - return true; + return 1; } /* Not recognized as GCC. */ - return false; + return 0; } /* Helper for make_cleanup_free_char_ptr_vec. */ diff --git a/gdb/utils.h b/gdb/utils.h index d8afa79..b8e1aff 100644 --- a/gdb/utils.h +++ b/gdb/utils.h @@ -21,8 +21,6 @@ #ifndef UTILS_H #define UTILS_H -#include <stdbool.h> - #include "exceptions.h" extern void initialize_utils (void); @@ -304,7 +302,7 @@ extern pid_t wait_to_die_with_timeout (pid_t pid, int *status, int timeout); #endif extern int producer_is_gcc_ge_4 (const char *producer); -extern bool producer_is_gcc (const char *producer, int *major, int *minor); +extern int producer_is_gcc (const char *producer, int *major, int *minor); extern int myread (int, char *, int); |