+Sat Mar 18 22:52:37 2000 Christopher Faylor <cgf@cygnus.com>
+
+ Patch suggested by Mumit Khan <khan@xraylith.wisc.edu>:
+ * strace.cc (_impure_ptr): New global variable to make strace build
+ under Cygwin gcc.
+
Sat Mar 18 12:45:10 2000 Christopher Faylor <cgf@cygnus.com>
* Makefile.in: Make CXXFLAGS consistent with cygwin.
include $(srcdir)/../Makefile.common
-MINGW_INCLUDES:=-I$(updir)/mingw/include
+MINGW_INCLUDES:=-I$(mingw_source)/include -I$(cygwin_source)/include -I$(w32api_include)
MINGW_CXXFLAGS:=$(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES)
MINGW_CFLAGS:=$(CFLAGS) -mno-cygwin $(MINGW_INCLUDES)
ifdef VERBOSE
$(CC) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
else
- @echo $(CC) -mno-cygwin -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\
+ @echo $(CC) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\
$(CC) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS)
endif
#include <signal.h>
#include "sys/strace.h"
+/* GCC runtime library's C++ EH code unfortunately pulls in stdio, and we
+ get undefine references to __impure_ptr, and hence the following
+ hack. It should be reasonably safe however as long as this file
+ is built using -mno-cygwin as is intended. */
+int _impure_ptr;
+
static const char *pgm;
static int forkdebug = 0;
static int numerror = 1;