This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


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

(patch) Re: mingw headers are installed over cygwin headers.


Mingw include install fix (plus a missing entry point for DLL when building
under DLL). 

Changes to configure not include, so please rebuild configure.

Tue Jan 11 01:18:01 2000  Mumit Khan  <khan@xraylith.wisc.edu>

	* configure.in (HEADER_SUBDIRS): New variable. Substitute. 
	* Makefile.in (HEADER_SUBDIRS): New variable.
	(install): Use to install Mingw headers to a subdirectory if building
	under Cygwin.
	(DLL_CC_STUFF): Add DLL entry point.

Index: configure.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/cygwin-dev/winsup/mingw/configure.in,v
retrieving revision 1.2
diff -u -3 -p -r1.2 configure.in
--- configure.in	2000/01/11 07:19:58	1.2
+++ configure.in	2000/01/11 07:20:48
@@ -84,6 +84,7 @@ AC_CANONICAL_SYSTEM
 
 configdirs=""
 SUBDIRS=""
+HEADER_SUBDIR=""
 
 case "$target_os" in
 *mingw32msvc*)
@@ -105,6 +106,8 @@ case "$target_os" in
   # overwrite Cygwin's one. Likewise for libgmon.a.
   LIBM_A=
   LIBGMON_A=
+  # Install mingw headers in mingw subdirectory.
+  HEADER_SUBDIR="mingw"
   ;;
 *)
   # Build it for CRTDLL by default.
@@ -132,6 +135,7 @@ AC_SUBST(THREAD_DLL)
 AC_SUBST(LIBM_A)
 AC_SUBST(LIBGMON_A)
 AC_SUBST(SUBDIRS)
+AC_SUBST(HEADER_SUBDIR)
 
 AC_PROG_INSTALL
 AC_OUTPUT(Makefile)
Index: Makefile.in
===================================================================
RCS file: /homes/khan/src/CVSROOT/cygwin-dev/winsup/mingw/Makefile.in,v
retrieving revision 1.2
diff -u -3 -p -r1.2 Makefile.in
--- Makefile.in	2000/01/11 07:19:58	1.2
+++ Makefile.in	2000/01/11 07:21:56
@@ -33,6 +33,10 @@ datadir = @datadir@
 infodir = @infodir@
 includedir = @includedir@
 
+# The Mingw headers are installed under a subdirectory of 
+# $(tooldir)/include when configuring in Cygwin.
+HEADER_SUBDIR = @HEADER_SUBDIR@
+
 SHELL = /bin/sh
 
 INSTALL = @INSTALL@
@@ -132,6 +136,7 @@ xx_$(THREAD_DLL_NAME) xx_mingwthrd.def: 
 
 DLL_OFILES        = mthr.o mthr_init.o
 DLL_CC_STUFF      = -B./ -mdll $(MNO_CYGWIN) -Wl,--image-base,0x6FBC0000 \
+		    -Wl,--entry,_DllMainCRTStartup@12 \
                     $(DLL_OFILES)
 DLL_DLLTOOL_STUFF = --as=$(AS) --dllname $(THREAD_DLL_NAME) \
                     --def mingwthrd.def \
@@ -198,9 +203,10 @@ install: all
 		$(INSTALL_DATA) $$i $(tooldir)/lib/$$i ; \
 	done
 	for sub in . sys ; do \
-	$(mkinstalldirs) $(tooldir)/include/$$sub ; \
+		dstdir=$(tooldir)/include/$(HEADER_SUBDIR)/$$sub ; \
+		$(mkinstalldirs) $$dstdir ; \
 		for i in $(srcdir)/include/$$sub/*.h ; do \
-		  $(INSTALL_DATA) $$i $(tooldir)/include/$$sub/`basename $$i` ; \
+		  $(INSTALL_DATA) $$i $$dstdir/`basename $$i` ; \
 		done ; \
 	done
 	@$(MAKE) subdirs DO=$@ $(FLAGS_TO_PASS)

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