This is the mail archive of the mailing list for the GDB project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] memmem removed from gdbserver's AC_CHECK_DECLS.

Building gdbserver for i686-pc-mingw32 with the future gnulib wrapper
showed that both gdbserver and gnulib were checking for the memmem
declaration, and defining HAVE_DECL_MEMMEM.

i686-pc-mingw32-gcc -c -g -O2 -D__USE_MINGW_ACCESS    -I../../../src/gdb/gdbserver/../gnulib -Ibuild-gnulib/gnulib -I../../../src/gdb/gdbserver/../../include -I. -I../../../src/gdb/gdbserver -I../../../src/gdb/gdbserver/../common -I../../../src/gdb/gdbserver/../regformats -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-char-subscripts -Werror version.c
In file included from ../../../src/gdb/gdbserver/server.h:24:0,
                 from i386-avx.c:23:
./config.h:28:0: error: "HAVE_DECL_MEMMEM" redefined [-Werror]
../../../src/gdb/gdbserver/build-gnulib/config.h:45:0: note: this is the location of the previous definition

The gdbserver check was made unnecessary when it started using gnulib.


2012-04-19  Pedro Alves  <>

	* Remove AC_CHECK_DECLS check for memmem.
	* server.h (memmem): Remove declaration.
	* Regenerate.
	* configure: Regenerate.
 gdb/gdbserver/    |    4 ----
 gdb/gdbserver/configure    |   10 ----------
 gdb/gdbserver/ |    2 +-
 gdb/gdbserver/server.h     |    4 ----
 4 files changed, 1 insertions(+), 19 deletions(-)

diff --git a/gdb/gdbserver/ b/gdb/gdbserver/
index ffa4afb..26742ac 100644
--- a/gdb/gdbserver/
+++ b/gdb/gdbserver/
@@ -22,10 +22,6 @@
    you don't. */
-/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't.
-   */
 /* Define to 1 if you have the declaration of `perror', and to 0 if you don't.
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 25d1812..cdd54f1 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -5139,16 +5139,6 @@ fi
 cat >>confdefs.h <<_ACEOF
 #define HAVE_DECL_PERROR $ac_have_decl
-ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
-if test "x$ac_cv_have_decl_memmem" = x""yes; then :
-  ac_have_decl=1
-  ac_have_decl=0
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_MEMMEM $ac_have_decl
 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
 if test "x$ac_cv_have_decl_vasprintf" = x""yes; then :
diff --git a/gdb/gdbserver/ b/gdb/gdbserver/
index ac8223a..96a5f2d 100644
--- a/gdb/gdbserver/
+++ b/gdb/gdbserver/
@@ -167,7 +167,7 @@ AC_TRY_LINK([
-AC_CHECK_DECLS([strerror, perror, memmem, vasprintf, vsnprintf])
+AC_CHECK_DECLS([strerror, perror, vasprintf, vsnprintf])
 AC_CHECK_TYPES(socklen_t, [], [],
 [#include <sys/types.h>
diff --git a/gdb/gdbserver/server.h b/gdb/gdbserver/server.h
index a419c36..49f94d0 100644
--- a/gdb/gdbserver/server.h
+++ b/gdb/gdbserver/server.h
@@ -59,10 +59,6 @@ extern void perror (const char *);
-extern void *memmem (const void *, size_t , const void *, size_t);
 extern int vasprintf(char **strp, const char *fmt, va_list ap);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]