all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fwd: patch NtEmacs for cygwin gmake 3.81
       [not found] <10E16F629C2D4FD9A750307619DA6FA0@katufjPC>
@ 2007-11-19  4:28 ` Miles Bader
  2007-11-19  9:21   ` Jason Rumney
  0 siblings, 1 reply; 2+ messages in thread
From: Miles Bader @ 2007-11-19  4:28 UTC (permalink / raw)
  To: Emacs-Devel

[-- Attachment #1: Type: text/plain, Size: 266 bytes --]

I was sent the attached patch, but am not really in a position to evaluate it.

Thanks,

-Miles


---------- Forwarded message ----------
From: fujii <katu23@k-fineview.gr.jp>
Date: Nov 18, 2007 4:55 PM
Subject: patch NtEmacs for cygwin gmake 3.81
To: miles@gnu.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: em-w32-20071118.diff --]
[-- Type: text/x-diff; name=em-w32-20071118.diff, Size: 26895 bytes --]

diff -urN ./cvsroot/emacs/leim/makefile.w32-in ./emacs/leim/makefile.w32-in
--- ./cvsroot/emacs/leim/makefile.w32-in	2007-10-04 06:12:05.290745700 +0900
+++ ./emacs/leim/makefile.w32-in	2007-11-14 20:46:01.496355500 +0900
@@ -34,7 +34,7 @@
 # byte-compile Emacs Lisp files, and generate the file leim-list.el.
 BUILT_EMACS = $(THISDIR)/$(dot)$(dot)/src/$(BLD)/emacs.exe
 
-buildlisppath=$(CURDIR)/$(dot)$(dot)/lisp
+buildlisppath=$(dot)$(dot)/lisp
 
 # How to run Emacs.
 RUN_EMACS = "$(BUILT_EMACS)" -batch --no-init-file --no-site-file --multibyte
diff -urN ./cvsroot/emacs/lisp/makefile.w32-in ./emacs/lisp/makefile.w32-in
--- ./cvsroot/emacs/lisp/makefile.w32-in	2007-10-04 06:12:28.690745700 +0900
+++ ./emacs/lisp/makefile.w32-in	2007-11-15 21:38:04.183200000 +0900
@@ -27,7 +27,6 @@
 SQUOTE='
 # '
 
-lisp = $(CURDIR)
 srcdir = $(CURDIR)/..
 
 # You can specify a different executable on the make command line,
@@ -41,10 +40,12 @@
 EMACSOPT = -batch --no-init-file --no-site-file --multibyte
 
 # Set EMACSLOADPATH correctly (already defined in environment).
-EMACSLOADPATH=$(lisp)
+# EMACSLOADPATH=$(lisp)
 
 lisptagsfiles1 = $(lisp)/*.el
 lisptagsfiles2 = $(lisp)/*/*.el
+lisptagsfiles1w32 = $(lispw32)/*.el
+lisptagsfiles2w32 = $(lispw32)/*/*.el
 ETAGS = "../lib-src/$(BLD)/etags"
 
 # Files to compile before others during a bootstrap.  This is done to
@@ -54,11 +55,11 @@
 # bootstrapping.
 
 COMPILE_FIRST = \
-	$(lisp)/emacs-lisp/byte-opt.el \
-	$(lisp)/emacs-lisp/bytecomp.el \
-	$(lisp)/subr.el \
-	$(lisp)/progmodes/cc-mode.el \
-	$(lisp)/progmodes/cc-vars.el
+	$(lispw32)/emacs-lisp/byte-opt.el \
+	$(lispw32)/emacs-lisp/bytecomp.el \
+	$(lispw32)/subr.el \
+	$(lispw32)/progmodes/cc-mode.el \
+	$(lispw32)/progmodes/cc-vars.el
 
 # The actual Emacs command run in the targets below.
 # The quotes around $(EMACS) are here because the user could type
@@ -98,11 +99,11 @@
 #          this can break with GNU Make 3.81 and later if sh.exe is used.
 custom-deps: $(lisp)/cus-load.el $(lisp)/loaddefs.el doit
 	@echo Directories: $(WINS)
-	-$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) -f custom-make-dependencies $(lisp) $(WINS)
+	-$(emacs) -l cus-dep --eval $(ARGQUOTE)(setq find-file-hook nil)$(ARGQUOTE) -f custom-make-dependencies $(lispw32) $(WINS)
 
 finder-data: $(lisp)/loaddefs.el doit
 	@echo Directories: $(WINS)
-	$(emacs) -l finder -f finder-compile-keywords-make-dist $(lisp) $(WINS)
+	$(emacs) -l finder -f finder-compile-keywords-make-dist $(lispw32) $(WINS)
 
 $(lisp)/loaddefs.el:
 	$(MAKE) $(MFLAGS) loaddefs.el-$(SHELLTYPE)
