1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-25 07:28:20 +00:00
Commit Graph

1111 Commits

Author SHA1 Message Date
Paul Eggert
ba3189039a Update copyright year to 2014 by running admin/update-copyright. 2014-01-01 07:43:34 +00:00
Fabrice Popineau
bd717ca4f4 Minor fixes for MinGW64 build.
configure.ac (canonical, C_SWITCH_SYSTEM): Support a 64-bit
 MinGW64 build on MS-Windows.

 nt/inc/ms-w32.h (sys_kill): Fix prototype.

 src/w32term.c (w32_initialize): Use LCID and LOWORD.
 src/w32proc.c (create_child): Use pid_t for 5th argument.
 (IsValidLocale): Don't provide prototype for MinGW64.
 (Fw32_get_valid_keyboard_layouts, Fw32_get_keyboard_layout)
 (Fw32_set_keyboard_layout): Use HKL and HIWORD/LOWORD.
 src/w32heap.c (allocate_heap) [_WIN64]: Use "ull", not "i64", which
 MinGW64 doesn't support.
 src/lisp.h (EMACS_INT) [_WIN64]: Define for the MinGW64 build.
2013-12-31 18:01:34 +02:00
Eli Zaretskii
1b7259fce2 Fix bug #16299 with assertion violation in set-default-file-modes on Windows.
src/w32.c (sys_umask): New function.

 nt/inc/ms-w32.h (umask) [emacs]: Redirect to sys_umask.
2013-12-30 19:51:28 +02:00
Eli Zaretskii
6313576256 Update MS-Windows installation instructions for librsvg. 2013-12-23 20:32:58 +02:00
Eli Zaretskii
2f43a3ee6a Update Emacs's Windows manifests to support Windows 8.1.
nt/emacs-x64.manifest:
 nt/emacs-x86.manifest: Declare that we target Windows 8.1 as well
 as earlier versions.  This is so GetVersion and GetVersionEx APIs
 used for bug reporting and other purposes return accurate version
 number on Windows 8.1.  See the discussion on MSDN
 http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx
 for more details.
