diff options
author | Bram Moolenaar <bram@vim.org> | 2014-01-14 13:26:21 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2014-01-14 13:26:21 +0100 |
commit | 3ed64b8fbc47a057d8a6c2681866ad72f6748887 (patch) | |
tree | 409b84590041c958414d4579423a5c5f5f8b5a88 | |
parent | c77e03bdd361ca9058e74211b1353a5810fa0f32 (diff) | |
download | vim-7-4-148.tar.gz |
Problem: Cannot build with Cygwin and X11.
Solution: Include Xwindows.h instead of windows.h. (Lech Lorens)
-rw-r--r-- | src/mbyte.c | 12 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/mbyte.c b/src/mbyte.c index 6340992d..cb14a25f 100644 --- a/src/mbyte.c +++ b/src/mbyte.c @@ -83,10 +83,18 @@ # ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN # endif -# include <windows.h> +# if defined(FEAT_GUI) || defined(FEAT_XCLIPBOARD) +# include <X11/Xwindows.h> +# define WINBYTE wBYTE +# else +# include <windows.h> +# define WINBYTE BYTE +# endif # ifdef WIN32 # undef WIN32 /* Some windows.h define WIN32, we don't want that here. */ # endif +#else +# define WINBYTE BYTE #endif #if (defined(WIN3264) || defined(WIN32UNIX)) && !defined(__MINGW32__) @@ -698,7 +706,7 @@ codepage_invalid: /* enc_dbcs is set by setting 'fileencoding'. It becomes a Windows * CodePage identifier, which we can pass directly in to Windows * API */ - n = IsDBCSLeadByteEx(enc_dbcs, (BYTE)i) ? 2 : 1; + n = IsDBCSLeadByteEx(enc_dbcs, (WINBYTE)i) ? 2 : 1; #else # if defined(MACOS) || defined(__amigaos4__) /* diff --git a/src/version.c b/src/version.c index c9fa779e..6d2a9289 100644 --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 148, +/**/ 147, /**/ 146, |