1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00
Commit Graph

15 Commits

Author SHA1 Message Date
Eli Zaretskii
70096743d5 MS-Windows follow-up for recent TZ-related changes
* nt/mingw-cfg.site (ac_cv_header_pthread_h)
(gl_cv_sys_struct_timespec_in_pthread_h): Force to "no", to avoid
picking up 'struct timespec' from pthread.h, if it is installed on
the user's system.  We want either the definitions from MinGW
system headers, if available, or the Gnulib replacements if not.

* nt/inc/ms-w32.h <struct timespec>: Don't define, as we now use
lib/time.h.

* lib/time.in.h: Don't let __need_* symbols affect what happens on
MinGW.  These symbols are defined by MinGW system headers, but we
don't want that to affect whether Gnulib portions of the header
are or aren't used.
2015-07-27 15:16:06 +03: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
Glenn Morris
62e010af33 * nt/mingw-cfg.site: No need for this to be executable. 2013-11-08 19:33:41 -05: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
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
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
Paul Eggert
8a9f4fb4d6 Spelling fixes. 2013-05-18 00:17:03 -07:00
Eli Zaretskii
3946d31b7b Minor tweaks in comments to scripts and INSTALL.MSYS. 2013-05-16 12:44:44 +03:00
Eli Zaretskii
9e5b5c7934 Fixed nt/mingw-cfg.site to pass the configure step. 2013-05-15 20:06:26 +03:00
Eli Zaretskii
6cd0eaeb6b Fixed mingw-cfg.site to avoid some gnulib replacements. 2013-03-30 12:42:50 +03:00
Eli Zaretskii
cb11bd957d Finished with config.nt diffs. Problem with mmsystem.h remains. 2013-03-29 22:53:25 +03:00
Eli Zaretskii
da6c96247a Finished first cut of mingw-cfg.site. 2013-03-29 18:25:48 +03:00
Eli Zaretskii
ef90474243 Handled fstatat and fsync, fixed fdopendir. 2013-03-29 15:36:43 +03:00
Eli Zaretskii
52aa6b170b Fix CLASH_DETECTION and 'not needed' result for fdopendir. 2013-03-29 14:38:13 +03:00
Eli Zaretskii
c38ad11c2a Added nt/mingw-cfg.site, first few vars defined on it. 2013-03-29 14:29:23 +03:00