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]

Re: [PATCH] memmem removed from gdbserver's AC_CHECK_DECLS.

On 04/19/2012 11:24 AM, Pedro Alves wrote:

> 2012-04-19  Pedro Alves  <>
> 	* Remove AC_CHECK_DECLS check for memmem.
> 	* server.h (memmem): Remove declaration.
> 	* Regenerate.
> 	* configure: Regenerate.

This actually breaks the build on Windows ...

../../../src/gdb/gdbserver/server.c: In function 'handle_search_memory_1':
../../../src/gdb/gdbserver/server.c:757:7: error: implicit declaration of function 'memmem' [-Werror=implicit-function-declaration]
../../../src/gdb/gdbserver/server.c:757:17: error: assignment makes pointer from integer without a cast [-Werror]

because nothing is pointing the compiler at gnulib's build directory, which
contains the generated replacement headers (string.h in this case), which contain
the memmem declaration for systems that need it, such as mingw32.

Missed it before because I had originally written that patch against the
new wrapper gnulib, which didn't have this bug.

This fixes it.  Applied.

Note GDB does the exact same thing (discounting the source path difference):

  INCGNU = -I$(srcdir)/gnulib -Ignulib

2012-04-19  Pedro Alves  <>

	* (INCGNU): Add -Ignulib.
 gdb/gdbserver/ |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdb/gdbserver/ b/gdb/gdbserver/
index 94b9cae..1e78f98 100644
--- a/gdb/gdbserver/
+++ b/gdb/gdbserver/
@@ -77,7 +77,7 @@ ustinc = @ustinc@

 # gnulib
 LIBGNU = gnulib/libgnu.a
-INCGNU = -I$(srcdir)/../gnulib
+INCGNU = -I$(srcdir)/../gnulib -Ignulib

 # We build gnulib directly under the gdbserver build directory, but
 # its sources don't live directly under gdbserver's source directory.

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