lib-src/makefile.w32-in ($(BLD)/emacsclientw.exe): Use $(MWINDOWS)
instead of a literal -mwindows, which is not supported by MSVC.
nt/nmake.defs (MWINDOWS): Define as "-subsystem:windows -entry:mainCRTStartup".
Suggested by Fabrice Popineau <fabrice.popineau@supelec.fr>.
nt/gmake.defs (MWINDOWS): Define as "-mwindows".
nt/configure.bat (genmakefiles): Move the redirection away from the
end of the command, to avoid excess whitespace at the end of Make
variables created at configure time, and also avoid things like
"FOO1>>config.settings", where "1" gets interpreted as the file
descriptor and eaten up. This fixes breakage introduced by the
last change, without reintroducing the bug fixed by that change.
lib/makefile.w32-in ($(BLD)/md5.$(O)):
($(BLD)/sha1.$(O)):
($(BLD)/sha256.$(O)):
($(BLD)/sha512.$(O)): Depend on $(EMACS_ROOT)/nt/inc/stdalign.h.
Suggested by Christoph Scholtes <cschol2112@googlemail.com>.
lib/getopt_.h: Regenerate.
nt/inc/stdalign.h: New file.
Fixes: debbugs:11527
* configure.in: Remove all mention of src/m/*.
(machine, machfile, M_FILE, config_machfile, and_machfile): Remove.
All uses removed.
(BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
(BITS_PER_LONG_LONG): Move to src/lisp.h.
* lib/makefile.w32-in: Remove dependencies on
$(EMACS_ROOT)/src/m/intel386.h.
* make-dist: Don't make links to src/m.
* admin/CPP-DEFINES: Do not mention src/m/*.h.
(BITS_PER_EMACS_INT, BITS_PER_LONG, BITS_PER_CHAR)
(BITS_PER_SHORT, BITS_PER_INT): Remove.
* admin/MAINTAINERS: Remove src/m/.
* lib-src/makefile.w32-in: Remove dependencies on
$(EMACS_ROOT)/src/m/intel386.h.
* msdos/mainmake.v2 (TAGS tags): Don't look at $(CURDIR)/src/m/intel386.h.
* nt/config.nt: Do not include "m/intel386.h"; file was removed.
(BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG):
Move to src/lisp.h.
(EMACS_INT_MAX): New macro.
This directory predates autoconf and is no longer needed nowadays.
Move its few remaining bits of functionality to where they're needed.
* src/m/README, src/m/alpha.h, src/m/amdx86-64.h, src/m/ia64.h, src/m/ibmrs6000.h:
* src/m/ibms390x.h, src/m/intel386.h, src/m/m68k.h, src/m/macppc.h:
* src/m/sparc.h, src/m/template.h: Remove.
* src/Makefile.in (M_FILE): Remove. All uses removed.
* src/alloc.c (POINTERS_MIGHT_HIDE_IN_OBJECTS):
* src/lisp.h (USE_LSB_TAG):
* src/mem-limits.h (EXCEEDS_LISP_PTR):
Use VAL_MAX, not VALBITS, in #if.
* src/lisp.h (EMACS_INT_MAX): New macro, useful in #if.
(EMACS_UINT): Define unconditionally now.
(BITS_PER_CHAR, BITS_PER_SHORT, BITS_PER_INT, BITS_PER_LONG)
(BITS_PER_EMACS_INT): New constants, replacing
what used to be in config.h, but not useful in #if.
(GCTYPEBITS, VALBITS): Define unconditionally, since m/* files don't
define them any more.
(VAL_MAX): New macro.
(VALMASK): Use it.
* src/puresize.h (PURESIZE_RATIO): Use EMACS_INT_MAX, not
BITS_PER_EMACS_INT, in #if.
* src/s/aix4-2.h (BROKEN_FIONREAD, BROKEN_SIGAIO, BROKEN_SIGPTY)
(BROKEN_SIGPOLL): Move here from m/ibmrs6000.h, which was removed.
* src/s/gnu-linux.h (ULIMIT_BREAK_VALUE) [__i386__]:
* src/s/ms-w32.h (DATA_START):
Move here from removed file m/intel386.h.
* src/s/gnu.h (NLIST_STRUCT): Remove undef; 'configure' does this.
* src/s/irix6-5.h (_LP64): Remove; lisp.h no longer needs this.
* configure.in (machine): Do not set to 'vax', since src/m/vax.h
is being removed.
(AC_CHECK_FUNCS): Remove ftime.
* admin/CPP-DEFINES (HAVE_FTIME): Remove.
* nt/config.nt (HAVE_FTIME): Remove undef; not needed.
* src/m/vax.h: Remove; no longer needed since HAVE_FTIME is being removed.
* src/s/ms-w32.h (HAVE_FTIME): Remove; not needed.
Also, it was a confusing name, since it does not necessarily mean that
we literally have libncurses; rather that we have tputs etc.
* configure.in (HAVE_LIBNCURSES): Remove; it is required to be true.
* src/dispnew.c: Remove HAVE_LIBNCURSES test;
it is always true on relevant platforms.
* nt/config.nt (HAVE_LIBNCURSES): Remove undef; not needed.
nt/makefile.w32-in (emacs, misc, lispref, lispintro): New targets,
each runs makeinfo in its own subdirectory of 'doc'.
(info-gmake): Depend on these new targets.
* README, configure.in (AC_INIT): Bump version to 24.1.50.
* doc/emacs/emacsver.texi (EMACSVER): Bump version to 24.1.50.
* doc/man/emacs.1: Bump version to 24.1.50.
* msdos/sed2v2.inp: Bump version to 24.1.50.
* nextstep/Cocoa/Emacs.base/Contents/Info.plist:
* nextstep/Cocoa/Emacs.base/Contents/Resources/English.lproj/InfoPlist.strings:
* nextstep/GNUstep/Emacs.base/Resources/Info-gnustep.plist:
* nextstep/GNUstep/Emacs.base/Resources/Emacs.desktop:
Bump version to 24.1.50.
* nt/config.nt, nt/makefile.w32-in, nt/emacs.rc, nt/emacsclient.rc:
Bump version to 24.1.50.
src/makefile.w32-in (OBJ2): Add xml.$(O).
(GLOBAL_SOURCES): Add xml.c.
($(BLD)/xml.$(O)): New dependency list.
src/xml.c (DEF_XML2_FN, LOAD_XML2_FN) [WINDOWSNT]: New macros.
(fn_htmlReadMemory, fn_xmlReadMemory, fn_xmlDocGetRootElement)
(fn_xmlFreeDoc, fn_xmlCleanupParser, fn_xmlCheckVersion)
[!WINDOWSNT]: New macros.
(init_libxml2_functions, libxml2_loaded_p): New functions.
(parse_region): Call fn_xmlCheckVersion instead of using the macro
LIBXML_TEST_VERSION. Call libxml2 functions via the fn_* macros.
(xml_cleanup_parser): New function, export for fn_xmlCleanupParser.
Calls xmlCleanupParser only if libxml2 was loaded (or statically
linked in).
(Flibxml_parse_html_region, Flibxml_parse_xml_region): Call
init_libxml2_functions before calling libxml2 functions.
(syms_of_xml) <Qlibxml2_dll>: DEFSYM it.
src/emacs.c: Don't include libxml/parser.h.
(shut_down_emacs): Call xml_cleanup_parser, instead of calling
xmlCleanupParser directly.
src/ lisp.h [HAVE_LIBXML2]: Add prototype for xml_cleanup_parser.
nt/configure.bat: Support building with libxml2.
nt/INSTALL:
nt/README.W32: Add information about libxml2.
lisp/term/w32-win.el (dynamic-library-alist): Add libxml2 DLLs.
lib-src/makefile.w32-in (obj): Add xml.o.
nt/makefile.w32-in: (all): Don't depend on stamp_BLD and on maybe-bootstrap.
(all-other-dirs-$(MAKETYPE)): Depend on maybe-bootstrap.
(bootstrap-gmake): Invoke the "clean" and build targets in 2
separate commands, so they run in that order even under "make -j".
lib/makefile.w32-in (gnulib, all): Don't depend on stamp_BLD.
lib-src/makefile.w32-in (ALL): Now the list of executables, not of phony
targets.
(.PHONY): Only make-docfile is its prerequisite now.
(make-docfile): Don't depend on stamp_BLD. Add a comment about
the need in this target.
(ctags, etags, ebrowse, hexl, movemail, emacsclient)
(test-distrib): Phony targets removed.
($(BLD)/test-distrib.exe): Run test-distrib as part of the recipe.
(all): Don't depend on stamp_BLD.
nt/makefile.w32-in (install-bin): Don't copy addpm.exe here. Use
$(DIRNAME)_same-dir.tst instead of same-dir.tst, to avoid stepping
on other (parallel) Make job's toes.
(install-other-dirs-nmake, install-other-dirs-gmake): Depend on `all'.
(install-shortcuts): Depend on $(INSTALL_DIR)/bin. Copy addpm.exe
here.
(maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH, dist): Depend
on create-tmp-dist-dir.
nt/nmake.defs (DIRNAME): New variable.
(IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of
same-dir.tst.
nt/gmake.defs (DIRNAME): New variable.
(IFNOTSAMEDIR): Use $(DIRNAME)_same-dir.tst instead of
same-dir.tst, to avoid conflicts between several (parallel) Make
jobs.
lisp/makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead
of same-dir.tst, to avoid stepping on other (parallel) Make job's
toes.
leim/makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead
of same-dir.tst, to avoid stepping on other (parallel) Make job's
toes.
nt/cmdproxy.c (main): Bypass conversion of the file name in argv[0]
and our own module name to short 8+3 aliases, if the original file
names compare equal. If GetShortPathName fails, compare the base
names of the two file names, and only re-spawn the command line if
the base-name comparison also fails.
specific makefiles to support getopt_.h generation with MSVC.
* nt/gmake.defs (PRAGMA_SYSTEM_HEADER): Add for GCC.
* nt/nmake.defs (PRAGMA_SYSTEM_HEADER): Add, but ignore with MSVC.
(maybe-copy-distfiles-CMD, maybe-copy-distfiles-SH)
(create-tmp-dist-dir): Added to make --distfiles optional.
(dist): Use create-tmp-dist-dir and maybe-copy-distfiles.
Parts of the changes by Fabrice Popineau <fabrice.popineau@supelec.fr>.
lib-src/makefile.w32-in (LOCAL_FLAGS): Add $(EMACS_EXTRA_C_FLAGS).
lib-src/emacsclient.c (main) <environ>: Remove declaration, already
pulled in by unistd.h on Posix hosts and stdlib.h on MS-Windows.
nt/inc/stdint.h (uint32_t, uint64_t) [_WIN64]: New typedefs.
(UINT64_MAX) [_WIN64]: Fix definition.
(uintmax_t, intmax_t): Fix definitions.
nt/inc/inttypes.h (strtoumax, strtoimax) [!__MINGW32__]: Provide
correct definitions.
nt/config.nt (HAVE_DECL_STRTOLL): Define.
(va_copy) [_WIN64]: Provide a better definition.
src/s/ms-w32.h (utimbuf) [_MSC_VER]: Don't define.
(snprintf) [_MSC_VER]: Redirect to _snprintf.
(strtoll) [_MSC_VER]: Redirect to _strtoi64.
(malloc, free, realloc, calloc): Redirect to e_* only when
compiling Emacs.
src/lisp.h (GCTYPEBITS): Move before first use.
(ALIGN_GCTYPEBITS) [_MSC_VER]: Define.
(DECL_ALIGN) [_MSC_VER]: Use it, as MSVC doesn't like bit ops in
this macro definition.
(tzname): Redirect to _tzname for all values of _MSC_VER.
Fixes: debbugs:9960
Small portions of the changes by Fabrice Popineau <fabrice.popineau@supelec.fr>.
src/makefile.w32-in (TAGS-gmake): Don't use $(patsubst ...), as
Nmake barfs on that. Use $(OBJ*_c) variables instead, defined on
nt/gmake.defs.
src/lisp.h (ENUM_BF): New macro, for enumerated types in bitfields,
which are not supported by MSVC.
(Lisp_Symbol, Lisp_Misc_Any, Lisp_Marker, Lisp_Misc_Overlay)
(Lisp_Save_Value, Lisp_Free): Use ENUM_BF for enumerated types in
bitfields.
(Lisp_Object) [USE_LISP_UNION_TYPE]: Use ENUM_BF for enumerated
types in bitfields.
(DEFUN) [_MSC_VER]: Define in a different way for MSVC.
src/w32fns.c [_MSC_VER]: DECLARE_HANDLE for any MSVC version.
src/w32.c: Don't include w32api.h for MSVC.
(init_environment) [_MSC_VER]: Call sys_access, not _access.
src/s/ms-w32.h <sigset_t, ssize_t> [_MSC_VER]: Typedefs for MSVC.
[_MSC_VER]: Include sys/timeb.h, sys/stat.h, and signal.h.
(fstat, stat, utime) [_MSC_VER]: Redirect to their sys_* cousins.
(malloc, free, realloc, calloc) [_MSC_VER]: Always redirect to the
e_* cousins.
(alloca) [_MSC_VER]: Define to _alloca.
src/lisp.h (DECL_ALIGN) [_MSC_VER]: Define for MSVC.
src/regex.c <re_char> [_MSC_VER]: A separate definition for MSVC.
nt/makefile.w32-in (clean-other-dirs-nmake)
(distclean-other-dirs-nmake, maintainer-clean-other-dirs-nmake):
Update for current structure of doc/ subdirectories.
nt/gmake.defs (OBJ0_c, OBJ1_c, OBJ2_c): New variables.
nt/INSTALL: Update for newer versions of MSVC.
lib/makefile.w32-in (FRC): New dummy target.
(TAGS): Depend on FRC.
Fixes: debbugs:9960
nt/runemacs.c (ensure_unicows_dll): New function, tries to load
UNICOWS.DLL on Windows 9X.
(WinMain): If ensure_unicows_dll fails to find UNICOWS.DLL,
display a dialog to the effect that Emacs cannot be started.
nt/README.W32: Mention UNICOWS.DLL as prerequisite for running
Emacs on Windows 9X.
admin/nt/README-ftp-server: Mention UNICOWS.DLL as prerequisite for
running Emacs on Windows 9X.
Fixes: debbugs:8562
so that the variable name better matches its purpose, to be identical
to usercflags with the exception that all quotes are escaped by the \
character.
Renamed the fuserldflags variable to escuserldflags so that the
variable name better matches its purpose, to be identical to
userldflags with the exception that all quotes are escaped by the \
character.
A new ESC_USER_CFLAGS variable is written to config.settings. This
variable has the same value as the escusercflags variable.
* nt/gmake.defs, nt/nmake.defs: Added the variable ESC_CFLAGS. This
variable is identical to the CFLAGS variable except that it includes
the new ESC_USER_CFLAGS variable instead of USER_CFLAGS.
* src/makefile.w32-in: The bootstrap-temacs rule now makes use of one
of two shell specific rules, either bootstrap-temacs-CMD or
bootstrap-temacs-SH. The bootstrap-temacs-SH rule is identical to the
previous implementation of the bootstrap-temacs rule. The
bootstrap-temacs-CMD rule is similar to the previous implementation of
the bootstrap-temacs rule except that it makes use of the ESC_CFLAGS
variable instead of the CFLAGS variable.
These changes are required to extend my earlier fix to add support for
--cflags and --ldflags options that include quotes so that it works
whether make uses cmd or sh as the shell.
nt/inc/inttypes.h [!__MINGW32__]: Include stdint.h. Move the
definition of uintmax_t from here...
nt/inc/stdint.h (uintmax_t): ...to here.
(intptr_t) [!__GNUC__]: New typedef.
options that include quotes as long as command extensions are
enabled. Specifically when -I, -L, and similar flags are used
to specify supplementary include and library directories a
directory name that includes spaces may now be used if it is
enclosed in quotes.
* INSTALL: Documented the change to configure.bat.
* lisp/term/w32-win.el (dynamic-library-alist): Add `gnutls'.
* nt/INSTALL: Clarify GnuTLS support.
* src/callproc.c, src/emacs.c: Include lisp.h before src/w32.h, not after.
* src/gnutls.c (Qgnutls_dll): Define.
(DEF_GNUTLS_FN, LOAD_GNUTLS_FN): New macros.
(gnutls_*): Declare function pointers.
(init_gnutls_functions): New function to initialize function pointers.
(emacs_gnutls_handshake, Fgnutls_error_string, Fgnutls_deinit)
(emacs_gnutls_global_init, Fgnutls_bye): Use function pointers.
(emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
Wrappers for gnutls_record_check_pending and gnutls_transport_set_errno.
(emacs_gnutls_write, emacs_gnutls_read)
(emacs_gnutls_handle_error, Fgnutls_error_fatalp)
(Fgnutls_available_p): New function.
(Fgnutls_boot): Call Fgnutls_available_p. Use function pointers.
(syms_of_gnutls) <Qgnutls_dll>: Initialize and staticpro it.
(syms_of_gnutls) <Sgnutls_available_p>: defsubr it.
* src/gnutls.h (GNUTLS_EMACS_ERROR_NOT_LOADED): New macro.
(emacs_gnutls_write, emacs_gnutls_read): Mark as extern.
(emacs_gnutls_record_check_pending, emacs_gnutls_transport_set_errno):
Declare.
* src/w32.c (QCloaded_from, Vlibrary_cache): Define.
(w32_delayed_load): Move from image.c. When loading a library, record
its filename in the :loaded-from property of the library id.
(globals_of_w32) <QCloaded_from, Vlibrary_cache>:
Initialize and staticpro them.
(emacs_gnutls_pull, emacs_gnutls_push): Call emacs_gnutls_* functions.
* src/image.c: Include w32.h.
(Vimage_type_cache): Delete.
(syms_of_image) <Vimage_type_cache>: Don't initialize and staticpro it.
(CACHE_IMAGE_TYPE, Finit_image_library): Use Vlibrary_cache instead.
(w32_delayed_load): Move to w32.c.
* src/process.c: Include lisp.h before src/w32.h, not after.
(wait_reading_process_output): Call emacs_gnutls_record_check_pending
instead of gnutls_record_check_pending.
* src/w32.h (VlibraryCache, QCloaded_from, w32_delayed_load): Declare.
(BITS_PER_LONG_LONG): Define if C99-style long long and "%lld" work.
(EMACS_INT, BITS_PER_EMACS_INT, pI): Otherwise, define these if
__int64 and "%I64d" work.
* nt/configure.bat: New options --without-gnutls and --lib, new build
variable USER_LIBS, automatically detect GnuTLS. Copies the PNG
library setup with trivial modifications.
* nt/INSTALL: Add instructions for GnuTLS support.
* nt/gmake.defs: Prefix USER_LIBS with -l.
nt/config.nt (NO_INLINE, ATTRIBUTE_FORMAT)
(ATTRIBUTE_FORMAT_PRINTF): Define, as followup to 2011-04-06T05:19:39Z!eggert@cs.ucla.edu
on the trunk on 2011-04-06.
nt/inc/stdint.h: New file, to support compilation with tool chains
that do not have stdint.h (e.g. MSVC).
lib/makefile.w32-in: ($(BLD)/md5.$(O)): Added dependency on
$(EMACS_ROOT)/nt/inc/stdint.h.
src/makefile.w32-in (GLOBAL_SOURCES, SOME_MACHINE_OBJECTS, obj): New
macros.
(globals.h, gl-stamp): New targets.
(clean): Clean gl-stamp and globals.h.
nt/makefile.w32-in (bootstrap-nmake, bootstrap-gmake): Make the
"make-docfile" target in lib-src, before bootstrapping the src
directory. Needed since building in src needs to run make-docfile
to produce globals.h.
src/image.c <Qlibpng_version>: New variable.
(syms_of_image): Intern and staticpro it. Set its value to the
version of PNG library we were compiled with.
(my_png_error, png_load): Avoid GCC warnings about direct access
to png_ptr->jmpbuf.
lisp/term/w32-win.el (image-library-alist): Set up correctly for
libpng versions both before and after 1.4.0.
admin/nt/README.W32: Update the information about PNG support libraries.
nt/INSTALL: Update the information about PNG support libraries.
* nt/makefile.w32-in: Copy README.W32 to installation directory
during `make install'. Remove README.W32 with `distclean' (in
case Emacs was installed in place). Use temporary directory to
create distribution zip files in `dist' target.
* nt/zipdist.bat: Simplify code using temporary directory.
* admin/admin.el: Write version number to nt/makefile.w32-in.
* admin/nt/makedist.bat: Remove; replaced with `zipdist.bat'
in the nt/ directory.
* admin/nt/README.W32: Relocate to nt/ directory.
* etc/NEWS: Document new --distfiles configure.bat option and
`dist' make target on Windows.
* nt/INSTALL: Document new dist target and add section about
creating binary distributions.
* nt/configure.bat: New parameter `--distfiles'.
* nt/makefile.w32-in: Add version number, new target `dist'.
Add new target `install-shortcuts'.
* nt/zipdist.bat: New file; create zipped binary distribution,
replaces admin/nt/makedist.bat.
* configure.in (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Do not define.
* src/Makefile.in (LD_SWITCH_X_SITE): Define as a variable, not via cpp.
(LIBX_BASE): Use $LD_SWITCH_X_SITE.
* nt/config.nt (LD_SWITCH_X_SITE, C_SWITCH_X_SITE): Remove undefs.
* msdos/sed1v2.inp: Comment.
* configure.in (LD_SWITCH_X_SITE_AUX): Use AC_SUBST only, not AC_DEFINE as well.
(LD_SWITCH_X_SITE_AUX_RPATH): New output variable.
* nt/config.nt (LD_SWITCH_X_SITE_AUX): Remove.
* src/s/gnu-linux.h (LD_SWITCH_SYSTEM): Use LD_SWITCH_X_SITE_AUX as a shell
variable.
* src/s/netbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
(LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH.
* src/s/openbsd.h (LD_SWITCH_SYSTEM_tmp): Remove.
(LD_SWITCH_SYSTEM): Use $LD_SWITCH_X_SITE_AUX_RPATH instead of
LD_SWITCH_SYSTEM_tmp.
* src/Makefile.in (LD_SWITCH_X_SITE_AUX, LD_SWITCH_X_SITE_AUX_RPATH):
New variables, set by configure.
* w32term.c (w32_initialize): Use GetModuleHandle for library that
is already loaded.
Set user model ID if supported (bug#1849).
* runemacs.c (set_user_model_id): New function.
(WinMain): Use it.
* emacsclient.c (w32_give_focus): Use GetModuleHandle for library
that is already loaded.
(w32_set_user_model_id): New function.
(main): Use it to associate emacsclient with emacs (bug#1849).
inc/pwd.h (struct passwd): Change the types of pw_uid and pw_gid to unsigned.
(getpwuid): Argument is now unsigned.
uid_t is now unsigned.
ntlib.c (setuid): Argument is now unsigned.
(getuid): Return value is now unsigned.
(getpwuid): Argument is now unsigned.
(fchown): UID and GID arguments are now unsigned.
ntlib.h (fchown): UID and GID arguments are now unsigned.
(getuid): Return value is now unsigned.
(setuid): Argument is now unsigned.
(getpwuid): Remove prototype (it's declared in nt/inc/pwd.h).
w32.c (getpwuid): Change argument type to unsigned.
(struct w32_id): Change type of `rid' member to unsigned.
(w32_cached_id, w32_add_to_cache, get_name_and_id): Change type of
argument ID to unsigned. All callers changed.
(getuid, geteuid, getgid, getegid): Change return type to unsigned.
Don't hardcode -gstabs+, use DEBUG_INFO.
* configure.bat (gccdebug): Check for DWARF-2 support in GCC.
Default to stabs if the compiler does not support DWARF-2.
(genmakefiles): Write new variable DEBUG_INFO to config.settings.