2013-12-16 20:18:44 +02:00
Eli Zaretskii
01633a17e7 Support MS-Windows file names that use characters outside of ANSI codepage.
src/w32.c (get_file_security, set_file_security)
 (create_symbolic_link): Separate pointers and boolean flags for
 ANSI and Unicode APIs.  Use the latter if w32_unicode_filenames is
 non-zero, else the former.
 (codepage_for_filenames, filename_to_utf16, )
 (filename_from_utf16, filename_to_ansi, filename_from_ansi): New
 functions.
 (init_user_info): Allow $HOME and $SHELL to include non-ANSI
 characters.
 (normalize_filename): Lose the DBCS code, now works on UTF-8.
 Accept only one argument; all callers changed.
 (dostounix_filename): Remove the second argument, now works in
 UTF-8.  All callers changed.
 (parse_root): Lose DBCS code.
 (get_long_basename, w32_get_short_filename, init_environment)
 (GetCachedVolumeInformation, sys_readdir, open_unc_volume)
 (read_unc_volume, logon_network_drive, faccessat, sys_chdir)
 (sys_chmod, sys_creat, sys_fopen, sys_link, sys_mkdir, sys_open)
 (sys_rename_replace, sys_rmdir, sys_unlink, stat_worker, utime)
 (is_symlink, readlink, chase_symlinks, w32_delayed_load): Work in
 Unicode mode if w32_unicode_filenames is non-zero, in ANSI mode
 otherwise.
 (ansi_encode_filename): New function.
 (get_emacs_configuration, get_emacs_configuration_options):
 Functions deleted.
 (add_volume_info, GetCachedVolumeInformation): Run the input file
 name through unixtodos_filename, to ensure it is stored and
 referenced in canonical form.
 (get_volume_info): Lose the DBCS code, now works in UTF-8.
 (logon_network_drive, sys_link, utime): Improve error handling.
 (sys_access): New function.
 (hashval, generate_inode_val): Unused functions deleted.
 (symlink, readlink, readlinkat): Lose DBCS code, now works in UTF-8.
 (check_windows_init_file): Convert error message from UTF-8 to
 ANSI codepage, for display in the message box.
 (globals_of_w32): Set w32_unicode_filenames according to the OS
 version.
 src/w32term.c (construct_drag_n_drop): Work in Unicode mode when
 w32_unicode_filenames is non-zero, ANSI mode otherwise.
 (syms_of_w32term): Declare w32-unicode-filenames.
 src/w32proc.c (new_child, delete_child): Remove code that handled
 unused pending_deletion and input_file members of the child struct.
 (create_child, sys_spawnve): Convert all file names to ANSI
 codepage.  Use ANSI APIs explicitly; forcibly fail if any file
 name cannot be encoded in ANSI codepage.  Don't use
 unixtodos_filename, mirror slashes by hand.
 (record_infile, record_pending_deletion): Functions deleted.
 (Fw32_short_file_name): Call w32_get_short_filename instead of
 GetShortPathName.
 src/w32notify.c (add_watch): Work in Unicode mode when
 w32_unicode_filenames is non-zero, ANSI mode otherwise.
 (Fw32notify_add_watch): Rewrite to avoid using GetFullPathName;
 instead, do the same with Lisp primitives.
 src/w32fns.c (file_dialog_callback, Fx_file_dialog)
 (Fsystem_move_file_to_trash, Fw32_shell_execute)
 (Ffile_system_info, Fdefault_printer_name): Work in Unicode mode
 when w32_unicode_filenames is non-zero, ANSI mode otherwise.
 (Fw32_shell_execute): Improve error reporting.
 (Fdefault_printer_name): Ifdef away for Cygwin.
 src/w32.h (struct _child_process): Remove input_file and
 pending_deletion members that are no longer used.
 (dostounix_filename, w32_get_short_filename, filename_from_ansi)
 (filename_to_ansi, filename_from_utf16, filename_to_utf16)
 (ansi_encode_filename): New and updated prototypes.
 src/unexw32.c (open_input_file, open_output_file, unexec): Use ANSI
 APIs explicitly.
 (unexec): Don't use dostounix_filename, it expects a file name in
 UTF-8.  Instead, mirror backslashes by hand.  Convert NEW_NAME to
 ANSI encoding.
 src/fileio.c (Ffile_name_directory, file_name_as_directory)
 (directory_file_name, Fexpand_file_name)
 (Fsubstitute_in_file_name) [WINDOWSNT]: Adapt to the change in
 arguments of dostounix_filename.
 (Fexpand_file_name) [WINDOWSNT]: Convert value of $HOME to UTF-8.
 use MAX_UTF8_PATH for size of file-name strings.
 (emacs_readlinkat): Build an explicitly unibyte string for file
 names.
 (syms_of_fileio) <file-name-coding-system>
 default-file-name-coding-system>: Mention MS-Windows peculiarities.
 src/emacs.c (init_cmdargs) [WINDOWSNT]: Convert argv[0] to UTF-8.
 (main) [WINDOWSNT]: Convert the argv[] elements that are files or
 directories to UTF-8.
 (decode_env_path) [WINDOWSNT]: Convert file names taken from the
 environment, and each element of the input PATH, to UTF-8.
 src/dired.c (file_attributes): Use build_unibyte_string explicitly
 to make Lisp strings from user and group names.
 src/coding.h (ENCODE_FILE, DECODE_FILE): Just call encode_file and
 decode_file.
 src/coding.c (decode_file_name, encode_file_name): New functions.
 src/termcap.c (tgetent): Adapt to the change in arguments of
 dostounix_filename.
 src/sysdep.c (sys_subshell) [WINDOWSNT]: Use MAX_UTF8_PATH for file
 names.
 src/msdos.c (dostounix_filename, init_environment): Adapt to the
 change in arguments of dostounix_filename.
 src/image.c (xpm_load, tiff_load, gif_load, imagemagick_load)
 [WINDOWSNT]: Encode file names passed to the image libraries in
 ANSI codepage.
 src/gnutls.c (Fgnutls_boot): Encode all file names passed to GnuTLS.
 [WINDOWSNT]: Convert file names to the current ANSI codepage.
 src/filelock.c (lock_file) [WINDOWSNT]: Adapt to the change in
 arguments of dostounix_filename.

 nt/inc/ms-w32.h (MAX_UTF8_PATH): New macro.
 (opendir, closedir, readdir, seekdir): Redirect to replacement
 functions.
 nt/inc/dirent.h: Make d_name[] be MAXNAMELEN*4 characters long.

 lisp/term/w32-win.el (w32-handle-dropped-file):
 lisp/startup.el (normal-top-level):
 lisp/net/browse-url.el (browse-url-file-url):
 lisp/dnd.el (dnd-get-local-file-name): On MS-Windows, encode and
 decode file names using 'utf-8' rather than
 file-name-coding-system.

 doc/emacs/mule.texi (File Name Coding): Document file-name encoding
 peculiarities on MS-Windows.

 doc/lispref/nonascii.texi (Encoding and I/O): Document file-name encoding
 peculiarities on MS-Windows.

 etc/NEWS: Mention support on MS-Windows of file names outside of the
 current locale.