@@ -156,7 +157,7 @@
 	@echo Directories: . $(WINS_ALMOST)
 	$(emacs) -l autoload \
 		--eval $(ARGQUOTE)(setq find-file-hook nil find-file-suppress-same-file-warnings t)$(ARGQUOTE) \
-		-f w32-batch-update-autoloads "$(lisp)/loaddefs.el" . $(WINS_ALMOST)
+		-f w32-batch-update-autoloads "$(lispw32)/loaddefs.el" . $(WINS_ALMOST)
 
 $(lisp)/subdirs.el:
 	$(MAKE) $(MFLAGS) update-subdirs
@@ -173,7 +174,7 @@
 	echo ))>> $(lisp)/subdirs.el
 
 update-subdirs-SH: doit
-	$(srcdir)/update-subdirs $(lisp); \
+	$(srcdir)/update-subdirs $(lispw32); \
 	for file in $(WINS); do \
 	   $(srcdir)/update-subdirs $$file; \
 	done;
@@ -189,10 +190,10 @@
 	$(emacs) -l authors -f batch-update-authors $(srcdir)/etc/AUTHORS $(srcdir)
 
 TAGS: $(lisptagsfiles1) $(lisptagsfiles2)
-	$(ETAGS) $(lisptagsfiles1) $(lisptagsfiles2)
+	$(ETAGS) $(lisptagsfiles1w32) $(lisptagsfiles2w32)
 
 TAGS-LISP: $(lisptagsfiles1) $(lisptagsfiles2)
-	$(ETAGS) -o TAGS-LISP $(lisptagsfiles1) $(lisptagsfiles2)
+	$(ETAGS) -o TAGS-LISP $(lisptagsfiles1w32) $(lisptagsfiles2w32)
 
 .SUFFIXES: .elc .el
 
@@ -227,7 +228,7 @@
 	  echo Compiling $$el; \
 	  $(emacs) -l loaddefs -f batch-byte-compile-if-not-done $$el; \
 	done
