summaryrefslogtreecommitdiff
path: root/src/emacs.c
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2012-09-17 03:55:02 -0800
committerDaniel Colascione <dancol@dancol.org>2012-09-17 03:55:02 -0800
commit0fda9b750e337d876c9461db7d4426a3f0b81482 (patch)
tree1e1659bfa590cd8375c564c6fb5c3bafa65e06c0 /src/emacs.c
parent8b33967313f09a736a833816d32fd52e10640969 (diff)
downloademacs-0fda9b750e337d876c9461db7d4426a3f0b81482.tar.gz
Implement cygw32
Here, we use the generic window-system configuration system we just implemented to support the w32 window-system in the mainline build under Cygwin. (Previously, the w32 window system could only be compiled as part of the NT-native Emacs build process.) The changes in this patch need to be applied atomically in order to avoid breaking Emacs. The changes include: - Changes throughout the Lisp and C code to not assume that NT Emacs and the w32 window system are synonymous. - Wiring up the regular select(2) event loop to Windows messages - Cleaning up the w32 drag-and-drop receiving code. - Exposing Cygwin path conversion functions to elisp. - Unicode file dialog support when compiling for Cygwin. - Splitting the w32 term lisp initialization code into code applicable to any w32 window-system and code specific to system-type windows-nt. - Integrating the old and new w32 code into the build system.
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/src/emacs.c b/src/emacs.c
index adfff6ff3ed..9a9309546ab 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -37,9 +37,20 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#ifdef WINDOWSNT
#include <fcntl.h>
-#include <windows.h> /* just for w32.h */
#include "w32.h"
-#include "w32heap.h" /* for prototype of sbrk */
+#endif
+
+#if defined (WINDOWSNT)
+#include "w32heap.h"
+#endif
+
+#if defined (WINDOWSNT) || defined (HAVE_NTGUI)
+#include "w32select.h"
+#include "w32font.h"
+#endif
+
+#if defined (HAVE_NTGUI) && defined (CYGWIN)
+#include "cygw32.h"
#endif
#ifdef NS_IMPL_GNUSTEP
@@ -1484,6 +1495,9 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#ifdef WINDOWSNT
syms_of_ntproc ();
#endif /* WINDOWSNT */
+#if defined (CYGWIN) && defined (HAVE_NTGUI)
+ syms_of_cygw32 ();
+#endif /* defined(CYGWIN) && defined (HAVE_NTGUI) */
syms_of_window ();
syms_of_xdisp ();
syms_of_font ();
@@ -1514,11 +1528,14 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
#ifdef HAVE_NTGUI
syms_of_w32term ();
syms_of_w32fns ();
- syms_of_w32select ();
syms_of_w32menu ();
syms_of_fontset ();
#endif /* HAVE_NTGUI */
+#ifdef HAVE_W32SELECT
+ syms_of_w32select ();
+#endif /* HAVE_W32SELECT */
+
#ifdef MSDOS
syms_of_xmenu ();
syms_of_dosfns ();
@@ -1561,8 +1578,11 @@ Using an Emacs configured with --with-x-toolkit=lucid does not have this problem
globals_of_w32font ();
globals_of_w32fns ();
globals_of_w32menu ();
- globals_of_w32select ();
#endif /* HAVE_NTGUI */
+
+#ifdef HAVE_W32SELECT
+ globals_of_w32select ();
+#endif /* HAVE_W32SELECT */
}
init_charset ();