Fixes: debbugs:7100
2013-12-12 20:19:10 +02:00
Eli Zaretskii
ce1d7b61f1 Merge from trunk. 2013-12-07 19:21:57 +02:00
Stefan Monnier
7cdf484be3 * configure.ac (HAVE_MENUS): Remove.
* src/xmenu.c (Fmenu_or_popup_active_p):
* src/window.c (Fset_window_configuration):
* src/menu.c (Fx_popup_menu, Fx_popup_dialog):
* src/keyboard.c (record_menu_key, read_char_x_menu_prompt):
* src/fns.c (Fyes_or_no_p):
* src/editfns.c (Fmessage_box, Fmessage_or_box):
* src/alloc.c (make_save_ptr_ptr):
* src/xdisp.c, src/w32menu.c, src/term.c, src/xterm.h, src/xterm.c:
Remove HAVE_MENUS.
2013-11-28 20:22:40 -05:00
Glenn Morris
cb6c95a394 Move runtime leim lisp files to lisp/leim directory
This allows us to reuse much of the lisp build and installation machinery,
rather than duplicating it.

* Makefile.in (abs_builddir, leimdir): Remove.
(buildlisppath, SUBDIR, COPYDIR, COPYDESTS): No more leim directory.
(epaths-force-w32): No longer set BLD.
(leim): Remove.
(install-arch-indep): No longer run or install leim.
(mostlyclean, clean): No longer run leim rule.
(bootstrap-clean): Change leim target.
(maintainer-clean): Add leim.
(check-declare): Remove leim.

* README: Update for leim changes.

* configure.ac (leimdir): Remove.
(standardlisppath): No more leimdir.

* make-dist: Update for files from leim/ now being in lisp/leim/.

* doc/lispref/loading.texi (Library Search):
* doc/lispref/os.texi (Startup Summary): No more leim directory.

* leim/Makefile.in (leimdir): New variable.
(TIT_GB, TIT_BIG5, MISC, changed.tit, changed.misc)
(${leimdir}/leim-list.el, ${leimdir}/ja-dic/ja-dic.el):
Generate in $leimdir.
(all): Remove compilation, add ja-dic.
(leim-list.el): Now PHONY.
(setwins, compile-targets, compile-main, clean, mostlyclean)
(extraclean): Remove.
(bootstrap-clean): Delete all generated files.

* leim/README: Update for moved leim/ directory.

* leim/leim-ext.el (ucs-input-activate, hangul-input-method-activate):
Remove manual autoloads; now in loaddefs.el.
Disable byte-compile, version-control, autoloads in the output.

* lisp/Makefile.in (setwins_for_subdirs): Skip leim/ directory.
(compile-main): Depend on lisp/leim rule.
(leim): New rule.

* lisp/loadup.el: Move leim-list.el to leim/ subdirectory.

* lisp/startup.el (normal-top-level): No more leim directory.

* lisp/international/ja-dic-cnv.el (skkdic-convert):
Disable version-control and autoloads in output files.
* lisp/international/titdic-cnv.el (titdic-convert, miscdic-convert):
Disable version-control and autoloads in output files.

* lisp/leim/quail: Move here from ../leim.

* lisp/leim/quail/hangul.el (hangul-input-method-activate):
Add autoload cookie.
(generated-autoload-load-name): Set file-local value.

* lisp/leim/quail/uni-input.el (ucs-input-activate): Add autoload cookie.
(generated-autoload-load-name): Set file-local value.

* nt/README.W32:
* nt/addpm.c (env_vars):
* nt/epaths.nt (PATH_LOADSEARCH, PATH_DUMPLOADSEARCH):
* nt/paths.h (PATH_LOADSEARCH): No more leim directory.