-	for dir in $(lisp) $(WINS); do \
+	for dir in $(lispw32) $(WINS); do \
 	  for el in $$dir/*.el; do \
 	    if test -f $$el; \
 	    then \
@@ -254,7 +255,7 @@
 	  echo Compiling $$el; \
 	  $(emacs) -f batch-byte-compile $$el || exit 1; \
 	done
-	for dir in $(lisp) $(WINS); do \
+	for dir in $(lispw32) $(WINS); do \
 	  for el in $$dir/*.el; do \
 	    echo Compiling $$el; \
 	    $(emacs) -f batch-byte-compile $$el || exit 1; \
@@ -267,7 +268,7 @@
 	for %%f in ($(lisp)/calc/*.el) do $(emacs) -f batch-byte-compile %%f
 
 compile-calc-SH:
-	for el in $(lisp)/calc/*.el; do \
+	for el in $(lispw32)/calc/*.el; do \
 	  echo Compiling $$el; \
 	  $(emacs) -f batch-byte-compile $$el || exit 1; \
 	done
@@ -289,7 +290,7 @@
 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
 #          this can break with GNU Make 3.81 and later if sh.exe is used.
 recompile: mh-autoloads doit $(lisp)/progmodes/cc-mode.elc
-	$(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lisp)
+	$(emacs) --eval $(ARGQUOTE)(batch-byte-recompile-directory 0)$(ARGQUOTE) $(lispw32)
 
 # Update MH-E internal autoloads. These are not to be confused with
 # the autoloads for the MH-E entry points, which are already in
@@ -321,7 +322,7 @@
 	   --eval "(setq find-file-suppress-same-file-warnings t)" \
 	   --eval "(setq make-backup-files nil)" \
 	   -f w32-batch-update-autoloads \
-	   "$(lisp)/mh-e/mh-loaddefs.el" ./mh-e
+	   "$(lispw32)/mh-e/mh-loaddefs.el" ./mh-e
 
 pre-mh-loaddefs.el-SH:
 	echo ";;; mh-loaddefs.el --- automatically extracted autoloads" > $@
diff -urN ./cvsroot/emacs/nt/configure.bat ./emacs/nt/configure.bat
--- ./cvsroot/emacs/nt/configure.bat	2007-10-21 10:13:29.107369700 +0900
+++ ./emacs/nt/configure.bat	2007-11-18 13:31:38.418462200 +0900
@@ -42,7 +42,7 @@
 rem  cygwin compiled gmake 3.78.1:        fails[5]      fails[2,5]
 rem  cygwin compiled gmake 3.79.1:        fails[3,5]    fails[2?,5]
 rem  cygwin compiled make 3.80:           okay[6]       fails?[7]
-rem  cygwin compiled make 3.81:           fails         fails?[7]
+rem  cygwin compiled make 3.81:           okay[9]       fails?[7]
 rem  mingw32 compiled make 3.79.1:        okay          okay
 rem  mingw32 compiled make 3.80:          okay          okay?[7]
 rem  mingw32 compiled make 3.81:          okay          okay[8]
@@ -59,6 +59,12 @@
 rem    	look for "cygpath" near line 85 of gmake.defs.
 rem [7] not recommended; please report if you try this combination.
 rem [8] tested only on Windows XP.
+rem [9] if failed try on command prompt
+rem      $>set path=%path%;<cygwin-install-dir>\bin
+rem      $>cd <emacs-dir>\nt
+rem      $>configure --with-gcc --no-cygwin [options]
+rem      $>make install
+rem     tested only Windows Vista.
 rem
 
 if exist config.log del config.log
@@ -89,6 +95,9 @@
 set doldflags=
 set sep1=
 set sep2=
+rem set usew32ime=
+rem set withoutreconvert=
+rem set winver=
 
 rem ----------------------------------------------------------------------
 rem   Handle arguments.
@@ -108,6 +117,8 @@
 if "%1" == "--without-gif" goto withoutgif
 if "%1" == "--without-tiff" goto withouttiff
 if "%1" == "--without-xpm" goto withoutxpm
+rem if "%1" == "--enable-w32-ime" goto withime
+rem if "%1" == "--without-reconversion" goto withoutreconv
 if "%1" == "" goto checkutils
 :usage
 echo Usage: configure [options]
@@ -125,6 +136,8 @@
 echo.   --without-gif           do not use giflib or libungif
 echo.   --without-tiff          do not use libtiff
 echo.   --without-xpm           do not use libXpm
+rem echo.   --enable-w32-ime        build with w32 input method editor
+rem echo.   --without-reconversion  build without reconvertstring
 goto end
 rem ----------------------------------------------------------------------
 :setprefix
@@ -212,6 +225,19 @@
 goto again
 
 rem ----------------------------------------------------------------------
+
+rem :withime
+rem set usew32ime=Y
+rem shift
+rem goto again
+
+rem ----------------------------------------------------------------------
+rem :withoutreconv
+rem set withoutreconvert=Y
+rem shift
+rem goto again
+
+rem ----------------------------------------------------------------------
 rem    Check that necessary utilities (cp and rm) are present.
 :checkutils
 echo Checking for 'cp'...
@@ -220,7 +246,7 @@
 echo Checking for 'rm'...
 rm junk.bat
 if exist junk.bat goto needrm
-goto checkcompiler
+goto checkversion
 :needcp
 echo You need 'cp' (the Unix file copy program) to build Emacs.
 goto end
@@ -230,6 +256,40 @@
 goto end
 
 rem ----------------------------------------------------------------------
+rem   Check for Windows Version.
+rem   _WIN32_WINDOWS and _WIN32_WINNT are automatically defined by WINVER.
+
+:checkversion
+echo Checking for Windows Version ...
+
+ver > junk.txt
+
+findstr "6000" junk.txt > NUL
+if errorlevel 0 goto WVISTA
+
+findstr "XP" junk.txt > NUL
+if errorlevel 0 goto WXP
+
+findstr "2000" junk.txt > NUL
+if errorlevel 0 goto W2K
+
+:WNT
+set usercflags=%usercflags%%sep1%-DWINVER=0x0400
+goto ver_end
+
+:WVISTA
+set usercflags=%usercflags%%sep1%-DWINVER=0x0606
+goto ver_end
+:WXP
+set usercflags=%usercflags%%sep1%-DWINVER=0x0501
+goto ver_end
+:W2k
+set usercflags=%usercflags%%sep1%-DWINVER=0x0500
+:ver_end
+set sep1= %nothing%
+del junk.txt
+
+rem ----------------------------------------------------------------------
 rem   Auto-detect compiler if not specified, and validate GCC if chosen.
 :checkcompiler
 if (%COMPILER%)==(cl) goto compilercheckdone
@@ -250,7 +310,7 @@
 Rem            8 characters of a label.  So do NOT be tempted to change
 Rem            chkapi* into something fancier like checkw32api
 Rem You HAVE been warned!
-if (%nocygwin%) == (Y) goto chkapi
+if (%nocygwin%) == (Y) goto chkapi3
 echo Checking whether gcc requires '-mno-cygwin'...
 echo #include "cygwin/version.h" >junk.c
 echo main(){} >>junk.c
@@ -261,7 +321,7 @@
 gcc -mno-cygwin -c junk.c >>config.log 2>&1
 if exist junk.o set nocygwin=Y
 rm -f junk.c junk.o
-
+goto chkapi3
 :chkapi
 echo The failed program was: >>config.log
 type junk.c >>config.log
@@ -273,6 +333,7 @@
 rem   problem).  The gcc/mingw32 2.95.2 headers are okay, as are distros
 rem   of w32api-xxx.zip from Anders Norlander since 1999-11-18 at least.
 rem
+:chkapi3
 echo Checking whether W32 API headers are too old...
 echo #include "windows.h" >junk.c
 echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c
@@ -291,7 +352,7 @@
 set cf=
 if exist junk.o goto gccOk
 echo The failed program was: >>config.log
-type junk.c >>config.log
+if exist junk.c type junk.c >>config.log
 
 :nocompiler
 echo.
@@ -356,7 +417,7 @@
 echo The failed program was: >>config.log
 type junk.c >>config.log
 set HAVE_PNG=
-goto :pngDone
+goto pngDone
 
 :havePng
 echo ...PNG header available, building with PNG support.
@@ -379,7 +440,7 @@
 echo The failed program was: >>config.log
 type junk.c >>config.log
 set HAVE_JPEG=
-goto :jpegDone
+goto jpegDone
 
 :haveJpeg
 echo ...JPEG header available, building with JPEG support.
@@ -402,7 +463,7 @@
 echo The failed program was: >>config.log
 type junk.c >>config.log
 set HAVE_GIF=
-goto :gifDone
+goto gifDone
 
 :haveGif
 echo ...GIF header available, building with GIF support.
@@ -425,7 +486,7 @@
 echo The failed program was: >>config.log
 type junk.c >>config.log
 set HAVE_TIFF=
-goto :tiffDone
+goto tiffDone
 
 :haveTiff
 echo ...TIFF header available, building with TIFF support.
@@ -449,7 +510,7 @@
 echo The failed program was: >>config.log
 type junk.c >>config.log
 set HAVE_XPM=
-goto :xpmDone
+goto xpmDone
 
 :haveXpm
 echo ...XPM header available, building with XPM support.
@@ -459,6 +520,35 @@
 rm -f junk.c junk.obj junk.err junk.out
 
 rem ----------------------------------------------------------------------
+rem check for RECONVERTSTRING
+rem
+
+rem if not %usew32ime% == Y goto noreconvertstring
+rem if "(%withoutreconvert%)" == "(Y)" goto noreconvertstring
+rem echo checking for RECONVERTSTRING...
+
+rem echo #include "windows.h" >junk.c
+rem echo #include "imm.h" >>junk.c
+rem echo main(){RECONVERTSTRING x;} >>junk.c
+
+rem %COMPILER% %usercflags% %mingwflag% -c junk.c -o junk.obj  >>config.log 2>&1
+rem if exist junk.obj goto haveReconvertstring
+
+rem echo ...RECONVERTSTRING isn't defined.
+rem echo The failed program was: >>config.log
+rem type junk.c >>config.log
+rem :noreconvertstring
+rem set HAVE_RECONVERTSTRING=
+rem goto recoverstringDone
+
+rem :haveReconvertstring
+rem echo ...RECONVERTSTRING is defined.
+rem set HAVE_RECONVERTSTRING=1
+
+rem :recoverstringDone
+rem rm -f junk.c junk.obj
+
+rem ----------------------------------------------------------------------
 :genmakefiles
 echo Generating makefiles
 if %COMPILER% == gcc set MAKECMD=gmake
@@ -481,6 +571,7 @@
 if (%docflags%)==(Y) echo USER_CFLAGS=%usercflags%>>config.settings
 for %%v in (%userldflags%) do if not (%%v)==() set doldflags=Y
 if (%doldflags%)==(Y) echo USER_LDFLAGS=%userldflags%>>config.settings
+rem if (%usew32ime%) == (Y) echo USE_W32IME=1 >>config.settings
 echo # End of settings from configure.bat>>config.settings
 echo. >>config.settings
 
@@ -494,6 +585,8 @@
 if not "(%HAVE_GIF%)" == "()" echo #define HAVE_GIF 1 >>config.tmp
 if not "(%HAVE_TIFF%)" == "()" echo #define HAVE_TIFF 1 >>config.tmp
 if not "(%HAVE_XPM%)" == "()" echo #define HAVE_XPM 1 >>config.tmp
+rem if not "(%usew32ime%)" == "()" echo #define USE_W32_IME 1 >>config.tmp
+rem if not "(%HAVE_RECONVERTSTRING%)" == "()" echo #define HAVE_RECONVERTSTRING 1 >>config.tmp
 echo /* End of settings from configure.bat.  */ >>config.tmp
 
 Rem See if fc.exe returns a meaningful exit status.  If it does, we
