[P21.5] Patches for Native Windows Builds
Vin Shelton <[email protected]> Thu, 6 Nov 2014 15:27:17 -0500
| Newsgroups | gmane.emacs.xemacs.patches |
|---|---|
| Message-ID | <CACeGjnVqKy419jib1uB0i4y5h7Bqd5Tr8tazggPDHrw2MBgDPw@mail.gmail.com> |
Here are the patches necessary to build on Windows native, using VS6. Please note a couple of things: 1) no attempt is made to support TLS. This is the patch necessary to go on building w/o TLS. 2) I don't understand why the patch to sysdep.c is necessary, but without this, the call to ioctl yields an "undefined identifier" from VS6. The only changes made to sysdep.c between 21.5.34 (which doesn't need this commenting out) and now were hygenic changes made by Aidan. Something must have changed in a header file, but I don't know what. - Vin diff -r 5d5aeb79edb4 nt/ChangeLog --- a/nt/ChangeLog Thu Nov 06 09:34:06 2014 -0700 +++ b/nt/ChangeLog Thu Nov 06 13:05:06 2014 -0500 @@ -0,0 +1,5 @@ +2014-11-06 Vin Shelton <[email protected]> + + * xemacs.mak (TEXINFO_SRCS): XEmacs sources no longer include + texinfo.texi. + diff -r 5d5aeb79edb4 src/ChangeLog --- a/src/ChangeLog Thu Nov 06 09:34:06 2014 -0700 +++ b/src/ChangeLog Thu Nov 06 13:05:06 2014 -0500 @@ -0,0 +1,7 @@ +2014-11-06 Vin Shelton <[email protected]> + + * sysdep.c (set_descriptor_non_blocking): Don't call ioctl() on + Windows native builds. + * emacs.c (main_1): Conditionalize tls variables and initialization. + * number.h: Elide Visual Studio warnings on NUMBER_TYPES expansion. + diff -r 5d5aeb79edb4 nt/xemacs.mak --- a/nt/xemacs.mak Thu Nov 06 09:34:06 2014 -0700 +++ b/nt/xemacs.mak Thu Nov 06 13:05:13 2014 -0500 @@ -1495,7 +1495,6 @@ $(INFODIR)\new-users-guide.info \ $(INFODIR)\standards.info \ $(INFODIR)\termcap.info \ - $(INFODIR)\texinfo.info \ $(INFODIR)\widget.info \ $(INFODIR)\xemacs-faq.info \ $(INFODIR)\xemacs.info @@ -1631,14 +1630,6 @@ $(MANDIR)\new-users-guide\region.texi \ $(MANDIR)\new-users-guide\search.texi \ $(MANDIR)\new-users-guide\xmenu.texi - -TEXINFO_SRCS = \ - $(MANDIR)\texinfo\texinfo.texi \ - $(MANDIR)\texinfo\version.texi - -$(INFODIR)\texinfo.info: $(TEXINFO_SRCS) - cd $(MANDIR)\texinfo - $(MAKEINFO) texinfo.texi $(INFODIR)\xemacs.info: $(XEMACS_SRCS) cd $(MANDIR)\xemacs diff -r 5d5aeb79edb4 src/emacs.c --- a/src/emacs.c Thu Nov 06 09:34:06 2014 -0700 +++ b/src/emacs.c Thu Nov 06 13:05:13 2014 -0500 @@ -1606,7 +1606,9 @@ syms_of_scrollbar (); #endif syms_of_text (); +#ifdef WITH_TLS syms_of_tls (); +#endif #ifdef HAVE_TOOLBARS syms_of_toolbar (); #endif @@ -2217,7 +2219,9 @@ vars_of_symbols (); vars_of_syntax (); vars_of_text (); +#ifdef WITH_TLS vars_of_tls (); +#endif #ifdef HAVE_TOOLBARS vars_of_toolbar (); #endif @@ -2680,8 +2684,10 @@ init_device_tty (); #endif init_console_stream (restart); /* Create the first console */ +#ifdef WITH_TLS if (initialized && !restart) init_tls (); +#endif /* try to get the actual pathname of the exec file we are running */ if (!restart) diff -r 5d5aeb79edb4 src/number.h --- a/src/number.h Thu Nov 06 09:34:06 2014 -0700 +++ b/src/number.h Thu Nov 06 13:05:13 2014 -0500 @@ -376,9 +376,21 @@ #define NUMBER_TYPES(prefix) prefix##FIXNUM_T, prefix##BIGNUM_T, \ prefix##RATIO_T, prefix##FLOAT_T, prefix##BIGFLOAT_T +#ifdef _MSC_VER +/* Disable warning 4003: + * warning C4003: not enough actual parameters for macro 'NUMBER_TYPES' + */ +#pragma warning( push ) +#pragma warning( disable : 4003) +#endif + enum number_type { NUMBER_TYPES() }; enum lazy_number_type { NUMBER_TYPES(LAZY_), LAZY_MARKER_T }; +#ifdef _MSC_VER +#pragma warning( pop ) +#endif + #undef NUMBER_TYPES extern enum number_type get_number_type (Lisp_Object); diff -r 5d5aeb79edb4 src/sysdep.c --- a/src/sysdep.c Thu Nov 06 09:34:06 2014 -0700 +++ b/src/sysdep.c Thu Nov 06 13:05:13 2014 -0500 @@ -188,11 +188,13 @@ [email protected] (Andy Lowry). */ /* #### Should this be conditionalized on FIONBIO? */ #if defined (STRIDE) || (defined (pfa) && defined (HAVE_PTYS)) || defined (AIX) +#if !defined(WIN32_NATIVE) { int one = 1; ioctl (fd, FIONBIO, &one); } #endif +#endif #ifdef F_SETFL fcntl (fd, F_SETFL, O_NONBLOCK);