* src/Makefile.in (leimdir): Now in lisp source directory.
($(leimdir)/leim-list.el): Just use ../leim .

* src/epaths.in (PATH_DUMPLOADSEARCH):

* src/lread.c (load_path_default):

* src/nsterm.m (ns_load_path): No more leim directory.

* .bzrignore: Update for relocated leim files.
2013-11-26 22:15:06 -08:00
Glenn Morris
624780f09d Preload leim-list.el
* Makefile.in (abs_builddir): New, set by configure.
(buildlisppath): Add leim/.
(epaths-force-w32): Set BLD.

* lisp/loadup.el: Load leim-list.el when found.

* lisp/startup.el (normal-top-level): Skip re-loading leim/leim-list.el.

* nt/epaths.nt (PATH_DUMPLOADSEARCH): Add leim/.

* src/callproc.c (init_callproc): Don't assume PATH_DUMPLOADSEARCH
is a single directory.

* src/epaths.in (PATH_DUMPLOADSEARCH): Add leim/.

Fixes: debbugs:4789
2013-11-25 20:06:23 -05:00
Eli Zaretskii
18b35e2c7a Merge from mainline. 2013-11-18 18:45:48 +02:00
Dani Moncayo
f4f38fad9a Remove nt/msysconfig.sh
* configure.ac [MINGW32]: Source nt/mingw-cfg.site.

* make-dist: Don't distribute nt/msysconfig.sh.

* nt/msysconfig.sh: Remove.

* nt/INSTALL: Update for this.

* nt/mingw-cfg.site: Comment.
2013-11-11 18:50:28 -08:00
Eli Zaretskii
0b9de7cd60 Dirent functions and directory-files are converted and work. 2013-11-09 14:49:02 +02:00
Glenn Morris
62e010af33 * nt/mingw-cfg.site: No need for this to be executable. 2013-11-08 19:33:41 -05:00
Glenn Morris
4dde498bce Remove the autogen/ directory
Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-10/msg00806.html

* autogen: Remove directory.  Move update_autogen to admin/.
* autogen.sh: Remove reference to copy_autogen.
* GNUmakefile (configure):
* Makefile.in (bootstrap): Do not try to run copy_autogen.
* config.bat: Use msdos/autogen rather than autogen.

* admin/update_autogen: Move here from ../autogen.
(usage): Update.  Remove -l, add -A.
(autogendir): New variable.
(ldefs_flag): Default to set.
(genfiles): Reduce to only ms-dos relevant files.
(main): Make checking autogen sources optional.
Make copying of autogen files optional.

* msdos/autogen/config.in:
* msdos/autogen/Makefile.in: Move here from ../autogen.

* nt/INSTALL: Remove reference to copy_autogen.

* nt/config.nt: Comment.
2013-11-04 23:54:03 -08:00
Glenn Morris
357a508109 Avoid non-portable " ... \"...\" ... " nesting
* configure.ac:
* Makefile.in (install-arch-indep, install-etcdoc, install-info):
* lib-src/Makefile.in ($(DESTDIR)${archlibdir}):
* nt/Makefile.in ($(DESTDIR)${archlibdir}):
Avoid non-portable "`\" nesting.
2013-10-24 19:04:33 -04:00
Glenn Morris
11e5e2eba1 Fix whitespace in previous Makefile.in changes 2013-10-23 21:05:54 -07:00
Glenn Morris
eb9a36619e Attempt at a fix for mingw CPPFLAGS
* configure.ac (CPPFLAGS) [mingw32]: Use abs_top_srcdir.

* Makefile.in (abs_top_srcdir):
* lib-src/Makefile.in (abs_top_srcdir):
* lwlib/Makefile.in (abs_top_srcdir):
* nt/Makefile.in (abs_top_srcdir):
* oldXMenu/Makefile.in (abs_top_srcdir):
* src/Makefile.in (abs_top_srcdir):
New, set by configure.
2013-10-23 19:15:16 -07:00
Glenn Morris
48f73cfbf3 Progress towards allowing installation in directories with whitespace
* Makefile.in (COPYDESTS, write_subdir, install-arch-dep)
(install-arch-indep, install-etcdoc, install-info, install-man)
(install-etc, uninstall): Quote entities that might contain whitespace.

* build-aux/update-subdirs: Handle whitespace in argument.
Check cd return value.