@@ -512,15 +605,41 @@
 
 :dontCopy
 if exist config.tmp del config.tmp
+if not %MAKECMD% == gmake goto nogmake381cygwin
+if not %nocygwin% == Y goto nogmake381cygwin
+pushd ..\lisp
+pwd > junk.txt
+set /p lispdircyw= < junk.txt
+cygpath -m %lispdircyw% > junk.txt
+set /p lispdirw32= < junk.txt 
+del junk.txt
+set loadpathsrc=%lispdirw32%
+popd
+goto genlispdir
+:nogmake381cygwin
+set lispdircyw=$(CURDIR)
+set lispdirw32=$(lisp)
+set loadpathsrc=$(CURDIR)/../lisp
+:genlispdir
+echo lisp=%lispdircyw%>lispdir.txt
+echo lispw32=%lispdirw32%>>lispdir.txt
+echo EMACSLOADPATH=%lispdirw32%>>lispdir.txt
+echo EMACSLOADPATH=%loadpathsrc%>srcloadpath.txt
+
 copy /b config.settings+%MAKECMD%.defs+..\nt\makefile.w32-in ..\nt\makefile
 copy /b config.settings+%MAKECMD%.defs+..\lib-src\makefile.w32-in ..\lib-src\makefile
-copy /b config.settings+%MAKECMD%.defs+..\src\makefile.w32-in ..\src\makefile
+copy /b config.settings+%MAKECMD%.defs+srcloadpath.txt+..\src\makefile.w32-in ..\src\makefile
 copy /b config.settings+%MAKECMD%.defs+..\doc\emacs\makefile.w32-in ..\doc\emacs\makefile
 copy /b config.settings+%MAKECMD%.defs+..\doc\misc\makefile.w32-in ..\doc\misc\makefile
 copy /b config.settings+%MAKECMD%.defs+..\doc\lispref\makefile.w32-in ..\doc\lispref\makefile
 copy /b config.settings+%MAKECMD%.defs+..\doc\lispintro\makefile.w32-in ..\doc\lispintro\makefile
 if exist ..\lisp\makefile rm -f ../lisp/[Mm]akefile
