Mercurial > vim
diff src/os_win32.c @ 8493:caed4b2d305f v7.4.1537
commit https://github.com/vim/vim/commit/509ce2a558e7e0c03242e32e844255af52f1c821
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Mar 11 22:52:15 2016 +0100
patch 7.4.1537
Problem: Too many feature flags for pipes, jobs and channels.
Solution: Only use FEAT_JOB_CHANNEL.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Fri, 11 Mar 2016 23:00:06 +0100 |
parents | daebcbd87bd3 |
children | e32ab146b6c9 |
line wrap: on
line diff
--- a/src/os_win32.c +++ b/src/os_win32.c @@ -1492,7 +1492,7 @@ WaitForChar(long msec) { DWORD dwWaitTime = dwEndTime - dwNow; -#ifdef FEAT_CHANNEL +#ifdef FEAT_JOB_CHANNEL /* Check channel while waiting input. */ if (dwWaitTime > 100) dwWaitTime = 100; @@ -4991,7 +4991,7 @@ mch_call_shell( return x; } -#if defined(FEAT_JOB) || defined(PROTO) +#if defined(FEAT_JOB_CHANNEL) || defined(PROTO) static HANDLE job_io_file_open( char_u *fname, @@ -5033,7 +5033,6 @@ mch_start_job(char *cmd, job_T *job, job STARTUPINFO si; PROCESS_INFORMATION pi; HANDLE jo; -# ifdef FEAT_CHANNEL SECURITY_ATTRIBUTES saAttr; channel_T *channel = NULL; HANDLE ifd[2]; @@ -5057,7 +5056,6 @@ mch_start_job(char *cmd, job_T *job, job ofd[1] = INVALID_HANDLE_VALUE; efd[0] = INVALID_HANDLE_VALUE; efd[1] = INVALID_HANDLE_VALUE; -# endif jo = CreateJobObject(NULL, NULL); if (jo == NULL) @@ -5072,7 +5070,6 @@ mch_start_job(char *cmd, job_T *job, job si.dwFlags |= STARTF_USESHOWWINDOW; si.wShowWindow = SW_HIDE; -# ifdef FEAT_CHANNEL saAttr.nLength = sizeof(SECURITY_ATTRIBUTES); saAttr.bInheritHandle = TRUE; saAttr.lpSecurityDescriptor = NULL; @@ -5149,7 +5146,6 @@ mch_start_job(char *cmd, job_T *job, job if (channel == NULL) goto failed; } -# endif if (!vim_create_process(cmd, TRUE, CREATE_SUSPENDED | @@ -5176,7 +5172,6 @@ mch_start_job(char *cmd, job_T *job, job job->jv_job_object = jo; job->jv_status = JOB_STARTED; -# ifdef FEAT_CHANNEL if (!use_file_for_in) CloseHandle(ifd[0]); if (!use_file_for_out) @@ -5196,11 +5191,9 @@ mch_start_job(char *cmd, job_T *job, job ? INVALID_FD : (sock_T)efd[0]); channel_set_job(channel, job, options); } -# endif return; failed: -# ifdef FEAT_CHANNEL CloseHandle(ifd[0]); CloseHandle(ofd[0]); CloseHandle(efd[0]); @@ -5208,9 +5201,6 @@ failed: CloseHandle(ofd[1]); CloseHandle(efd[1]); channel_unref(channel); -# else - ; /* make compiler happy */ -# endif } char *