* doc/emacs/Makefile.in (install-dvi, install-html, install-pdf)
(install-ps, uninstall-dvi, uninstall-html, uninstall-ps)
(uninstall-pdf): Quote entities that might contain whitespace.

* doc/lispintro/Makefile.in (install-dvi, install-html, install-pdf)
(install-ps, uninstall-dvi, uninstall-html, uninstall-ps)
(uninstall-pdf): Quote entities that might contain whitespace.

* doc/lispref/Makefile.in (install-dvi, install-html, install-pdf)
(install-ps, uninstall-dvi, uninstall-html, uninstall-ps)
(uninstall-pdf): Quote entities that might contain whitespace.

* doc/misc/Makefile.in (install-dvi, install-html, install-pdf)
(install-ps, uninstall-dvi, uninstall-html, uninstall-ps)
(uninstall-pdf): Quote entities that might contain whitespace.

* lib-src/Makefile.in ($(DESTDIR)${archlibdir}, need-blessmail, install)
(uninstall): Quote entities that might contain whitespace.

* nt/Makefile.in ($(DESTDIR)${archlibdir}, install, uninstall):
Quote entities that might contain whitespace.
2013-10-23 00:20:57 -07:00
Glenn Morris
b8e3b0a9ec Make building in directories with whitespace possible
Make has trouble with targets containing whitespace, 
http://savannah.gnu.org/bugs/?712, so the general approach is
to use relative paths where possible.  It's generally only Emacs
itself that needs absolute paths, eg in src/epaths.h.

* configure.ac (srcdir): Don't make it absolute - abs_srcdir exists.

* Makefile.in (abs_srcdir): New, set by configure.
(buildlisppath): Use abs_srcdir.
(install-arch-indep, install-etcdoc, install-info, install-man)
(install-etc): Quote entities that might contain whitespace.

* admin/unidata/Makefile.in (emacs, ${DSTDIR}/charprop.el):
Quote entities that might contain whitespace.

* leim/Makefile.in (abs_srcdir): New, set by configure.
(buildlisppath): Use abs_srcdir.
(RUN_EMACS, .el.elc, changed.tit, changed.misc, leim-list.el)
($(srcdir)/ja-dic/ja-dic.el, setwins, distclean, check-declare):
Quote entities that might contain whitespace.

* lib-src/Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.

* lisp/Makefile.in (abs_srcdir, abs_lisp): New, set by configure.
(emacs, compile, compile-always):
Quote entities that might contain whitespace.
(custom-deps, finder-data, autoloads): Use abs_lisp.
($(MH_E_DIR)/mh-loaddefs.el, $(TRAMP_DIR)/tramp-loaddefs.el)
($(CAL_DIR)/cal-loaddefs.el, $(CAL_DIR)/diary-loaddefs.el)
($(CAL_DIR)/hol-loaddefs.el): Manually expand target file name.

* nextstep/Makefile.in (${ns_check_file} ${ns_appdir}):
Quote entities that might contain whitespace.

* nt/Makefile.in ($(DESTDIR)${archlibdir}):
Quote entities that might contain whitespace.

* src/Makefile.in (RUN_TEMACS): Make relative (again).
($(leimdir)/leim-list.el, .el.elc, $(lispsource)/loaddefs.el)
(bootstrap-emacs$(EXEEXT)):
Quote entities that might contain whitespace.

* test/automated/Makefile.in (abs_top_srcdir, top_builddir):
New, set by configure.
(top_srcdir): Remove.
(abs_test, abs_lispsrc): New.
(lisp): No longer absolute.
(emacs, lisp-compile, compile, compile-always):
Quote entities that might contain whitespace.

Fixes: debbugs:15675
2013-10-22 23:22:54 -07:00
Eli Zaretskii
03d58cca81 Start; wrote conversion from UTF-8 to UTF-16 and ANSI. 2013-10-19 21:17:01 +03:00
Eli Zaretskii
279066b2b3 Attempt to fix time_t related problems with MinGW 4.0 runtime.
nt/inc/mingw_time.h: New file.
 nt/inc/ms-w32.h: Include mingw_time.h instead of doing its job.

 src/w32proc.c: Include mingw_time.h.
 src/w32.c: Include mingw_time.h.
