From 105d09b2cb6103c97fcea2d37c98fa08c22a4380 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Sun, 7 Dec 2003 17:22:29 +0000 Subject: [PATCH] 2003-12-07 Andrew Cagney * defs.h (DEPRECATED_STREQN, DEPRECATED_STREQ): Simplify by directly calling strcmp equivalents. Add disclaimer. --- gdb/ChangeLog | 5 +++++ gdb/defs.h | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index c1d9b4e552..46063c8f93 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2003-12-07 Andrew Cagney + + * defs.h (DEPRECATED_STREQN, DEPRECATED_STREQ): Simplify by + directly calling strcmp equivalents. Add disclaimer. + 2003-12-06 Andrew Cagney * remote.c (remote_fetch_registers): For short packets, explicitly diff --git a/gdb/defs.h b/gdb/defs.h index 98d151d029..9db0af2cdc 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -160,8 +160,13 @@ typedef bfd_vma CORE_ADDR; making untested changes, the remaining references were deprecated rather than replaced. */ -#define DEPRECATED_STREQ(a,b) (*(a) == *(b) ? !strcmp ((a), (b)) : 0) -#define DEPRECATED_STREQN(a,b,c) (*(a) == *(b) ? !strncmp ((a), (b), (c)) : 0) +/* DISCLAIMER: cagney/2003-11-23: Simplified definition of these + macros so that they just map directly onto strcmp equivalent. I'm + not responsible for any breakage due to code that relied on the old + underlying implementation. */ + +#define DEPRECATED_STREQ(a,b) (strcmp ((a), (b)) == 0) +#define DEPRECATED_STREQN(a,b,c) (strncmp ((a), (b), (c)) == 0) /* Check if a character is one of the commonly used C++ marker characters. */ extern int is_cplus_marker (int); -- 2.11.0