diff options
| author | Eli Zaretskii | 2012-11-17 20:51:06 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2012-11-17 20:51:06 +0200 |
| commit | d8715cdf90538fa8abd3e2c23ed2efd23c4253c1 (patch) | |
| tree | 746f15349cb6e83ba4d8082770a2d73f93d63b36 /src | |
| parent | 7436fc63c0c24eb7fee800176c387db87f51de50 (diff) | |
| download | emacs-d8715cdf90538fa8abd3e2c23ed2efd23c4253c1.tar.gz emacs-d8715cdf90538fa8abd3e2c23ed2efd23c4253c1.zip | |
Fix bug #12878 with compilation failure with Visual C++ 11.0.
src/w32select.c: Include w32common.h before w32term.h, so that
windows.h gets included before w32term.h uses some of its
features, see below.
src/w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New
typedefs.
(EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New
prototypes.
(EnumSystemLocales) [_MSC_VER]: Define if undefined.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 12 | ||||
| -rw-r--r-- | src/w32select.c | 2 | ||||
| -rw-r--r-- | src/w32term.h | 15 |
3 files changed, 28 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index d88e43b2b7f..c12eff19ddd 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,15 @@ | |||
| 1 | 2012-11-17 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * w32select.c: Include w32common.h before w32term.h, so that | ||
| 4 | windows.h gets included before w32term.h uses some of its | ||
| 5 | features, see below. | ||
| 6 | |||
| 7 | * w32term.h (LOCALE_ENUMPROCA, LOCALE_ENUMPROCW) [_MSC_VER]: New | ||
| 8 | typedefs. | ||
| 9 | (EnumSystemLocalesA, EnumSystemLocalesW) [_MSC_VER]: New | ||
| 10 | prototypes. | ||
| 11 | (EnumSystemLocales) [_MSC_VER]: Define if undefined. (Bug#12878) | ||
| 12 | |||
| 1 | 2012-11-17 Jan Djärv <jan.h.d@swipnet.se> | 13 | 2012-11-17 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 14 | ||
| 3 | * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834). | 15 | * nsterm.m (hold_event): Set send_appdefined to YES (Bug#12834). |
diff --git a/src/w32select.c b/src/w32select.c index 1b10c74cfe9..6a2a840f914 100644 --- a/src/w32select.c +++ b/src/w32select.c | |||
| @@ -74,8 +74,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 74 | 74 | ||
| 75 | #include <config.h> | 75 | #include <config.h> |
| 76 | #include "lisp.h" | 76 | #include "lisp.h" |
| 77 | #include "w32term.h" /* for all of the w32 includes */ | ||
| 78 | #include "w32common.h" /* os_subtype */ | 77 | #include "w32common.h" /* os_subtype */ |
| 78 | #include "w32term.h" /* for all of the w32 includes */ | ||
| 79 | #include "keyboard.h" | 79 | #include "keyboard.h" |
| 80 | #include "blockinput.h" | 80 | #include "blockinput.h" |
| 81 | #include "charset.h" | 81 | #include "charset.h" |
diff --git a/src/w32term.h b/src/w32term.h index af5b37a1171..6e30d374c82 100644 --- a/src/w32term.h +++ b/src/w32term.h | |||
| @@ -752,6 +752,21 @@ extern int w32_system_caret_height; | |||
| 752 | extern int w32_system_caret_x; | 752 | extern int w32_system_caret_x; |
| 753 | extern int w32_system_caret_y; | 753 | extern int w32_system_caret_y; |
| 754 | 754 | ||
| 755 | #ifdef _MSC_VER | ||
| 756 | #ifndef EnumSystemLocales | ||
| 757 | /* MSVC headers define these only for _WIN32_WINNT >= 0x0500. */ | ||
| 758 | typedef BOOL (CALLBACK *LOCALE_ENUMPROCA)(LPSTR); | ||
| 759 | typedef BOOL (CALLBACK *LOCALE_ENUMPROCW)(LPWSTR); | ||
| 760 | BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD); | ||
| 761 | BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD) | ||
| 762 | #ifdef UNICODE | ||
| 763 | #define EnumSystemLocales EnumSystemLocalesW | ||
| 764 | #else | ||
| 765 | #define EnumSystemLocales EnumSystemLocalesA | ||
| 766 | #endif | ||
| 767 | #endif | ||
| 768 | #endif | ||
| 769 | |||
| 755 | #if EMACSDEBUG | 770 | #if EMACSDEBUG |
| 756 | extern const char* | 771 | extern const char* |
| 757 | w32_name_of_message (UINT msg); | 772 | w32_name_of_message (UINT msg); |