2013-10-14 19:23:10 +03:00
Eli Zaretskii
2f4586ad04 Make the MinGW32 build compatible with MinGW runtime 4.x.
nt/inc/dirent.h (struct dirent) [__MINGW_MAJOR_VERSION >= 4]: Make
 the layout of 'struct dirent' be compatible with MinGW32 runtime
 versions 4.0 and later.
 nt/inc/ms-w32.h (__MINGW_MAJOR_VERSION, __MINGW_MINOR_VERSION)
 (__MINGW_PATCHLEVEL) [!__MINGW64_VERSION_MAJOR]: Define, if not
 defined, but not for MinGW64.
 (_USE_32BIT_TIME_T) [__MINGW64_VERSION_MAJOR]: Define, to force
 use of 32-bit time_t type.
2013-10-12 16:11:14 +03:00
Eli Zaretskii
7135884547 Update nt/INSTALL with respect to giflib. 2013-10-12 12:00:21 +03:00
Paul Eggert
595e113b15 Improve support for popcount and counting trailing zeros.
Do this by using the Gnulib modules for this.
This should generate faster code on non-GCC, non-MSC platforms,
and make the code a bit more portable, at least in theory.
* admin/merge-gnulib (GNULIB_MODULES): Add count-one-bits
and count-trailing-zeros.
* lib/count-one-bits.c, lib/count-one-bits.h:
* lib/count-trailing-zeros.c, lib/count-trailing-zeros.h:
* m4/count-one-bits.m4, m4/count-trailing-zeros.m4:
New files, copied from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* nt/gnulib.mk: Merge changes from lib/gnulib.mk.
* src/data.c: Include <count-one-bits.h>, <count-trailing-zeros.h>.
(USE_MSC_POPCOUNT, POPCOUNT_STATIC_INLINE)
(NEED_GENERIC_POPCOUNT, popcount_size_t_generic)
(popcount_size_t_msc, popcount_size_t_gcc):
Remove; now done by Gnulib.
(popcount_size_t): Now a macro that defers to Gnulib.
(count_trailing_zero_bits): Return int, for consistency with
Gnulib and because Emacs prefers signed to unsigned int.
Don't assume that size_t is either unsigned int or unsigned long
or unsigned long long.
(size_t_to_host_endian): Do not assume that size_t is either
exactly 32 or exactly 64 bits wide.
* src/lisp.h (BITS_PER_SIZE_T): Define consistently with BITS_PER_LONG
etc., so that it's now an enum constant, not a macro.
No need to assume that it's either 32 or 64.

Fixes: debbugs:15550
2013-10-07 14:37:19 -07:00
Paul Eggert
cd30a8e09c In nt/gnulib.mk create <byteswap.h> from <byteswap.in.h>.
* gnulib.mk: Create <byteswap.h> from <byteswap.in.h>.
2013-10-04 16:27:11 +02:00
Eli Zaretskii
673558beaa Avoid replacing 'struct timeval' and compiling lib/gettimeofday.c on MinGW.
nt/mingw-cfg.site (gl_cv_sys_struct_timeval_tv_sec): Set to "yes"
 to avoid gnulib replacement of 'struct timeval' and the resulting
 compilation of lib/gettimeofday.c with incompatible version of
 gettimeofday.  Related discussions on emacs-devel:
 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00286.html
 http://lists.gnu.org/archive/html/emacs-devel/2013-09/msg00361.html
2013-09-20 10:21:20 +03:00
Glenn Morris
7605d081ba Update nt installation instructions to point to supported method
* nt/INSTALL: Rename from INSTALL.MSYS.

* nt/INSTALL.OLD: Rename from INSTALL.

* nt/configure.bat: Update for INSTALL name changes.

* make-dist: Update for nt/INSTALL* changes.
2013-08-31 11:26:59 -07:00
Glenn Morris
63e984f8fd Update location of Emacs on MS Windows FAQ 2013-08-27 15:40:24 -04:00
Vincent Belaïche
e687aa335a Add a question into configure.bat whether the user want to continue at
his/her own risks.
2013-08-25 22:11:56 +02:00
Glenn Morris
67aeda8d2f * INSTALL: Refer to INSTALL.MSYS. 2013-08-25 12:46:41 -07:00
Glenn Morris
b1dc190562 * nt/configure.bat: Disable it.
Ref http://lists.gnu.org/archive/html/emacs-devel/2013-08/msg00705.html
2013-08-25 12:44:59 -07:00
Eli Zaretskii
484ab23924 Minor fix of the last commit. 2013-08-04 18:43:10 +03:00
Eli Zaretskii
63f5c6c20d Implement mkostemp for MS-Windows.
nt/mingw-cfg.site (ac_cv_func_mkostemp): New var with value of "yes".
 nt/inc/ms-w32.h (mkostemp): Declare prototype.
 nt/config.nt (HAVE_MKOSTEMP): Define to 1.

 src/w32.c (mkostemp): New function.
 (mktemp): Remove, no longer used.  Most of the code reused in mkostemp.