-copy /b config.settings+%MAKECMD%.defs+..\lisp\makefile.w32-in ..\lisp\makefile
+copy /b config.settings+%MAKECMD%.defs+lispdir.txt+..\lisp\makefile.w32-in ..\lisp\makefile
+del lispdir.txt
+del srcloadpath.txt
+set curdircyw=
+set curdirw32=
+set loadpathsrc=
 rem   Use the default (no-op) Makefile.in if the nt version is not present.
 if exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\makefile.w32-in ..\leim\makefile
 if not exist ..\leim\makefile.w32-in copy /b config.settings+%MAKECMD%.defs+..\leim\Makefile.in ..\leim\makefile
@@ -607,6 +726,7 @@
 set doldflags=
 set mingwflag=
 set mf=
+set usew32ime=
 
 goto skipArchTag
    arch-tag: 300d20a4-1675-4e75-b615-7ce1a8c5376c
diff -urN ./cvsroot/emacs/nt/gmake.defs ./emacs/nt/gmake.defs
--- ./cvsroot/emacs/nt/gmake.defs	2007-10-15 18:59:09.213565400 +0900
+++ ./emacs/nt/gmake.defs	2007-11-18 12:07:03.925662200 +0900
@@ -186,14 +186,14 @@
 else
 DEBUG_CFLAGS	=
 endif
-CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \
+CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \
 		  -D_CRTAPI1=_cdecl \
 		  $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
 EMACS_EXTRA_C_FLAGS = -DUSE_CRT_DLL=1
 
 # see comments in allocate_heap in w32heap.c before changing any of the
 # -stack, -heap, or -image-base settings.
-TEMACS_EXTRA_LINK = -Wl,-stack,0x00800000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01000000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map
+TEMACS_EXTRA_LINK = -Wl,-stack,0x00100000 -Wl,-heap,0x00100000 -Wl,-image-base,0x01300000 $(SUBSYSTEM_CONSOLE) -Wl,-entry,__start -Wl,-Map,$(BLD)/temacs.map
 
 ifdef NOOPT
 OBJDIR          = oo
diff -urN ./cvsroot/emacs/nt/nmake.defs ./emacs/nt/nmake.defs
--- ./cvsroot/emacs/nt/nmake.defs	2007-10-15 18:59:09.229165400 +0900
+++ ./emacs/nt/nmake.defs	2007-11-17 17:49:01.356769900 +0900
@@ -133,7 +133,7 @@
 !else
 DEBUG_CFLAGS	=
 !endif
-CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0400 $(ARCH_CFLAGS) -D$(ARCH) \
+CFLAGS          = -I. -DWIN32_LEAN_AND_MEAN $(ARCH_CFLAGS) -D$(ARCH) \
 		  -D_CRTAPI1=_cdecl $(DEBUG_CFLAGS) $(USER_CFLAGS) $(LOCAL_FLAGS)
 EMACS_EXTRA_C_FLAGS =
 
@@ -141,7 +141,7 @@
 
 # see comments in allocate_heap in w32heap.c before changing any of the
 # -stack, -heap, or -base settings.
