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

188 Commits

Author SHA1 Message Date
Eli Zaretskii
3241c84fd8 Remove unneeded stuff from nt/inc/sys/time.h
* nt/inc/sys/time.h (_TIMEVAL_DEFINED, struct timevat, timerisset)
(timercmp, timerclear): Don't define.  Instead, include the system
header sys/time.h, and add only the interval timers stuff.  This
avoids compiler warnings about 'gettimeofday's prototype, and also
avoids redefinition of macros from system headers.
2017-05-15 22:45:57 +03:00
Eli Zaretskii
792ffa0223 Remove gettimeofday from w32 sources
* lib-src/ntlib.c (gettimeofday):
* nt/inc/sys/time.h (gettimeofday, struct timezone): Remove unused
function 'gettimeofday' and all of its supporting code.
2017-05-14 19:02:50 +03:00
Eli Zaretskii
3af6909f32 Fix the MS-Windows build
* nt/inc/sys/time.h (gettimeofday):
* src/w32.c (gettimeofday): Adjust signature to match Gnulib.
2017-05-14 17:53:39 +03:00
Eli Zaretskii
53348c6b9f ; Remove redundant definition of the 'DebPrint' macro
* nt/inc/ms-w32.h (DebPrint): Remove redundant definition (defined
in src/conf_post.h).
2017-05-04 18:11:53 +03:00
Eli Zaretskii
b7c5af2bbd Temporary fix for the MS_Windows build
* nt/inc/ms-w32.h (WIN32_LEAN_AND_MEAN): Define to an empty value,
to be consistent with Gnulib's utimens.c.  This is because utimens.c
unconditionally defines WIN32_LEAN_AND_MEAN to an empty value, so the
previous definition here conflicted with that.
2017-05-02 09:24:25 +03:00
Paul Eggert
e6a782ee1a Update copyright year to 2017 in master
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
2017-01-01 01:48:59 -08:00
Paul Eggert
bcf244ef9b Merge from origin/emacs-25
2e2a806 Fix copyright years by hand
5badc81 Update copyright year to 2017
2017-01-01 01:10:47 -08:00
Paul Eggert
5badc81c1c Update copyright year to 2017
Run admin/update-copyright.
2016-12-31 19:42:26 -08:00
Eli Zaretskii
de4624c99e Merge branch 'concurrency'
Conflicts (resolved):
	configure.ac
	src/Makefile.in
	src/alloc.c
	src/bytecode.c
	src/emacs.c
	src/eval.c
	src/lisp.h
	src/process.c
	src/regex.c
	src/regex.h
2016-12-04 19:59:17 +02:00
Eli Zaretskii
4cdd14eabe Implement getrlimit and setrlimit for MS-Windows
* src/w32heap.c (getrlimit, setrlimit): New functions.
Include w32.h.
* src/emacs.c (main): Use 'rlim_t', not 'long', for values that
should be compatible with 'struct rlimit' members.

* nt/inc/sys/resource.h: New header file.

* nt/mingw-cfg.site (ac_cv_func_getrlimit, ac_cv_func_setrlimit):
Set to "yes".
2016-11-19 12:17:23 +02:00
Eli Zaretskii
d48369db9c Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2
* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.

* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc.  This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.

* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier.  (Bug#24613)
2016-10-06 18:11:43 +03:00
Eli Zaretskii
34b6df19a4 Fix compilation with MinGW runtime 3.22.2 and w32api 3.18.2
* nt/inc/ms-w32.h (_WIN32_WINNT) [!MINGW_W64]: Undefine before
defining to avoid redefinition warnings.

* nt/inc/sys/stat.h (_SYS_STAT_H, _INC_STAT_H): Define, to avoid
inclusion of sys/stat.h from the system headers, which could then
lead to compilation errors due to redefinition of 'struct stat'
etc.  This is needed because latest versions of MinGW runtime
include sys/stat.h from wchar.h.

* src/image.c (__MINGW_MAJOR_VERSION) [WINDOWSNT]: Temporarily
redefine to 4 to avoid conflict between 2 definitions of
MemoryBarrier.  (Bug#24613)

Do not merge to master!
2016-10-06 18:08:31 +03:00
Eli Zaretskii
0c94b84708 * nt/inc/ms-w32.h (execve) [MINGW_W64]: Make commentary more accurate. 2016-09-01 20:15:25 +03:00
Eli Zaretskii
51b14b1f53 Avoid compiler warnings with MinGW64 GCC 6
* nt/inc/ms-w32.h (execve) [MINGW_W64]: Make the prototype match
the GCC 6 builtin, to avoid warnings.  For more details, see
http://lists.gnu.org/archive/html/emacs-devel/2016-08/msg00721.html.
2016-09-01 17:12:12 +03:00
Eli Zaretskii
d0e1774a58 Fix compilation warning in the MinGW build
* nt/inc/ms-w32.h: Include stdint.h.
(_execvp, execve): Provide prototypes.

* lib-src/emacsclient.c [WINDOWSNT]: Remove prototype for execvp,
it is now in nt/inc/ms-w32.h.
* lib-src/ntlib.c (getppid): Avoid compiler warnings due to format
mismatch.
(sys_ctime): Remove, not used.
2016-07-22 20:38:22 +03:00
John Wiegley
63efcc2686 Merge from origin/emacs-25
facb5e2 Update Emacs manual section related to character folding
4efea8e ; * etc/DEBUG: Fix a typo.  (Bug#22984)
f8df21b Update admin/notes/unicode
950be68 Add symref-filepattern entries for c?perl-mode
8b8a6ad Don't use XRANDR 1.3 extensions if the server doesn't support them.
985dacf ; NEWS update for the last change in etags
741a6f8 Sync with gnulib
7352c6c Rework C source files to avoid ^(
a589e9a By default, etags produces unqualified Perl tag names
72c7438 Indent methods with keyword names correctly
28532a9 Propertize character literals and special global variables
        differently
a7d6f39 ; Fix last change in NEWS
83b2a20 Change how /etc/NEWS presents character folding
b417c5a Revert "Revert "Backport: * lisp/isearch.el: Turn char-folding
        off by default""
711ca36 Properly handle lambda as read function (bug 22961)
1b9d616 Propertize operator symbol names with symbol syntax class
9b16bc2 Stop recognizing :#{} as symbol in ruby-mode
366ec77 Allow using the left shift operator without spaces on both sides
02bf7cc Properly handle unquoting in wdired (bug 22938)
16cf469 ; Spelling fix and tighten up comment
f50bc04 Allow splat operator before percent literal
991c801 Don't apply the return value of goto-char as syntax class
6e63b3e Guard against nested percent literals
066f3bc Recognize iuwu-mod after an escaped newline
6f7a57c Fix symbolic mode string conversion for s and t
50b9826 Update 'ucs-names' database
993b2fb Improve doc string of 'shell-command'
b71c717 Make the code in movemail_strftime more general
cc057e4 Speed up redisplay of binary files with long series of nulls
e51b27e Remove the highlighting support for quoting 'like this' inside
        Lisp docstrings
b1abce1 Restore leading space in movemail pop output
98b8d44 Fix bidi-paragraph-direction in Rmail view buffer
dc9d837 Don't misindent computed property generator methods
7923112 Fix mbox files produced by movemail on MS-Windows
c45a1ca doc string file descriptor exhaustion fix
265141b Fix Bug#22814
2016-03-11 13:33:32 -08:00
Paul Eggert
7352c6c695 Rework C source files to avoid ^(
Work around Bug#22884 by rewording comments and strings to avoid ‘(’
at the start of a line unless it starts a function.  This change
is a short-term hack; in the longer run we plan to fix cc-mode’s
performance for C files that have ‘(’ at the start of a line in a
comment or string.
2016-03-10 07:59:19 -08:00
Eli Zaretskii
69e03ddccf Unbreak the MinGW64 build
* nt/inc/ms-w32.h [MINGW_W64]: Undefine HAVE_GAI_STRERROR.  See
http://lists.gnu.org/archive/html/emacs-devel/2016-03/msg00130.html
for the details.  Reported by Angelo Graziosi
<angelo.graziosi@alice.it>.
2016-03-06 18:52:32 +02:00
Eli Zaretskii
bc96f6e827 Implement getaddrinfo fallback for MS-Windows
See http://lists.gnu.org/archive/html/emacs-devel/2016-02/msg01602.html
for more details.

* nt/mingw-cfg.site (ac_cv_func_getaddrinfo)
(ac_cv_func_gai_strerror): Set to "yes", as the configure script's
test program is not smart enough to auto-detect these.
* nt/inc/sys/socket.h (getaddrinfo, freeaddrinfo): Redirect to
sys_getaddrinfo and sys_freeaddrinfo.  Provide prototypes for
sys_getaddrinfo and sys_freeaddrinfo.

* src/w32.c (init_winsock): Try loading getaddrinfo and
freeaddrinfo from ws2_32.dll.
(sys_getaddrinfo, sys_freeaddrinfo): New functions.

* lib-src/pop.c [WINDOWSNT]: Include winsock2.h, not winsock.h,
and also ws2tcpip.h.
(getaddrinfo, freeaddrinfo) [WINDOWSNT]: Redirect to
sys_getaddrinfo and sys_freeaddrinfo, respectively.
(load_ws2, sys_getaddrinfo, sys_freeaddrinfo) [WINDOWSNT]: New
functions.
2016-03-05 12:12:58 +02:00
Jussi Lahdenniemi
15c23aaf83 Ensure 8-byte aligned memory allocation on MS-Windows 9X
* src/w32heap.c (init_heap): Redirect malloc, realloc, and free to
special functions on Windows 9X.  Refuse to dump Emacs on Windows 9X.
(malloc_after_dump_9x, realloc_after_dump_9x)
(free_after_dump_9x): New functions.  (Bug#22379)  See also
http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00852.html
for more details about the original problem.

* nt/inc/ms-w32.h (malloc_after_dump_9x, realloc_after_dump_9x)
(free_after_dump_9x): Add prototypes.

Copyright-paperwork-exempt: yes
2016-01-16 11:11:12 +02:00
Paul Eggert
0e963201d0 Update copyright year to 2016
Run admin/update-copyright.
2016-01-01 01:34:24 -08:00
Eli Zaretskii
470e3028d8 Fix the MS-Windows build
* src/thread.h [WINDOWSNT]: Include sys/socket.h.

* src/sysselect.h: Don't define fd_set and FD_* macros for
MS-Windows here.
* src/w32.h: Define them here.

* src/process.h (sys_select): Declare prototype.

* src/sysdep.c:
* src/process.c:
* src/filelock.c:
* src/emacs.c:
* src/callproc.c: Move inclusion of sys/select.h after lisp.h.
* nt/inc/socket.h: Include w32.h instead of sysselect.h
2015-11-02 19:04:06 +02:00
Ken Raeburn
39372e1a10 merge from trunk 2015-11-01 01:42:21 -04:00
Eli Zaretskii
7afa4f300b Support recovery from C stack overflow on MS-Windows
* src/w32fns.c (w32_reset_stack_overflow_guard)
(stack_overflow_handler): New functions for handling C stack
overflow exceptions.
(my_exception_handler): Handle EXCEPTION_STACK_OVERFLOW exceptions
specially, and zero out except_addr if we do.
(globals_of_w32fns): Initialize dwMainThreadId in non-interactive
mode.
* src/sysdep.c [HAVE_STACK_OVERFLOW_HANDLING]: Add !WINDOWSNT to
the condition, as HAVE_STACK_OVERFLOW_HANDLING is now defined for
the MinGW build, but the code guarded by that is for Posix hosts.
* src/keyboard.c (command_loop) [WINDOWSNT]: Call
w32_reset_stack_overflow_guard.

* nt/inc/ms-w32.h (sigjmp_buf): New typedef.
(sigsetjmp): New macro.
(w32_reset_stack_overflow_guard): Declare the prototype.

* configure.ac (HAVE_STACK_OVERFLOW_HANDLING): Set to 1 for MinGW.
2015-08-08 11:12:06 +03:00
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
Eli Zaretskii
aa83b5ecb0 Adapt 'struct timespec' to next release of MinGW runtime
* nt/inc/ms-w32.h (struct timespec): Don't declare if
__struct_timespec_defined is defined.
2015-06-07 18:36:25 +03:00
Eli Zaretskii
d133cf8394 Support non-blocking connect on MS-Windows (Bug#20207)
Based on ideas from Kim F. Storm <storm@cua.dk>, see
 http://lists.gnu.org/archive/html/emacs-devel/2006-12/msg00873.html.

 src/w32proc.c (reader_thread): If the FILE_CONNECT flag is set, call
 '_sys_wait_connect'.  If it returns STATUS_CONNECT_FAILED, exit
 the thread with code 2.
 (sys_select): Support 'wfds' in addition to 'rfds'.  If a
 descriptor in 'wfds' has its bit set, but the corresponding
 fd_info member doesn't have its FILE_CONNECT flag set, ignore the
 descriptor.  Otherwise, acknowledge a successful non-blocking
 connect by resetting the FILE_CONNECT flag and setting cp->status
 to STATUS_READ_ACKNOWLEDGED.
 src/w32.h (STATUS_CONNECT_FAILED): New enumeration value.
 (struct _child_process): New member 'errcode'.
 (FILE_CONNECT): New flag.
 (_sys_wait_connect): Add prototype.
 src/w32.c (pfn_WSAEnumNetworkEvents): New function pointer.
 (init_winsock): Load WSAEnumNetworkEvents from winsock DLL.
 (set_errno): Map WSAEWOULDBLOCK and WSAENOTCONN.
 (sys_connect): Support non-blocking 'connect' calls by setting the
 FILE_CONNECT flag in the fd_info member and returning EINPROGRESS.
 (_sys_read_ahead): Add debug message if this function is called
 for a descriptor that waits for a non-blocking connect to complete.
 (_sys_wait_connect): New function.
 (sys_read): Support STATUS_CONNECT_FAILED.  Return the error code
 recorded by _sys_wait_connect when the non-blocking connect
 failed.  Don't call WSAGetLastError before a call to set_errno had
 a chance to use its value, since WSAGetLastError clears the last
 error.

 nt/inc/ms-w32.h (BROKEN_NON_BLOCKING_CONNECT): Don't define.
2015-03-27 12:44:31 +03:00
Mark Laws
805fe50708 Support daemon mode on MS-Windows (bug#19688)
src/emacs.c <w32_daemon_event> [WINDOWSNT]: New global var.
 (main) [WINDOWSNT]: Initialize it to NULL.  Create the event to
 signal clients we are ready for connections.
 (Fdaemon_initialized): Use DAEMON_RUNNING.
 [WINDOWSNT]: MS-Windows specific code to signal clients we are
 ready for connections.
 src/lisp.h (DAEMON_RUNNING): New macro, encapsulates Posix and
 MS-Windows conditions for running in daemon mode.
 src/minibuf.c (read_minibuf): Use DAEMON_RUNNING.
 src/keyboard.c (kbd_buffer_get_event): Use DAEMON_RUNNING.
 src/dispnew.c (init_display) [WINDOWSNT]: Initialize frames/terminal
 even in daemon mode.

 nt/inc/ms-w32.h (W32_DAEMON_EVENT): New macro.

 lib-src/emacsclient.c (decode_options) [WINDOWSNT]: Don't reject empty
 arguments for --alternate-editor.
 (print_help_and_exit) [WINDOWSNT]: Don't refrain from advertising
 empty arguments for --alternate-editor.
 (start_daemon_and_retry_set_socket) [WINDOWSNT]: MS-Windows
 specific code to start Emacs in daemon mode and wait for it to be
 ready for client connections.

 lisp/server.el (server-process-filter): Force GUI frames on
 MS-Windows in daemon mode, even if a TTY frame was requested.
 lisp/frameset.el (frameset-keep-original-display-p): Don't assume
 windows-nt cannot be in daemon mode.
 lisp/frame.el (window-system-for-display): Don't assume windows-nt
 cannot be in daemon mode.
2015-02-27 12:43:30 +02:00
Paul Eggert
7e09ef09a4 Update copyright year to 2015
Run admin/update-copyright.
2015-01-01 14:26:41 -08:00
Ted Zlatanov
ba4502fe14 Merge branch 'emacs-24'
Conflicts:
	nt/addsection.c
	nt/inc/ms-w32.h
	src/w32.c
2014-11-26 21:31:11 -05:00
Oscar Fuentes
81e0cca7bb Define MINGW_W64 and use it instead of _W64
... for detecting MinGW-w64. _W64 is not specific of MinGW-w64, it is
defined for compatibility with MS VC++.

	* nt/inc/ms-w32.h: Define MINGW_W64.

	* admin/CPP-DEFINES: Mention MINGW_W64.

	* nt/addpm.c: Use it.

	* nt/addsection.c: Use it.

	* nt/preprep.c: Use it.

	* src/w32.c: Use MINGW_W64 instead of _W64

	* src/w32term.c: Likewise.
2014-11-17 23:10:00 +01:00
Dmitry Antipov
ea633fff4c * configure.ac (POLL_FOR_INPUT): Define with HAVE_WINDOW_SYSTEM.
* nt/inc/ms-w32.h (POLL_FOR_INPUT): Likewise.
* src/keyboard.c, src/process.c: Do not define POLL_FOR_INPUT here
because it will be defined in generated config.h if needed.
2014-06-05 10:24:54 +04:00
Fabrice Popineau
587fd086a0 Use mmap(2) emulation for buffer text on MS-Windows.
src/Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
 configure.
 (ADDSECTION, MINGW_TEMACS_POST_LINK): Remove, no longer used.
 src/lisp.h (NONPOINTER_BITS): Modify the condition to define to zero
 for MinGW, since it no longer uses gmalloc.
 src/buffer.c: Do not define mmap allocations functions for Windows.
 Remove mmap_find which is unused. Remove mmap_set_vars which does
 nothing useful.
 [WINDOWSNT]: Include w32heap.h.
 (init_buffer): Always allocate new memory for buffers.
 src/emacs.c: Remove mmap_set_vars calls.
 src/image.c (free_image): Undef free for Windows because it is
 redirected to our private version.
 src/unexw32.c (COPY_PROC_CHUNK): Use %p format for 64bits
 compatibility.
 (copy_executable_and_dump_data): Remove dumping the heap section.
 (unexec): Restore using_dynamic_heap after dumping.
 src/w32heap.c (dumped_data_commit, malloc_after_dump)
 (malloc_before_dump, realloc_after_dump, realloc_before_dump)
 (free_after_dump, free_before_dump, mmap_alloc, mmap_realloc)
 (mmap_free): New functions.
 src/w32heap.h: Declare dumped_data and mmap_* function prototypes.

 nt/inc/ms-w32.h: Switch to the system heap allocation scheme
 instead of GNU malloc and ralloc.
 nt/inc/sys/mman.h: New file.
 nt/INSTALL: Update for the new build requirements.

 etc/NEWS: Mention build changes on MS-Windows.

 configure.ac (C_HEAP_SWITCH) define for different values of
 dumped heap size depending on 32/64bits arch on Windows.
 Don't check for pthreads.h on MinGW32/64, it gets in the way.
 Use mmap(2) for buffers and system malloc for MinGW32/64.
2014-05-27 20:31:17 +03:00
Eli Zaretskii
e3188b2df1 Fix redefinition warning in MinGW64 build.
nt/inc/ms-w32.h (lseek): Define only if not already a macro.
 Suggested by Fabrice Popineau <fabrice.popineau@gmail.com>.
2014-04-21 09:37:21 +03:00
Claudio Bley
f0b5cd897f Fix MS-Windows build with MinGW runtime 4.x.
nt/inc/sys/stat.h (_WSTAT_DEFINED): Define, to avoid compilation
 failures when wchar.h is included.
2014-01-11 16:48:51 +02:00
Fabrice Popineau
e05d3a05bf Fix minor build problems related to MinGW64.
configure.ac: Read $srcdir/nt/mingw-cfg.site when $MSYSTEM is
 "MINGW64" as well.

 nt/inc/ms-w32.h (pthread_sigmask): Undefine if defined, for MinGW64.

 src/unexw32.c (_start) [__MINGW64__]: Define to __start.
2014-01-11 15:36:06 +02:00
Paul Eggert
06827ec842 Spelling fixes.
* mail/unrmail.el (unrmail-mbox-format): Choice is mboxo, not mboxro.
* woman.el (woman-mark-horizontal-position):
Rename from woman-mark-horizonal-position.  Use changed.
2014-01-09 23:10:37 -08:00
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
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
Eli Zaretskii
0b9de7cd60 Dirent functions and directory-files are converted and work. 2013-11-09 14:49:02 +02: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
6e9fb70cdf Fix MS-Windows build.
src/callproc.c: 
 src/emacs.c: 
 src/filelock.c: 
 src/process.c: 
 src/sysdep.c: 
 src/w32.c: Reshuffle Windows-specific headers to avoid errors with
 redefinition of fd_set etc.
 src/process.c: Don't use num_pending_connects when
 NON_BLOCKING_CONNECT is not defined.
 src/sysselect.h: Move definitions of FD_* macros and of SELECT_TYPE
 here from w32.h.
 src/w32proc.c (sys_select): Adjust the argument types to what
 thread.h expects.

 nt/inc/sys/socket.h: Include stdint.h.  Include sysselect.h instead
 of w32.h.
2013-08-26 21:42:11 +03: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
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