This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] gdb: fix cygwin check in configure script
- From: Steffen Sledz <sledz at dresearch-fe dot de>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>, Steffen Sledz <sledz at dresearch-fe dot de>
- Date: Fri, 15 Nov 2013 21:57:33 +0100
- Subject: [PATCH] gdb: fix cygwin check in configure script
- Authentication-results: sourceware.org; auth=none
- References: <87bo1lvg70 dot fsf at fleche dot redhat dot com>
Avoids false positives if the search pattern "lose" is found in path
descriptions in comments generated by the preprocessor.
see <https://sourceware.org/bugzilla/show_bug.cgi?id=16152>
Signed-off-by: Steffen Sledz <sledz@dresearch-fe.de>
---
gdb/configure | 2 +-
gdb/configure.ac | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/gdb/configure b/gdb/configure
index 8b20a13..0edba09 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -12766,7 +12766,7 @@ lose
#endif
_ACEOF
if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
- $EGREP "lose" >/dev/null 2>&1; then :
+ $EGREP "^lose$" >/dev/null 2>&1; then :
gdb_cv_os_cygwin=yes
else
gdb_cv_os_cygwin=no
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 88db73a..4d1c419 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1880,7 +1880,7 @@ AC_SUBST(WERROR_CFLAGS)
# In the Cygwin environment, we need some additional flags.
AC_CACHE_CHECK([for cygwin], gdb_cv_os_cygwin,
-[AC_EGREP_CPP(lose, [
+[AC_EGREP_CPP(^lose$, [
#if defined (__CYGWIN__) || defined (__CYGWIN32__)
lose
#endif],[gdb_cv_os_cygwin=yes],[gdb_cv_os_cygwin=no])])
--
1.8.1.4