-TEMACS_EXTRA_LINK = -stack:0x00800000 -heap:0x00100000 -base:0x01000000 -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
+TEMACS_EXTRA_LINK = -stack:0x00100000 -heap:0x00100000 -base:0x01300000 -pdb:$(BLD)\temacs.pdb -machine:$(ARCH) $(SUBSYSTEM_CONSOLE) -entry:_start -map:$(BLD)\temacs.map $(EXTRA_LINK)
 
 !ifdef NOOPT
 OBJDIR          = obj
diff -urN ./cvsroot/emacs/src/makefile.w32-in ./emacs/src/makefile.w32-in
--- ./cvsroot/emacs/src/makefile.w32-in	2007-11-03 06:30:44.870200000 +0900
+++ ./emacs/src/makefile.w32-in	2007-11-17 17:58:05.235169900 +0900
@@ -25,7 +25,7 @@
 .PHONY: $(ALL)
 
 # Set EMACSLOADPATH correctly (in case already defined in environment).
-EMACSLOADPATH=$(CURDIR)/../lisp
+#EMACSLOADPATH=$(CURDIR)/../lisp
 
 #
 # HAVE_CONFIG_H is required by some generic gnu sources stuck into
@@ -187,7 +187,7 @@
 # WARNING: Do NOT split the part inside $(ARGQUOTE)s into multiple lines as
 #          this can break with GNU Make 3.81 and later if sh.exe is used.
 bootstrap-temacs:
-	$(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS) -DPURESIZE=5000000$(ARGQUOTE)
+	$(MAKE) $(MFLAGS) $(XMFLAGS) temacs CFLAGS=$(ARGQUOTE)$(CFLAGS)$(ARGQUOTE)
 
 #
 # Dump an Emacs executable named bootstrap-emacs containing the
@@ -195,7 +195,7 @@
 #
 bootstrap-emacs: bootstrap-temacs
 	"$(THISDIR)/$(BLD)/temacs.exe" -batch -l loadup bootstrap
-	- mkdir "../bin"
+	-mkdir "../bin"
 	$(CP) $(EMACS) ../bin
 
 #
@@ -242,7 +242,7 @@
 # Assuming INSTALL_DIR is defined, build and install emacs in it.
 #
 install:        $(ALL)
-	- mkdir "$(INSTALL_DIR)/bin"
+	-mkdir "$(INSTALL_DIR)/bin"
 	$(CP) $(EMACS) $(INSTALL_DIR)/bin
 
 #
diff -urN ./cvsroot/emacs/src/s/ms-w32.h ./emacs/src/s/ms-w32.h
--- ./cvsroot/emacs/src/s/ms-w32.h	2007-11-18 10:33:03.542862200 +0900
+++ ./emacs/src/s/ms-w32.h	2007-11-18 11:36:13.672062200 +0900
@@ -478,7 +478,7 @@
 #include <string.h>
 
 /* We need a little extra space, see ../../lisp/loadup.el.  */
-#define SYSTEM_PURESIZE_EXTRA 50000
+#define SYSTEM_PURESIZE_EXTRA 80000
 
 /* For unexec to work on Alpha systems, we need to put Emacs'
    initialized data into a separate section from the CRT initialized
diff -urN ./cvsroot/emacs/src/w32bdf.c ./emacs/src/w32bdf.c
--- ./cvsroot/emacs/src/w32bdf.c	2007-10-04 06:13:20.139545700 +0900
+++ ./emacs/src/w32bdf.c	2007-11-10 08:55:19.489159700 +0900
@@ -44,8 +44,8 @@
 /* about 96 characters */
 #define BDF_BITMAP_HEAP_INITIAL_SIZE    (64 * 96)
 
-HANDLE hbdf_cp_heap = INVALID_HANDLE_VALUE;
-HANDLE hbdf_bmp_heap = INVALID_HANDLE_VALUE;
+HANDLE hbdf_cp_heap = NULL /* why INVALID_HANDLE_VALUE? */;
+HANDLE hbdf_bmp_heap = NULL /* why INVALID_HANDLE_VALUE? */;
 
 void w32_free_bdf_font(bdffont *fontp);
 bdffont *w32_init_bdf_font(char *filename);
@@ -242,9 +242,9 @@
   BY_HANDLE_FILE_INFORMATION fileinfo;
   int i;
 
-  if (hbdf_cp_heap == INVALID_HANDLE_VALUE)
+  if (hbdf_cp_heap == NULL /* INVALID_HANDLE_VALUE */)
     hbdf_cp_heap = HeapCreate(0, BDF_CODEPOINT_HEAP_INITIAL_SIZE, 0);
