]> code.delx.au - gnu-emacs/commitdiff
More fixes for bug #12878 with MS-Windows MSVC build.
authorEli Zaretskii <eliz@gnu.org>
Mon, 19 Nov 2012 17:34:21 +0000 (19:34 +0200)
committerEli Zaretskii <eliz@gnu.org>
Mon, 19 Nov 2012 17:34:21 +0000 (19:34 +0200)
 src/xdisp.c (start_hourglass) [HAVE_NTGUI]: Don't mix declaration of
 w32_note_current_window with code.  (Backport from trunk.)
 src/w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
 (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
 Define for the MSVC compiler.
 src/w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing
 semi-colon.

 nt/inc/stdint.h (PTRDIFF_MIN) [!__GNUC__]: Define for MSVC.

nt/ChangeLog
nt/inc/stdint.h
src/ChangeLog
src/w32.c
src/w32term.h
src/xdisp.c

index d34d23df4d56d2b8cdb4143acec68fa162de2b82..cb63a90bb41b0d2ba776912bcaecb65917b95981 100644 (file)
@@ -1,3 +1,7 @@
+2012-11-19  Eli Zaretskii  <eliz@gnu.org>
+
+       * inc/stdint.h (PTRDIFF_MIN) [!__GNUC__]: Define for MSVC.
+
 2012-11-01  Eli Zaretskii  <eliz@gnu.org>
 
        * inc/unistd.h (setpgid, getpgrp): Provide prototypes.  (Bug#12776)
index 5c53fa18b554a9447ec7e3bdd0922bbb063bdbed..edb0469eb87e29664c3f3cba48bc7bd63b8cede4 100644 (file)
@@ -60,6 +60,7 @@ typedef unsigned int uint32_t;
 #endif
 
 #define PTRDIFF_MAX INTPTR_MAX
+#define PTRDIFF_MIN INTPTR_MIN
 
 #endif /* !__GNUC__ */
 
index c4f1ee60d8437005357658a6358c363ec9cc6bda..da5a96079032ae71c152225b908b5e5e5ac44143 100644 (file)
@@ -1,3 +1,15 @@
+2012-11-19  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (start_hourglass) [HAVE_NTGUI]: Don't mix declaration of
+       w32_note_current_window with code.  (Backport from trunk.)
+
+       * w32.c (FILE_DEVICE_FILE_SYSTEM, METHOD_BUFFERED)
+       (FILE_ANY_ACCESS, CTL_CODE, FSCTL_GET_REPARSE_POINT) [_MSC_VER]:
+       Define for the MSVC compiler.
+
+       * w32term.h (EnumSystemLocalesW) [_MSC_VER]: Add a missing
+       semi-colon.
+
 2012-11-18  Eli Zaretskii  <eliz@gnu.org>
 
        * fileio.c (Fsubstitute_in_file_name, Ffile_name_directory)
index 5ac1bc3eb7c886881863468d7b7b7f0a84ae1333..1c3331516d4f036d5b5474482613bdde7de3c128 100644 (file)
--- a/src/w32.c
+++ b/src/w32.c
@@ -119,9 +119,10 @@ typedef struct _PROCESS_MEMORY_COUNTERS_EX {
 #include <aclapi.h>
 
 #ifdef _MSC_VER
-/* MSVC doesn't provide the definition of REPARSE_DATA_BUFFER, except
-   on ntifs.h, which cannot be included because it triggers conflicts
-   with other Windows API headers.  So we define it here by hand.  */
+/* MSVC doesn'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 Windows API headers.  So
+   we define it here by hand.  */
 
 typedef struct _REPARSE_DATA_BUFFER {
     ULONG  ReparseTag;
@@ -149,6 +150,12 @@ typedef struct _REPARSE_DATA_BUFFER {
     } DUMMYUNIONNAME;
 } REPARSE_DATA_BUFFER, *PREPARSE_DATA_BUFFER;
 
+#define FILE_DEVICE_FILE_SYSTEM        9
+#define METHOD_BUFFERED                0
+#define FILE_ANY_ACCESS                0x00000000
+#define CTL_CODE(t,f,m,a)       (((t)<<16)|((a)<<14)|((f)<<2)|(m))
+#define FSCTL_GET_REPARSE_POINT \
+  CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 42, METHOD_BUFFERED, FILE_ANY_ACCESS)
 #endif
 
 /* TCP connection support.  */
index 6e30d374c82935bc5cba936c45009678737eeacd..9b5a4a0189ac196f72d300220a5801e0193c6cfe 100644 (file)
@@ -758,7 +758,7 @@ extern int w32_system_caret_y;
 typedef BOOL (CALLBACK *LOCALE_ENUMPROCA)(LPSTR);
 typedef BOOL (CALLBACK *LOCALE_ENUMPROCW)(LPWSTR);
 BOOL WINAPI EnumSystemLocalesA(LOCALE_ENUMPROCA,DWORD);
-BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD)
+BOOL WINAPI EnumSystemLocalesW(LOCALE_ENUMPROCW,DWORD);
 #ifdef UNICODE
 #define EnumSystemLocales EnumSystemLocalesW
 #else
index 290c3a07fe9a55eaadc71d06990cf6c42e9a5cc5..85fe9a00f6054b8387627a7a7d2705f468190e9c 100644 (file)
@@ -29433,8 +29433,10 @@ start_hourglass (void)
     delay = make_emacs_time (DEFAULT_HOURGLASS_DELAY, 0);
 
 #ifdef HAVE_NTGUI
-  extern void w32_note_current_window (void);
-  w32_note_current_window ();
+  {
+    extern void w32_note_current_window (void);
+    w32_note_current_window ();
+  }
 #endif /* HAVE_NTGUI */
 
   hourglass_atimer = start_atimer (ATIMER_RELATIVE, delay,