From 86790826398fa5e83853680899c8309890c7a766 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Sun, 16 Nov 2014 00:30:12 -0500 Subject: * src/frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003). * lisp/window.el (handle-select-window): Deactivate shift-region. --- lisp/ChangeLog | 4 ++++ lisp/window.el | 2 +- src/ChangeLog | 4 ++++ src/frame.c | 2 +- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a4bebf2bee..ea9c8c6b2c 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2014-11-16 Stefan Monnier + + * window.el (handle-select-window): Deactivate shift-region (bug#19003). + 2014-11-15 Andreas Schwab * version.el (emacs-repository-get-version): Use git rev-parse diff --git a/lisp/window.el b/lisp/window.el index 7692c797af..7d76649d7c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7715,7 +7715,7 @@ is active. This function is run by `mouse-autoselect-window-timer'." (defun handle-select-window (event) "Handle select-window events." - (interactive "e") + (interactive "^e") (let ((window (posn-window (event-start event)))) (unless (or (not (window-live-p window)) ;; Don't switch if we're currently in the minibuffer. diff --git a/src/ChangeLog b/src/ChangeLog index 4aa9958a52..f9f3a0f96b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-11-16 Stefan Monnier + + * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003). + 2014-11-15 Jan Djärv * nsterm.m (ns_send_appdefined): Check for application defined diff --git a/src/frame.c b/src/frame.c index e894d218df..307119c448 100644 --- a/src/frame.c +++ b/src/frame.c @@ -913,7 +913,7 @@ This function returns FRAME, or nil if FRAME has been deleted. */) return do_switch_frame (frame, 1, 0, norecord); } -DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "e", +DEFUN ("handle-switch-frame", Fhandle_switch_frame, Shandle_switch_frame, 1, 1, "^e", doc: /* Handle a switch-frame event EVENT. Switch-frame events are usually bound to this function. A switch-frame event tells Emacs that the window manager has requested -- cgit v1.2.3 From 202f4941dc13c82aea36258421351420a34b7133 Mon Sep 17 00:00:00 2001 From: Tassilo Horn Date: Sun, 16 Nov 2014 09:39:01 +0100 Subject: Fix DocView slicing docs * doc/emacs/misc.texi (DocView Slicing): Describe how to slice with the mouse. Fix command mentioned by slice by BoundingBox paragraph. (Bug#18040) --- doc/emacs/ChangeLog | 6 ++++++ doc/emacs/misc.texi | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 8eb2083598..84722b2d45 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog @@ -1,3 +1,9 @@ +2014-11-16 Tassilo Horn + + * misc.texi (DocView Slicing): Describe how to slice with the + mouse. Fix command mentioned by slice by BoundingBox paragraph. + (Bug#18040) + 2014-11-09 Glenn Morris * Makefile.in (version): Remove variable. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 386fd6fdd3..39b36cf67a 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -419,12 +419,14 @@ and the slice's width and height. A more convenient graphical way to specify the slice is with @kbd{s m} (@code{doc-view-set-slice-using-mouse}), where you use the mouse to -select the slice. -@c ??? How does this work? +select the slice. Simply press and hold the left mouse button at the +upper-left corner of the region you want to have in the slice, then +move the mouse pointer to the lower-right corner and release the +button. The most convenient way is to set the optimal slice by using BoundingBox information automatically determined from the document by -typing @kbd{s b} (@code{doc-view-set-slice-using-mouse}). +typing @kbd{s b} (@code{doc-view-set-slice-from-bounding-box}). @findex doc-view-reset-slice To cancel the selected slice, type @kbd{s r} -- cgit v1.2.3 From c613f4d6c12ad7a8ebbc88dcef48949c6a775996 Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Sun, 16 Nov 2014 14:19:16 +0200 Subject: Fix indentation before `!=' and after `+=' Originally reported in https://github.com/mooz/js2-mode/issues/174. * lisp/progmodes/js.el (js--indent-operator-re): Make assignments and (in)equality operator a separate case. (js--continued-expression-p): Escape the second `+' in the regexp. --- lisp/ChangeLog | 8 ++++++++ lisp/progmodes/js.el | 4 ++-- test/indent/js.js | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ea9c8c6b2c..442b8f69e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,11 @@ +2014-11-16 Dmitry Gutov + + Fix indentation before `!=' and after `+='. Originally reported + in https://github.com/mooz/js2-mode/issues/174. + * progmodes/js.el (js--indent-operator-re): Make assignments and + (in)equality operator a separate case. + (js--continued-expression-p): Escape the second `+' in the regexp. + 2014-11-16 Stefan Monnier * window.el (handle-select-window): Deactivate shift-region (bug#19003). diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el index a8f0d556ec..56569e1f97 100644 --- a/lisp/progmodes/js.el +++ b/lisp/progmodes/js.el @@ -1685,7 +1685,7 @@ This performs fontification according to `js--class-styles'." "Regular expression matching variable declaration keywords.") (defconst js--indent-operator-re - (concat "[-+*/%<>=&^|?:.]\\([^-+*/]\\|$\\)\\|" + (concat "[-+*/%<>&^|?:.]\\([^-+*/]\\|$\\)\\|!?=\\|" (js--regexp-opt-symbol '("in" "instanceof"))) "Regexp matching operators that affect indentation of continued expressions.") @@ -1712,7 +1712,7 @@ This performs fontification according to `js--class-styles'." (save-excursion (backward-char) (not (looking-at "[/*]/"))) (js--looking-at-operator-p) (and (progn (backward-char) - (not (looking-at "++\\|--\\|/[/*]")))))))))) + (not (looking-at "+\\+\\|--\\|/[/*]")))))))))) (defun js--end-of-do-while-loop-p () diff --git a/test/indent/js.js b/test/indent/js.js index d623a0dc5b..1924094e9d 100644 --- a/test/indent/js.js +++ b/test/indent/js.js @@ -47,3 +47,11 @@ var p = { var evens = [e for each (e in range(0, 21)) if (ed % 2 == 0)]; + +!b + !=b + !==b + +a++ +b += + c -- cgit v1.2.3 From cf100f60a6fbed0446dbc091649df4f17e4f5694 Mon Sep 17 00:00:00 2001 From: Fabián Ezequiel Gallina Date: Sun, 16 Nov 2014 11:11:49 -0300 Subject: Prevent resizing the echo area when iPython is enabled Fixes: debbugs:18794 * lisp/progmodes/python.el (python-eldoc--get-doc-at-point): Strip shell output before returning. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/python.el | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 442b8f69e5..d47a97f73e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2014-11-16 Fabián Ezequiel Gallina + + * progmodes/python.el (python-eldoc--get-doc-at-point): Strip + shell output before returning. (bug#18794) + 2014-11-16 Dmitry Gutov Fix indentation before `!=' and after `+='. Originally reported diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 89b2f1fd08..5a5a039afc 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -3408,9 +3408,12 @@ returns will be used. If not FORCE-PROCESS is passed what (let ((input (or force-input (python-info-current-symbol t)))) (and input - (python-shell-send-string-no-output - (format python-eldoc-string-code input) - process)))))) + ;; Prevent resizing the echo area when iPython is + ;; enabled. Bug#18794. + (python-util-strip-string + (python-shell-send-string-no-output + (format python-eldoc-string-code input) + process))))))) (defun python-eldoc-function () "`eldoc-documentation-function' for Python. -- cgit v1.2.3 From 790c69057269dbed855375b91120ccf3cce0f830 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Nov 2014 17:19:05 -0800 Subject: Simplify and fix doc-related .gitignore files. This fixes some unwanted 'git status' output after 'make docs'. * .gitignore: Add **/Makefile, **/makefile. Remove Makefile, makefile. Add doc/*/*.xxx rules for the usual kinds of documentation outputs and temporaries. Add doc/misc/cc-mode.ss. * doc/emacs/.gitignore, doc/lispref/.gitignore, doc/misc/.gitignore: * lwlib/.gitignore, oldXMenu/.gitignore: Remove, as these .gitignore files are no longer needed. * doc/lispintro/.gitignore: Replace with list of exceptional PDF files. --- .gitignore | 42 ++++++++++++++++++++++++++++++++++++------ ChangeLog | 13 +++++++++++++ doc/emacs/.gitignore | 23 ----------------------- doc/lispintro/.gitignore | 24 +++--------------------- doc/lispref/.gitignore | 13 ------------- doc/misc/.gitignore | 23 ----------------------- lwlib/.gitignore | 1 - oldXMenu/.gitignore | 1 - 8 files changed, 52 insertions(+), 88 deletions(-) delete mode 100644 doc/emacs/.gitignore delete mode 100644 doc/lispref/.gitignore delete mode 100644 doc/misc/.gitignore delete mode 100644 lwlib/.gitignore delete mode 100644 oldXMenu/.gitignore diff --git a/.gitignore b/.gitignore index 6903c46278..7f6aca7e0b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ +**/Makefile +**/makefile + configure aclocal.m4 compile @@ -9,10 +12,9 @@ missing lib/Makefile.in src/config.in autom4te.cache -makefile TAGS *~ -.#* +.#* /README.W32 /bin/ @@ -24,7 +26,6 @@ info/dir info/*.info test/biditest.txt -Makefile config.log config.status config.cache @@ -72,9 +73,38 @@ src/stamp-h1 src/temacs src/temacs.map src/temacs.tmp -doc/emacs/emacsver.texi -doc/man/emacs.1 -etc/refcards/emacsver.tex +doc/*/*.aux +doc/*/*.cm +doc/*/*.cms +doc/*/*.cp +doc/*/*.cps +doc/*/*.dvi +doc/*/*.fn +doc/*/*.fns +doc/*/*.html +doc/*/*.ky +doc/*/*.kys +doc/*/*.log +doc/*/*.op +doc/*/*.ops +doc/*/*.pdf +doc/*/*.pg +doc/*/*.pgs +doc/*/*.pj +doc/*/*.pjs +doc/*/*.ps +doc/*/*.sc +doc/*/*.scs +doc/*/*.tg +doc/*/*.tgs +doc/*/*.tmp +doc/*/*.toc +doc/*/*.tp +doc/*/*.tps +doc/*/*.vr +doc/*/*.vrs +doc/*/texput.log +doc/misc/cc-mode.ss lib/.deps/ lisp/international/uni-brackets.el lwlib/deps/ diff --git a/ChangeLog b/ChangeLog index 5ec81276d8..c9ea640b58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2014-11-17 Paul Eggert + + Simplify and fix doc-related .gitignore files. + This fixes some unwanted 'git status' output after 'make docs'. + * .gitignore: Add **/Makefile, **/makefile. + Remove Makefile, makefile. + Add doc/*/*.xxx rules for the usual kinds of documentation outputs + and temporaries. Add doc/misc/cc-mode.ss. + * doc/emacs/.gitignore, doc/lispintro/.gitignore, doc/misc/.gitignore: + * lwlib/.gitignore, oldXMenu/.gitignore: + Remove, as these .gitignore files are no longer needed. + * doc/lispintro/.gitignore: Replace with list of exceptional PDF files. + 2014-11-15 Christoph Scholtes * .gitignore: Ignore generated file lib/stdalign.h. diff --git a/doc/emacs/.gitignore b/doc/emacs/.gitignore deleted file mode 100644 index 3ff56b474d..0000000000 --- a/doc/emacs/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -*.aux -*.cp -*.cps -*.dvi -*.fn -*.fns -*.ky -*.kys -*.log -*.op -*.ops -*.pdf -*.pg -*.pgs -*.ps -*.tmp -*.toc -*.tp -*.tps -*.vr -*.vrs -Makefile -makefile diff --git a/doc/lispintro/.gitignore b/doc/lispintro/.gitignore index e1af5a918b..cf992dc864 100644 --- a/doc/lispintro/.gitignore +++ b/doc/lispintro/.gitignore @@ -1,21 +1,3 @@ -*.aux -*.fn -*.fns -*.cps -*.cp -*.kys -*.ky -*.toc -*.pgs -*.pg -*.log -*.vrs -*.vr -*.dvi -*.ps -*.tp -*.tps -*.tmp -*.txt -Makefile -makefile +!cons-*.pdf +!drawers.pdf +!lambda-*.pdf diff --git a/doc/lispref/.gitignore b/doc/lispref/.gitignore deleted file mode 100644 index ba74d36599..0000000000 --- a/doc/lispref/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -texput.log -elisp.?? -elisp.??? -config.log -config.cache -config.status -Makefile -makefile -elisp -elisp-? -elisp-?? -elisp1* -elisp2* diff --git a/doc/misc/.gitignore b/doc/misc/.gitignore deleted file mode 100644 index 3ff56b474d..0000000000 --- a/doc/misc/.gitignore +++ /dev/null @@ -1,23 +0,0 @@ -*.aux -*.cp -*.cps -*.dvi -*.fn -*.fns -*.ky -*.kys -*.log -*.op -*.ops -*.pdf -*.pg -*.pgs -*.ps -*.tmp -*.toc -*.tp -*.tps -*.vr -*.vrs -Makefile -makefile diff --git a/lwlib/.gitignore b/lwlib/.gitignore deleted file mode 100644 index f3c7a7c5da..0000000000 --- a/lwlib/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Makefile diff --git a/oldXMenu/.gitignore b/oldXMenu/.gitignore deleted file mode 100644 index f3c7a7c5da..0000000000 --- a/oldXMenu/.gitignore +++ /dev/null @@ -1 +0,0 @@ -Makefile -- cgit v1.2.3 From 2e007571951887a94daad3a46ec3380ab83497b4 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 16 Nov 2014 19:43:26 -0800 Subject: Restore 'Bug#' -> 'debbugs:' rewrite in log-edit-mode. * .dir-locals.el (log-edit-mode): Restore the (log-edit-rewrite-fixes "[ \n](bug#\\([0-9]+\\))" . "debbugs:\\1"). See Glenn Morris in: http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg01187.html --- .dir-locals.el | 4 +++- ChangeLog | 5 +++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.dir-locals.el b/.dir-locals.el index afc68ea3ba..5e73e0d9ac 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -3,7 +3,9 @@ (fill-column . 70))) (c-mode . ((c-file-style . "GNU"))) (objc-mode . ((c-file-style . "GNU"))) - (log-edit-mode . ((log-edit-font-lock-gnu-style . t) + (log-edit-mode . ((log-edit-rewrite-fixes + "[ \n](bug#\\([0-9]+\\))" . "debbugs:\\1") + (log-edit-font-lock-gnu-style . t) (log-edit-setup-add-author . t))) (change-log-mode . ((add-log-time-zone-rule . t) (fill-column . 74) diff --git a/ChangeLog b/ChangeLog index c9ea640b58..239b5efd6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2014-11-17 Paul Eggert + Restore 'Bug#' -> 'debbugs:' rewrite in log-edit-mode. + * .dir-locals.el (log-edit-mode): Restore the (log-edit-rewrite-fixes + "[ \n](bug#\\([0-9]+\\))" . "debbugs:\\1"). See Glenn Morris in: + http://lists.gnu.org/archive/html/emacs-devel/2014-11/msg01187.html + Simplify and fix doc-related .gitignore files. This fixes some unwanted 'git status' output after 'make docs'. * .gitignore: Add **/Makefile, **/makefile. -- cgit v1.2.3 From 67a22c6062fdaff39c27611d21cd5866661f8e15 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Mon, 17 Nov 2014 19:36:29 +0200 Subject: Don't assume "bzr log" uses --long format by default. lisp/vc/vc-bzr.el (vc-bzr-print-log, vc-bzr-expanded-log-entry): Don't assume --long is the default for "bzr log", always specify it explicitly, in case the user defined an alias for 'log' that uses some other format. --- lisp/ChangeLog | 7 +++++++ lisp/vc/vc-bzr.el | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d47a97f73e..54df183c92 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2014-11-17 Eli Zaretskii + + * vc/vc-bzr.el (vc-bzr-print-log, vc-bzr-expanded-log-entry): + Don't assume --long is the default for "bzr log", always specify + it explicitly, in case the user defined an alias for 'log' that + uses some other format. + 2014-11-16 Fabián Ezequiel Gallina * progmodes/python.el (python-eldoc--get-doc-at-point): Strip diff --git a/lisp/vc/vc-bzr.el b/lisp/vc/vc-bzr.el index 0730a9c72c..e607f9d8d1 100644 --- a/lisp/vc/vc-bzr.el +++ b/lisp/vc/vc-bzr.el @@ -722,7 +722,7 @@ If LIMIT is non-nil, show no more than this many entries." (with-current-buffer buffer (apply 'vc-bzr-command "log" buffer 'async files (append - (when shortlog '("--line")) + (if shortlog '("--line") '("--long")) ;; The extra complications here when start-revision and limit ;; are set are due to bzr log's --forward argument, which ;; could be enabled via an alias in bazaar.conf. @@ -757,7 +757,7 @@ If LIMIT is non-nil, show no more than this many entries." (defun vc-bzr-expanded-log-entry (revision) (with-temp-buffer (apply 'vc-bzr-command "log" t nil nil - (list (format "-r%s" revision))) + (list "--long" (format "-r%s" revision))) (goto-char (point-min)) (when (looking-at "^-+\n") ;; Indent the expanded log entry. -- cgit v1.2.3 From 81e0cca7bbc99dbfda898a8aaab740ae121cf045 Mon Sep 17 00:00:00 2001 From: Oscar Fuentes Date: Mon, 17 Nov 2014 23:06:13 +0100 Subject: Define MINGW_W64 and use it instead of _W64 ... for detecting MinGW-w64. _W64 is not specific of MinGW-w64, it is defined for compatibility with MS VC++. * nt/inc/ms-w32.h: Define MINGW_W64. * admin/CPP-DEFINES: Mention MINGW_W64. * nt/addpm.c: Use it. * nt/addsection.c: Use it. * nt/preprep.c: Use it. * src/w32.c: Use MINGW_W64 instead of _W64 * src/w32term.c: Likewise. --- admin/CPP-DEFINES | 3 ++- admin/ChangeLog | 4 ++++ nt/ChangeLog | 10 ++++++++++ nt/addpm.c | 5 ++--- nt/addsection.c | 2 +- nt/inc/ms-w32.h | 16 +++++++++++++--- nt/preprep.c | 2 +- src/ChangeLog | 6 ++++++ src/w32.c | 6 +++--- src/w32term.c | 4 ++-- 10 files changed, 44 insertions(+), 14 deletions(-) diff --git a/admin/CPP-DEFINES b/admin/CPP-DEFINES index 27d87dcaa2..e475b42250 100644 --- a/admin/CPP-DEFINES +++ b/admin/CPP-DEFINES @@ -19,8 +19,9 @@ __MSDOS__ Ditto. __DJGPP_MINOR__ Minor version number of the DJGPP library; used only in msdos.c and dosfns.c. DOS_NT Compiling for either the MS-DOS or native MS-Windows port. WINDOWSNT Compiling the native MS-Windows (W32) port. -__MINGW32__ Compiling the W32 port with the MinGW port of GCC. +__MINGW32__ Compiling the W32 port with the MinGW or MinGW-w64 ports of GCC. _MSC_VER Compiling the W32 port with the Microsoft C compiler. +MINGW_W64 Compiling the W32 port with the MinGW-w64 port of GCC. DARWIN_OS Compiling on Mac OS X or pure Darwin (and using s/darwin.h). SOLARIS2 USG diff --git a/admin/ChangeLog b/admin/ChangeLog index 72ce74bd62..0ec6d920ad 100644 --- a/admin/ChangeLog +++ b/admin/ChangeLog @@ -1,3 +1,7 @@ +2014-11-17 Oscar Fuentes + + * admin/CPP-DEFINES: Mention MINGW_W64. + 2014-11-15 Glenn Morris * update_autogen: Auto-detect VCS in use. diff --git a/nt/ChangeLog b/nt/ChangeLog index 5ffab4d015..cb2f33f947 100644 --- a/nt/ChangeLog +++ b/nt/ChangeLog @@ -1,3 +1,13 @@ +2014-11-17 Oscar Fuentes + + * inc/ms-w32.h: Define MINGW_W64. + + * nt/addpm.c: Use it. + + * nt/addsection.c: Use it. + + * nt/preprep.c: Use it. + 2014-10-31 Eric S. Raymond * Neutralize language specific to a repository type. diff --git a/nt/addpm.c b/nt/addpm.c index 18057b58b4..f7cfba39d0 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -38,9 +38,8 @@ along with GNU Emacs. If not, see . */ #include #include -/* MinGW64 defines _W64 and barfs if _WIN32_IE is defined to anything - below 0x500. */ -#ifndef _W64 +/* MinGW64 barfs if _WIN32_IE is defined to anything below 0x500. */ +#ifndef MINGW_W64 #define _WIN32_IE 0x400 #endif /* Request C Object macros for COM interfaces. */ diff --git a/nt/addsection.c b/nt/addsection.c index a897573480..832066b68c 100644 --- a/nt/addsection.c +++ b/nt/addsection.c @@ -25,7 +25,7 @@ along with GNU Emacs. If not, see . #include #include #include -#if defined(__GNUC__) && !defined(_W64) +#if defined(__GNUC__) && !defined(MINGW_W64) #define _ANONYMOUS_UNION #define _ANONYMOUS_STRUCT #endif diff --git a/nt/inc/ms-w32.h b/nt/inc/ms-w32.h index 8f7c36ab1e..1d45df743d 100644 --- a/nt/inc/ms-w32.h +++ b/nt/inc/ms-w32.h @@ -26,6 +26,16 @@ along with GNU Emacs. If not, see . */ #include +/* MinGW-w64 gcc does not automotically define a macro for + differentiating it fom MinGW gcc. We need to test the presence of + __MINGW64_VERSION_MAJOR in _mingw.h: */ +#ifdef __MINGW32__ +# include <_mingw.h> +# ifdef __MINGW64_VERSION_MAJOR +# define MINGW_W64 +# endif +#endif + /* #undef const */ /* Number of chars of output in the buffer of a stdio stream. */ @@ -139,7 +149,7 @@ extern char *getenv (); versions we still support. MinGW64 defines this to a higher value in its system headers, and is not really compatible with values lower than 0x0500, so leave it alone. */ -#ifndef _W64 +#ifndef MINGW_W64 # define _WIN32_WINNT 0x0400 #endif @@ -165,7 +175,7 @@ extern char *getenv (); #ifdef emacs -#ifdef _W64 +#ifdef MINGW_W64 /* MinGW64 specific stuff. */ /* Make sure 'struct timespec' and 'struct timezone' are defined. */ #include @@ -368,7 +378,7 @@ typedef int sigset_t; typedef int ssize_t; #endif -#ifdef _W64 /* MinGW64 */ +#ifdef MINGW_W64 #ifndef _POSIX typedef _sigset_t sigset_t; #endif diff --git a/nt/preprep.c b/nt/preprep.c index fda937df0e..39a9b70e95 100644 --- a/nt/preprep.c +++ b/nt/preprep.c @@ -25,7 +25,7 @@ along with GNU Emacs. If not, see . #include #include #include -#if defined(__GNUC__) && !defined(_W64) +#if defined(__GNUC__) && !defined(MINGW_W64) #define _ANONYMOUS_UNION #define _ANONYMOUS_STRUCT #endif diff --git a/src/ChangeLog b/src/ChangeLog index f9f3a0f96b..1f2a0c4c9b 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2014-11-17 Oscar Fuentes + + * src/w32.c: Use MINGW_W64 instead of _W64. + + * src/w32term.c: Likewise. + 2014-11-16 Stefan Monnier * frame.c (Fhandle_switch_frame): Deactivate shift-region (bug#19003). diff --git a/src/w32.c b/src/w32.c index aba0b5a81f..34f28d01af 100644 --- a/src/w32.c +++ b/src/w32.c @@ -72,8 +72,8 @@ along with GNU Emacs. If not, see . */ #include #include -/* MinGW64 (_W64) defines these in its _mingw.h. */ -#if defined(__GNUC__) && !defined(_W64) +/* MinGW64 defines these in its _mingw.h. */ +#if defined(__GNUC__) && !defined(MINGW_W64) #define _ANONYMOUS_UNION #define _ANONYMOUS_STRUCT #endif @@ -149,7 +149,7 @@ typedef struct _PROCESS_MEMORY_COUNTERS_EX { #define SDDL_REVISION_1 1 #endif /* SDDL_REVISION_1 */ -#if defined(_MSC_VER) || defined(_W64) +#if defined(_MSC_VER) || defined(MINGW_W64) /* MSVC and MinGW64 don't provide the definition of REPARSE_DATA_BUFFER and the associated macros, except on ntifs.h, which cannot be included because it triggers conflicts with other diff --git a/src/w32term.c b/src/w32term.c index 66cdbfaecb..41ab645f31 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -100,10 +100,10 @@ extern Cursor w32_load_cursor (LPCTSTR name); struct w32_display_info one_w32_display_info; struct w32_display_info *x_display_list; -#if _WIN32_WINNT < 0x0500 && !defined(_W64) +#if _WIN32_WINNT < 0x0500 && !defined(MINGW_W64) /* Pre Windows 2000, this was not available, but define it here so that Emacs compiled on such a platform will run on newer versions. - MinGW64 (_W64) defines these unconditionally, so avoid redefining. */ + MinGW64 defines these unconditionally, so avoid redefining. */ typedef struct tagWCRANGE { -- cgit v1.2.3