aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii2010-05-11 20:23:52 +0300
committerEli Zaretskii2010-05-11 20:23:52 +0300
commitc8670ded9c8c4fe3801b6a378ee93f9180ce0453 (patch)
tree37dc29acb52543a4ce23c305b1ecf7456e758f75 /src
parent3ffd461547221ea713427fa3e547b422cdc77f1c (diff)
downloademacs-c8670ded9c8c4fe3801b6a378ee93f9180ce0453.tar.gz
emacs-c8670ded9c8c4fe3801b6a378ee93f9180ce0453.zip
Backport from trunk: Fix bug #6126.
makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(SRC)/w32.h. w32fns.c: Include w32.h. (Fw32_shell_execute): Decode the error message before passing it to `error'.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog8
-rw-r--r--src/makefile.w32-in1
-rw-r--r--src/w32fns.c14
3 files changed, 22 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 4e0c7e6df71..8e2774f2a03 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,11 @@
12010-05-11 Eli Zaretskii <eliz@gnu.org>
2
3 * makefile.w32-in ($(BLD)/w32fns.$(O)): Depend on $(SRC)/w32.h.
4
5 * w32fns.c: Include w32.h.
6 (Fw32_shell_execute): Decode the error message before passing it
7 to `error'. (Bug#6126)
8
12010-05-11 Karel Klic <kklic@redhat.com> 92010-05-11 Karel Klic <kklic@redhat.com>
2 10
3 * ftfont.c: Fix incorrect parentheses of #if condition for 11 * ftfont.c: Fix incorrect parentheses of #if condition for
diff --git a/src/makefile.w32-in b/src/makefile.w32-in
index 156eddd6092..591e38fb60d 100644
--- a/src/makefile.w32-in
+++ b/src/makefile.w32-in
@@ -1564,6 +1564,7 @@ $(BLD)/w32fns.$(O) : \
1564 $(SRC)/keyboard.h \ 1564 $(SRC)/keyboard.h \
1565 $(SRC)/systime.h \ 1565 $(SRC)/systime.h \
1566 $(SRC)/termhooks.h \ 1566 $(SRC)/termhooks.h \
1567 $(SRC)/w32.h \
1567 $(SRC)/w32font.h \ 1568 $(SRC)/w32font.h \
1568 $(SRC)/w32gui.h \ 1569 $(SRC)/w32gui.h \
1569 $(SRC)/w32heap.h \ 1570 $(SRC)/w32heap.h \
diff --git a/src/w32fns.c b/src/w32fns.c
index 795e7208569..bc310da0d2f 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -47,6 +47,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
47#include "systime.h" 47#include "systime.h"
48#include "termhooks.h" 48#include "termhooks.h"
49#include "w32heap.h" 49#include "w32heap.h"
50#include "w32.h"
50 51
51#include "bitmaps/gray.xbm" 52#include "bitmaps/gray.xbm"
52 53
@@ -6333,6 +6334,7 @@ an integer representing a ShowWindow flag:
6333 Lisp_Object operation, document, parameters, show_flag; 6334 Lisp_Object operation, document, parameters, show_flag;
6334{ 6335{
6335 Lisp_Object current_dir; 6336 Lisp_Object current_dir;
6337 char *errstr;
6336 6338
6337 CHECK_STRING (document); 6339 CHECK_STRING (document);
6338 6340
@@ -6353,7 +6355,17 @@ an integer representing a ShowWindow flag:
6353 XINT (show_flag) : SW_SHOWDEFAULT)) 6355 XINT (show_flag) : SW_SHOWDEFAULT))
6354 > 32) 6356 > 32)
6355 return Qt; 6357 return Qt;
6356 error ("ShellExecute failed: %s", w32_strerror (0)); 6358 errstr = w32_strerror (0);
6359 /* The error string might be encoded in the locale's encoding. */
6360 if (!NILP (Vlocale_coding_system))
6361 {
6362 Lisp_Object decoded =
6363 code_convert_string_norecord (make_unibyte_string (errstr,
6364 strlen (errstr)),
6365 Vlocale_coding_system, 0);
6366 errstr = (char *)SDATA (decoded);
6367 }
6368 error ("ShellExecute failed: %s", errstr);
6357} 6369}
6358 6370
6359/* Lookup virtual keycode from string representing the name of a 6371/* Lookup virtual keycode from string representing the name of a