mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-23 07:19:15 +00:00
Move fix for bug#12993 to trunk
This commit is contained in:
parent
322a542e6c
commit
78f9ea875a
@ -1,9 +1,3 @@
|
||||
2012-12-10 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* configure.ac (W32_RES, W32_RES_LINK, WINDRES): Teach the cygw32
|
||||
build how to compile Windows resource files; use these variables
|
||||
to tell src/Makefile.in how and whether to compile resources.
|
||||
|
||||
2012-12-05 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* configure.ac: Handle info/ files with or without ".info" extension.
|
||||
|
@ -755,8 +755,6 @@ VERSION = @VERSION@
|
||||
VMLIMIT_OBJ = @VMLIMIT_OBJ@
|
||||
W32_LIBS = @W32_LIBS@
|
||||
W32_OBJ = @W32_OBJ@
|
||||
W32_RES = @W32_RES@
|
||||
W32_RES_LINK = @W32_RES_LINK@
|
||||
WARN_CFLAGS = @WARN_CFLAGS@
|
||||
WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
|
||||
WERROR_CFLAGS = @WERROR_CFLAGS@
|
||||
@ -764,7 +762,6 @@ WIDGET_OBJ = @WIDGET_OBJ@
|
||||
WINDOWS_64_BIT_OFF_T = @WINDOWS_64_BIT_OFF_T@
|
||||
WINDOWS_64_BIT_ST_SIZE = @WINDOWS_64_BIT_ST_SIZE@
|
||||
WINDOW_SYSTEM_OBJ = @WINDOW_SYSTEM_OBJ@
|
||||
WINDRES = @WINDRES@
|
||||
WINT_T_SUFFIX = @WINT_T_SUFFIX@
|
||||
XFT_CFLAGS = @XFT_CFLAGS@
|
||||
XFT_LIBS = @XFT_LIBS@
|
||||
|
103
autogen/configure
vendored
103
autogen/configure
vendored
@ -1204,11 +1204,8 @@ LIB_PTHREAD
|
||||
VMLIMIT_OBJ
|
||||
GMALLOC_OBJ
|
||||
HAVE_XSERVER
|
||||
W32_RES_LINK
|
||||
W32_RES
|
||||
W32_LIBS
|
||||
W32_OBJ
|
||||
WINDRES
|
||||
LIB_STANDARD
|
||||
NS_OBJC_OBJ
|
||||
NS_OBJ
|
||||
@ -9623,8 +9620,6 @@ CPPFLAGS="$tmp_CPPFLAGS"
|
||||
HAVE_W32=no
|
||||
W32_OBJ=
|
||||
W32_LIBS=
|
||||
W32_RES=
|
||||
W32_RES_LINK=
|
||||
if test "${with_w32}" != no; then
|
||||
if test "${opsys}" != "cygwin"; then
|
||||
as_fn_error "Using w32 with an autotools build is only supported for Cygwin." "$LINENO" 5
|
||||
@ -9641,112 +9636,14 @@ fi
|
||||
|
||||
$as_echo "#define HAVE_NTGUI 1" >>confdefs.h
|
||||
|
||||
if test -n "$ac_tool_prefix"; then
|
||||
# Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
|
||||
set dummy ${ac_tool_prefix}windres; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if test "${ac_cv_prog_WINDRES+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$WINDRES"; then
|
||||
ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
WINDRES=$ac_cv_prog_WINDRES
|
||||
if test -n "$WINDRES"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
|
||||
$as_echo "$WINDRES" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
|
||||
fi
|
||||
if test -z "$ac_cv_prog_WINDRES"; then
|
||||
ac_ct_WINDRES=$WINDRES
|
||||
# Extract the first word of "windres", so it can be a program name with args.
|
||||
set dummy windres; ac_word=$2
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
|
||||
$as_echo_n "checking for $ac_word... " >&6; }
|
||||
if test "${ac_cv_prog_ac_ct_WINDRES+set}" = set; then :
|
||||
$as_echo_n "(cached) " >&6
|
||||
else
|
||||
if test -n "$ac_ct_WINDRES"; then
|
||||
ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
|
||||
else
|
||||
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
|
||||
for as_dir in $PATH
|
||||
do
|
||||
IFS=$as_save_IFS
|
||||
test -z "$as_dir" && as_dir=.
|
||||
for ac_exec_ext in '' $ac_executable_extensions; do
|
||||
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
|
||||
ac_cv_prog_ac_ct_WINDRES="windres"
|
||||
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
|
||||
break 2
|
||||
fi
|
||||
done
|
||||
done
|
||||
IFS=$as_save_IFS
|
||||
|
||||
fi
|
||||
fi
|
||||
ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
|
||||
if test -n "$ac_ct_WINDRES"; then
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
|
||||
$as_echo "$ac_ct_WINDRES" >&6; }
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
if test "x$ac_ct_WINDRES" = x; then
|
||||
WINDRES="as_fn_error "No resource compiler found." "$LINENO" 5"
|
||||
else
|
||||
case $cross_compiling:$ac_tool_warned in
|
||||
yes:)
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
|
||||
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
|
||||
ac_tool_warned=yes ;;
|
||||
esac
|
||||
WINDRES=$ac_ct_WINDRES
|
||||
fi
|
||||
else
|
||||
WINDRES="$ac_cv_prog_WINDRES"
|
||||
fi
|
||||
|
||||
W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
|
||||
W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
|
||||
W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
|
||||
W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
|
||||
W32_RES="emacs.res"
|
||||
# Tell the linker that emacs.res is an object (which we compile from
|
||||
# the rc file), not a linker script.
|
||||
W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if test "${HAVE_W32}" = "yes"; then
|
||||
window_system=w32
|
||||
with_xft=no
|
||||
|
10
configure.ac
10
configure.ac
@ -1584,8 +1584,6 @@ AC_SUBST(LIB_STANDARD)
|
||||
HAVE_W32=no
|
||||
W32_OBJ=
|
||||
W32_LIBS=
|
||||
W32_RES=
|
||||
W32_RES_LINK=
|
||||
if test "${with_w32}" != no; then
|
||||
if test "${opsys}" != "cygwin"; then
|
||||
AC_MSG_ERROR([Using w32 with an autotools build is only supported for Cygwin.])
|
||||
@ -1594,21 +1592,13 @@ if test "${with_w32}" != no; then
|
||||
[AC_MSG_ERROR([`--with-w32' was specified, but windows.h
|
||||
cannot be found.])])
|
||||
AC_DEFINE(HAVE_NTGUI, 1, [Define to use native MS Windows GUI.])
|
||||
AC_CHECK_TOOL(WINDRES, [windres],
|
||||
[AC_MSG_ERROR([No resource compiler found.])])
|
||||
W32_OBJ="w32fns.o w32menu.o w32reg.o w32font.o w32term.o"
|
||||
W32_OBJ="$W32_OBJ w32xfns.o w32select.o w32uniscribe.o"
|
||||
W32_LIBS="$W32_LIBS -lkernel32 -luser32 -lgdi32 -lole32 -lcomdlg32"
|
||||
W32_LIBS="$W32_LIBS -lusp10 -lcomctl32 -lwinspool"
|
||||
W32_RES="emacs.res"
|
||||
# Tell the linker that emacs.res is an object (which we compile from
|
||||
# the rc file), not a linker script.
|
||||
W32_RES_LINK="-Wl,-bpe-i386 -Wl,emacs.res"
|
||||
fi
|
||||
AC_SUBST(W32_OBJ)
|
||||
AC_SUBST(W32_LIBS)
|
||||
AC_SUBST(W32_RES)
|
||||
AC_SUBST(W32_RES_LINK)
|
||||
|
||||
if test "${HAVE_W32}" = "yes"; then
|
||||
window_system=w32
|
||||
|
@ -1,9 +1,3 @@
|
||||
2012-12-10 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* emacs.rc: Use forward slashes in relative paths in order to
|
||||
avoid complaints from Cygwin. (Forward slashes work perfectly
|
||||
well in the NT build.)
|
||||
|
||||
2012-11-24 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
Revert recent change for Bug#8855; see ../src/ChangeLog.
|
||||
|
@ -1,5 +1,5 @@
|
||||
Emacs ICON icons/emacs.ico
|
||||
32649 CURSOR icons/hand.cur
|
||||
Emacs ICON icons\emacs.ico
|
||||
32649 CURSOR icons\hand.cur
|
||||
#ifdef WIN64
|
||||
1 24 "emacs-x64.manifest"
|
||||
#else
|
||||
|
@ -1,24 +1,3 @@
|
||||
2012-12-10 Daniel Colascione <dancol@dancol.org>
|
||||
|
||||
* w32gui.h (hprevinst, lpCmdLine, nCmdShow): Remove unused
|
||||
declarations.
|
||||
|
||||
* w32fns.c (cache_system_info): Initialize the global hinst
|
||||
variable here so various initialization calls DTRT.
|
||||
|
||||
* unexw32.c (hprevinst, lpCmdLine, nCmdShow): Remove unused
|
||||
variables.
|
||||
(hinst): Remove unneeded extern declaration.
|
||||
(_start): Remove initialization of above variables; remove
|
||||
initialization of hinst, as cache_system_info now does that.
|
||||
|
||||
* emacs.c (main): Call cache_system_info early in startup; we
|
||||
previously weren't calling it in Cygwin builds.
|
||||
|
||||
* Makefile.in (ntsource, WINDRES, W32_RES, W#@_RES_LINK): Teach
|
||||
the autoconf build system how to compile a Windows resource file
|
||||
and link it to Emacs.
|
||||
|
||||
2012-12-08 Jan Djärv <jan.h.d@swipnet.se>
|
||||
|
||||
* nsterm.m (fd_handler:): FD_ZERO fds (Bug#13103).
|
||||
|
@ -28,11 +28,9 @@ SHELL = /bin/sh
|
||||
# Here are the things that we expect ../configure to edit.
|
||||
# We use $(srcdir) explicitly in dependencies so as not to depend on VPATH.
|
||||
srcdir = @srcdir@
|
||||
ntsource = $(srcdir)/../nt
|
||||
abs_builddir = @abs_builddir@
|
||||
VPATH = $(srcdir)
|
||||
CC = @CC@
|
||||
WINDRES = @WINDRES@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
@ -268,13 +266,6 @@ W32_OBJ=@W32_OBJ@
|
||||
## --lwinspool if HAVE_W32, else empty.
|
||||
W32_LIBS=@W32_LIBS@
|
||||
|
||||
## emacs.res if HAVE_W32
|
||||
W32_RES=@W32_RES@
|
||||
## If HAVE_W32, compiler arguments for including
|
||||
## the resource file in the binary.
|
||||
## XXX -Wl,-b -Wl,pe-i386 -Wl,emacs.res
|
||||
W32_RES_LINK=@W32_RES_LINK@
|
||||
|
||||
## Empty if !HAVE_X_WINDOWS
|
||||
## xfont.o ftfont.o xftfont.o ftxfont.o if HAVE_XFT
|
||||
## xfont.o ftfont.o ftxfont.o if HAVE_FREETYPE
|
||||
@ -337,6 +328,7 @@ ALL_OBJC_CFLAGS=$(ALL_CFLAGS) $(GNU_OBJC_CFLAGS)
|
||||
@$(MKDEPDIR)
|
||||
$(CC) -c $(CPPFLAGS) $(ALL_OBJC_CFLAGS) $<
|
||||
|
||||
|
||||
## lastfile must follow all files whose initialized data areas should
|
||||
## be dumped as pure by dump-emacs.
|
||||
base_obj = dispnew.o frame.o scroll.o xdisp.o menu.o $(XMENU_OBJ) window.o \
|
||||
@ -470,11 +462,9 @@ $(obj) $(otherobj): globals.h
|
||||
$(lib)/libgnu.a: $(config_h)
|
||||
cd $(lib) && $(MAKE) libgnu.a
|
||||
|
||||
temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) \
|
||||
$(lib)/libgnu.a $(W32_RES)
|
||||
temacs$(EXEEXT): $(START_FILES) stamp-oldxmenu $(obj) $(otherobj) $(lib)/libgnu.a
|
||||
$(CC) $(LD_FIRSTFLAG) $(ALL_CFLAGS) $(TEMACS_LDFLAGS) $(TEMACS_LDFLAGS2) \
|
||||
-o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES) \
|
||||
$(W32_RES_LINK)
|
||||
-o temacs $(START_FILES) $(obj) $(otherobj) $(lib)/libgnu.a $(LIBES)
|
||||
test "$(CANNOT_DUMP)" = "yes" || \
|
||||
test "X$(PAXCTL)" = X || $(PAXCTL) -r temacs$(EXEEXT)
|
||||
|
||||
@ -515,14 +505,11 @@ $(OLDXMENU): $(OLDXMENU_TARGET)
|
||||
|
||||
doc.o: buildobj.h
|
||||
|
||||
emacs.res: $(ntsource)/emacs.rc \
|
||||
$(ntsource)/icons/emacs.ico \
|
||||
$(ntsource)/emacs-x86.manifest
|
||||
$(WINDRES) -O COFF -o $@ $(ntsource)/emacs.rc
|
||||
|
||||
ns-app: emacs$(EXEEXT)
|
||||
cd ../nextstep && $(MAKE) $(MFLAGS) all
|
||||
|
||||
|
||||
.PHONY: mostlyclean clean bootstrap-clean distclean maintainer-clean
|
||||
.PHONY: versionclean extraclean frc
|
||||
|
||||
|
@ -40,7 +40,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
|
||||
#if defined WINDOWSNT || defined HAVE_NTGUI
|
||||
#include "w32select.h"
|
||||
#include "w32font.h"
|
||||
#include "w32common.h"
|
||||
#endif
|
||||
|
||||
#if defined HAVE_NTGUI && defined CYGWIN
|
||||
@ -721,13 +720,6 @@ main (int argc, char **argv)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined WINDOWSNT || defined HAVE_NTGUI
|
||||
/* Set global variables used to detect Windows version. Do this as
|
||||
early as possible. (unexw32.c calls this function as well, but
|
||||
the additional call here is harmless.) */
|
||||
cache_system_info ();
|
||||
#endif
|
||||
|
||||
#ifdef RUN_TIME_REMAP
|
||||
if (initialized)
|
||||
run_time_remap (argv[0]);
|
||||
|
@ -85,6 +85,13 @@ DWORD_PTR extra_bss_size_static = 0;
|
||||
|
||||
PIMAGE_SECTION_HEADER heap_section;
|
||||
|
||||
#ifdef HAVE_NTGUI
|
||||
extern HINSTANCE hinst;
|
||||
HINSTANCE hprevinst = NULL;
|
||||
LPSTR lpCmdLine = "";
|
||||
int nCmdShow = 0;
|
||||
#endif /* HAVE_NTGUI */
|
||||
|
||||
/* Startup code for running on NT. When we are running as the dumped
|
||||
version, we need to bootstrap our heap and .bss section into our
|
||||
address space before we can actually hand off control to the startup
|
||||
@ -114,6 +121,15 @@ _start (void)
|
||||
/* Prevent Emacs from being locked up (eg. in batch mode) when
|
||||
accessing devices that aren't mounted (eg. removable media drives). */
|
||||
SetErrorMode (SEM_FAILCRITICALERRORS);
|
||||
|
||||
/* Invoke the NT CRT startup routine now that our housecleaning
|
||||
is finished. */
|
||||
#ifdef HAVE_NTGUI
|
||||
/* determine WinMain args like crt0.c does */
|
||||
hinst = GetModuleHandle (NULL);
|
||||
lpCmdLine = GetCommandLine ();
|
||||
nCmdShow = SW_SHOWDEFAULT;
|
||||
#endif
|
||||
mainCRTStartup ();
|
||||
}
|
||||
|
||||
|
@ -1828,6 +1828,7 @@ static LRESULT CALLBACK w32_wnd_proc (HWND, UINT, WPARAM, LPARAM);
|
||||
static BOOL
|
||||
w32_init_class (HINSTANCE hinst)
|
||||
{
|
||||
|
||||
if (w32_unicode_gui)
|
||||
{
|
||||
WNDCLASSW uwc;
|
||||
@ -7019,9 +7020,6 @@ cache_system_info (void)
|
||||
DWORD data;
|
||||
} version;
|
||||
|
||||
/* Cache the module handle of Emacs itself. */
|
||||
hinst = GetModuleHandle (NULL);
|
||||
|
||||
/* Cache the version of the operating system. */
|
||||
version.data = GetVersion ();
|
||||
w32_major_version = version.info.major;
|
||||
|
@ -79,6 +79,9 @@ typedef struct _XImage
|
||||
#define FACE_DEFAULT (~0)
|
||||
|
||||
extern HINSTANCE hinst;
|
||||
extern HINSTANCE hprevinst;
|
||||
extern LPSTR lpCmdLine;
|
||||
extern int nCmdShow;
|
||||
|
||||
/* Bit Gravity */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user