-  if (hbdf_bmp_heap == INVALID_HANDLE_VALUE)
+  if (hbdf_bmp_heap == NULL /* INVALID_HANDLE_VALUE */)
     hbdf_bmp_heap = HeapCreate(0, BDF_BITMAP_HEAP_INITIAL_SIZE, 0);
 
   if (!hbdf_cp_heap || !hbdf_bmp_heap)
@@ -261,7 +261,8 @@
       error("Fail to open BDF file");
     }
   hfilemap = CreateFileMapping(hfile, NULL, PAGE_READONLY, 0, 0, NULL);
-  if (hfilemap == INVALID_HANDLE_VALUE)
+  if (hfilemap == NULL /* CreateFileMapping () error return NULL, not
+			  INVALID_HANDLE_VALUE */)
     {
       CloseHandle(hfile);
       error("Can't map font");
@@ -828,7 +829,8 @@
   size = fileinfo.nFileSizeLow;
 
   hfilemap = CreateFileMapping (hfile, NULL, PAGE_READONLY, 0, 0, NULL);
-  if (hfilemap == INVALID_HANDLE_VALUE)
+  if (hfilemap == NULL /* CreateFileMapping () error return NULL, not
+			  INVALID_HANDLE_VALUE */)
     {
       CloseHandle (hfile);
       return 0;
diff -urN ./cvsroot/emacs/src/w32term.h ./emacs/src/w32term.h
--- ./cvsroot/emacs/src/w32term.h	2007-11-10 14:37:18.607159700 +0900
+++ ./emacs/src/w32term.h	2007-11-11 15:41:00.829559500 +0900
@@ -399,6 +399,11 @@
   /* The background for which the above relief GCs were set up.
      They are changed only when a different background is involved.  */
   unsigned long relief_background;
+/*
+#ifdef USE_W32_IME
+  */ /* logfont for IME  */ /*
+  LOGFONT ime_logfont;
+#endif */
 };
 
 extern struct w32_output w32term_display;
@@ -617,6 +622,8 @@
 #endif /* WM_MOUSEHWHEEL  */
 #ifndef WM_APPCOMMAND
 #define WM_APPCOMMAND 0x319
+#endif
+#ifndef GET_APPCOMMAND_LPARAM
 #define GET_APPCOMMAND_LPARAM(lParam)  (HIWORD(lParam) & 0x7fff)
 #endif
 
@@ -643,6 +650,102 @@
 #define WM_EMACS_SETCURSOR             (WM_EMACS_START + 19)
 #define WM_EMACS_END                   (WM_EMACS_START + 20)
 
+/* #ifdef USE_W32_IME
+#ifndef VK_KANJI
+#define VK_KANJI 0x19
+#endif
+#ifndef VK_KANA
+#define VK_KANA  0x15
+#endif
+#define VK_COMPEND 0x1A
+
+#ifdef RECONVERSION
+#ifndef WM_IME_REQUEST
+#define WM_IME_REQUEST                  0x288
+#endif
+#ifndef IMR_COMPOSITIONWINDOW
+#define IMR_COMPOSITIONWINDOW           0x0001
+#endif
+#ifndef IMR_CANDIDATEWINDOW
+#define IMR_CANDIDATEWINDOW             0x0002
+#endif
+#ifdef IMR_COMPOSITIONFONT
+#define IMR_COMPOSITIONFONT             0x0003
+#endif
+#ifndef IMR_RECONVERTSTRING
+#define IMR_RECONVERTSTRING             0x0004
+#endif
+#ifndef IMR_CONFIRMRECONVERTSTRING
+#define IMR_CONFIRMRECONVERTSTRING      0x0005
+#endif
+#endif
+ */
+/* For internal communications
+   from window procedure to event loop. */ /*
+#define WM_MULE_IME_REPORT         (WM_USER+2200)
+#define WM_MULE_IME_STATUS         (WM_USER+2201)
+ */
+/* For internal communications
+   from main thread to window procedure. */ /*
+#define WM_MULE_IMM_MESSAGE_START             (WM_USER+2300)
+#define WM_MULE_IMM_SET_STATUS                (WM_USER+2300)
+#define WM_MULE_IMM_GET_STATUS                (WM_USER+2301)
+#if 0
+#define WM_MULE_IMM_DEAL_WITH_CONTEXT         (WM_USER+2302)
+#define WM_MULE_IMM_SET_COMPOSITION_STRING    (WM_USER+2303)
+#endif
+#define WM_MULE_IMM_GET_COMPOSITION_STRING    (WM_USER+2304)
+#define WM_MULE_IMM_SET_MODE                  (WM_USER+2305)
+#if 0
+#define WM_MULE_IMM_NOTIFY                    (WM_USER+2310)
+#define WM_MULE_IMM_GET_UNDETERMINED_STRING_LENGTH (WM_USER+2320)
+#endif
+#define WM_MULE_IMM_MESSAGE_END               (WM_USER+2399)
+#define MESSAGE_IMM_COM_P(message)              \
+  (((message) >= WM_MULE_IMM_MESSAGE_START) &&  \
+   ((message) <= WM_MULE_IMM_MESSAGE_END))
+
+#if 0 */
+/* For synchronization
+   to create conversion agent
+   between main thread and event loop. */ /*
+#define WM_MULE_IME_CREATE_AGENT        (WM_USER+2400)
+#define WM_MULE_IME_CREATE_AGENT_REPLY  (WM_USER+2401)
+#define WM_MULE_IME_DESTROY_AGENT       (WM_USER+2402)
+#define WM_MULE_IME_DESTROY_AGENT_REPLY (WM_USER+2403)
+#endif
+#define CONVAGENT_CLASS "ConvAgent"
+
+#define WM_MULE_IMM_SET_COMPOSITION_FONT       (WM_USER+2404)
+#define WM_MULE_IMM_SET_COMPOSITION_FONT_REPLY (WM_USER+2405)
+
+#define WM_MULE_IMM_SET_CONVERSION_WINDOW      (WM_USER+2406)
+#if 0
+#define WM_MULE_IMM_SET_CONVERSION_WINDOW_REPLY (WM_USER+2407)
+#endif
+
+#ifdef RECONVERSION
+#ifndef HAVE_RECONVERTSTRING
+typedef struct tagRECONVERTSTRING {
+  DWORD dwSize;
+  DWORD dwVersion;
+  DWORD dwStrLen;
+  DWORD dwStrOffset;
+  DWORD dwCompStrLen;
+  DWORD dwCompStrOffset;
+  DWORD dwTargetStrLen;
+  DWORD dwTargetStrOffset;
+} RECONVERTSTRING, *PRECONVERTSTRING;
+#endif
+#ifndef SCS_SETRECONVERTSTRING
+#define SCS_SETRECONVERTSTRING 0x00010000
+#endif
+#ifndef SCS_QUERYRECONVERTSTRING
+#define SCS_QUERYRECONVERTSTRING 0x00020000
+#endif
+#endif */ /* RECONVERSION */ /*
+#endif */ /* USE_W32_IME */
+
 #define WND_FONTWIDTH_INDEX    (0)
 #define WND_LINEHEIGHT_INDEX   (4)
 #define WND_BORDER_INDEX       (8)
@@ -757,6 +860,32 @@
 EXFUN (Fx_display_color_p, 1);
 EXFUN (Fx_display_grayscale_p, 1);
 
+/* #ifdef USE_W32_IME */
+/*
+  You should avoid using this method to send message to the
+  message thread if possible.  Although this method guarantee
+  message reachablity even when message thread has no window,
+  you must deal with any messages sent by this method
+  both in the thread message loop(W32read_socket) and
+  in the window procedure(normally w32_WndProc).
+*/
+/* #define SEND_MSGTHREAD_INFORM_MESSAGE(message, wparam, lparam)       \
+  do {                                                               \
+    if (FRAME_W32_WINDOW(SELECTED_FRAME()) != NULL)		     \
+      SendMessage(FRAME_W32_WINDOW(SELECTED_FRAME()), (message),     \
+		  (wparam), (lparam));                               \
+    else                                                             \
+      while (!PostThreadMessage (dwWindowsThreadId, (message),       \
+                                 (wparam), (lparam)))                \
+        sleep(1);                                                    \
+  }while(0)
+
+#define WAIT_REPLY_MESSAGE(ret, msgno)                           \
+  do {                                                           \
+    GetMessage ((ret), NULL, 0, 0);                              \
+  } while((ret)->message != (msgno))
+#endif */ /* USE_W32_IME */
+
 #define FONT_TYPE_FOR_UNIBYTE(font, ch)			\
   ((font)->bdf ? BDF_1D_FONT : ANSI_FONT)
 

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Fwd: patch NtEmacs for cygwin gmake 3.81
  2007-11-19  4:28 ` Fwd: patch NtEmacs for cygwin gmake 3.81 Miles Bader
@ 2007-11-19  9:21   ` Jason Rumney
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Rumney @ 2007-11-19  9:21 UTC (permalink / raw)
  To: katu23; +Cc: Emacs-Devel

There seem to be a number of patches mixed up here, including:

1. Patches to makefiles to enable building with Cygwin make.
2. Other unrelated patches to makefiles, some commented out.
3. A patch to w32bdf.c to fix a bug (I've made this change in Emacs 22)
4. A partial patch to add IME support.


Can you please separate out the Cygwin make patch, and post just that so I can clearly see what is involved?

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-11-19  9:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <10E16F629C2D4FD9A750307619DA6FA0@katufjPC>
2007-11-19  4:28 ` Fwd: patch NtEmacs for cygwin gmake 3.81 Miles Bader
2007-11-19  9:21   ` Jason Rumney

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.