Fixes: debbugs:15015
2013-08-04 18:32:12 +03:00
Glenn Morris
bbece175c9 Use a @configure_input@ comment at the start of generated Makefiles 2013-07-23 18:57:17 -04:00
Eli Zaretskii
1d44267275 MS-Windows followup for 2013-07-07T18:00:14Z!eggert@cs.ucla.edu.
nt/inc/sys/socket.h (F_SETFD, O_CLOEXEC, F_DUPFD_CLOEXEC)
 (FD_CLOEXEC): New macros.

 src/w32.c (sys_dup): Declare prototype.

 src/filelock.c:
 src/emacs.c:
 src/callproc.c [WINDOWSNT]: Include sys/socket.h.
2013-07-07 21:48:16 +03:00
Paul Eggert
067428c171 Make file descriptors close-on-exec when possible.
This simplifies Emacs a bit, since it no longer needs to worry
about closing file descriptors by hand in some cases.
It also fixes some unlikely races.  Not all such races, as
libraries often open files internally without setting
close-on-exec, but it's an improvement.
* admin/merge-gnulib (GNULIB_MODULES): Add fcntl, pipe2.
(GNULIB_TOOL_FLAGS): Avoid binary-io, close.  Do not avoid fcntl.
* configure.ac (mkostemp): New function to check for.
(PTY_OPEN): Pass O_CLOEXEC to posix_openpt.
* lib/fcntl.c, lib/getdtablesize.c, lib/pipe2.c, m4/fcntl.m4:
* m4/getdtablesize.m4, m4/pipe2.m4: New files, taken from gnulib.
* lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
* nt/gnulib.mk: Remove empty gl_GNULIB_ENABLED_verify section;
otherwise, gnulib-tool complains given close-on-exec changes.
* nt/inc/ms-w32.h (pipe): Remove.
* nt/mingw-cfg.site (ac_cv_func_fcntl, gl_cv_func_fcntl_f_dupfd_cloexec)
(gl_cv_func_fcntl_f_dupfd_works, ac_cv_func_pipe2): New vars.
* src/alloc.c (valid_pointer_p) [!WINDOWSNT]:
* src/callproc.c (Fcall_process) [!MSDOS]:
* src/emacs.c (main) [!DOS_NT]:
* src/nsterm.m (ns_term_init):
* src/process.c (create_process):
Use 'pipe2' with O_CLOEXEC instead of 'pipe'.
* src/emacs.c (Fcall_process_region) [HAVE_MKOSTEMP]:
* src/filelock.c (create_lock_file) [HAVE_MKOSTEMP]:
Prefer mkostemp with O_CLOEXEC to mkstemp.
* src/callproc.c (relocate_fd) [!WINDOWSNT]:
* src/emacs.c (main): Use F_DUPFD_CLOEXEC, not plain F_DUPFD.
No need to use fcntl (..., F_SETFD, FD_CLOEXEC), since we're
now using pipe2.
* src/filelock.c (create_lock_file) [! HAVE_MKOSTEMP]:
Make the resulting file descriptor close-on-exec.
* src/lisp.h, src/lread.c, src/process.c (close_load_descs, close_process_descs):
* src/lread.c (load_descriptor_list, load_descriptor_unwind):
Remove; no longer needed.  All uses removed.
* src/process.c (SOCK_CLOEXEC): Define to 0 if not supplied by system.
(close_on_exec, accept4, process_socket) [!SOCK_CLOEXEC]:
New functions.
(socket) [!SOCK_CLOEXEC]: Supply a substitute.
(Fmake_network_process, Fnetwork_interface_list):
(Fnetwork_interface_info, server_accept_connection):
Make newly-created socket close-on-exec.
* src/sysdep.c (emacs_open, emacs_fopen):
Make new-created descriptor close-on-exec.
* src/w32.c (fcntl): Support F_DUPFD_CLOEXEC well enough for Emacs.
* src/w32.c, src/w32.h (pipe2): Rename from 'pipe', with new flags arg.

Fixes: debbugs:14803
2013-07-07 11:00:14 -07:00
Juanma Barranquero
341881c044 nt/configure.bat: Warn about deprecation status. 2013-06-25 17:08:47 +02:00
Juanma Barranquero
e7b41c4c9a Fix ChangeLog typos and whitespace. 2013-06-10 16:58:52 +02:00
Eli Zaretskii
1698f87abd Don't advertise unsupported features in nt/INSTALL.MSYS. 2013-06-08 18:01:45 +03:00
Eli Zaretskii
1a312bf403 Minor tweak of nt/INSTALL.MSYS. 2013-06-08 06:38:46 +03:00
Eli Zaretskii
3649ba053b Minor improvements in nt/INSTALL.MSYS instructions.
nt/INSTALL.MSYS: mingw-get is not a GUI program (yet).
 msys-automake is not suitable for MinGW builds.  Mention the
 --enable-locallisppath switch to msysconfig.sh.  Suggested by
 ׃scar Fuentes <ofv@wanadoo.es>.
2013-06-07 11:31:53 +03:00
Richard Copley
6c0a9ed1b1 Fix bug #14513 with --enable-locallisppath not working on MS-Windows.
Makefile.in (msys_to_w32): Modify to support d:\foo file names.
 (msys_lisppath_to_w32, msys_prefix_subst, msys_sed_sh_escape): New
 variables.
 (epaths-force-w32): Use them.

 epaths.nt (PATH_SITELOADSEARCH): Fix commentary.

 epaths.in: Fix commentary to PATH_SITELOADSEARCH.
2013-06-07 11:08:29 +03:00
Eli Zaretskii
7f203aa1fd * configure.ac (HAVE_GFILENOTIFY): Do not change $LIBS.
(GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): Substitute.

* nt/config.nt: Add HAVE_GFILENOTIFY, HAVE_W32NOTIFY and USE_FILE_NOTIFY.

* src/Makefile.in (GFILENOTIFY_CFLAGS, GFILENOTIFY_LIBS): New variables.
(ALL_CFLAGS): Add $(GFILENOTIFY_CFLAGS).
(LIBES): Add $(GFILENOTIFY_LIBS).

* src/w32inevt.c (handle_file_notifications): Add dummy implementation
for !HAVE_W32NOTIFY.

* src/w32term.c: Wrap code with HAVE_W32NOTIFY.
2013-06-03 21:06:09 +02:00
Eli Zaretskii
e2d8a6f0a2 Attempt to resolve gettimeofday compilation errors with MinGW64.
src/w32.c (gettimeofday): Make the signature identical to prototype
 in nt/inc/sys/time.h.

 nt/inc/sys/time.h (struct timeval): Remove the _W64 guards.
2013-06-03 20:15:44 +03:00
Eli Zaretskii
22bcd514bc Update instructions in nt/INSTALL.MSYS. 2013-06-03 19:55:37 +03:00
Eli Zaretskii
32e2d7287f Fix compilation error on MinGW64 due to nt/inc/sys/time.h.
nt/inc/sys/time.h [!_TIMEZONE_DEFINED]: Define _TIMEZONE_DEFINED to
 avoid multiple definition errors on MinGW64.
2013-06-01 10:07:22 +03:00
Paul Eggert
f5d430271e Spelling fixes. 2013-05-31 10:10:10 -07:00
Eli Zaretskii
2a157a5d33 Fix compile errors in nt/inc/sys/time.h when using nt/configure.bat.
nt/inc/sys/time.h (gettimeofday): Use '__restrict' instead of
 'restrict', which is a C99 extension.  See
 http://lists.gnu.org/archive/html/emacs-devel/2013-05/msg00588.html
 and the following discussion for the problem this caused in the
 old nt/configure.bat build.
2013-05-31 11:47:18 +03:00
Eli Zaretskii
38b787fa72 Remove *.res files in mostlyclean, to avoid problems with out-of-tree builds.
src/Makefile.in (mostlyclean): Remove *.res files.

 lib-src/Makefile.in (mostlyclean): Remove *.res files.

 nt/Makefile.in (emacs.res): Include srcdir when preprocessing
 resources, for out-of-tree builds.
 (mostlyclean): Remove *.res files.
2013-05-29 19:48:42 +03:00