diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-03-11 22:52:15 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-03-11 22:52:15 +0100 |
commit | 509ce2a558e7e0c03242e32e844255af52f1c821 (patch) | |
tree | a79ac8c1e42f2f9eefa81016328194a346dade06 /src/os_win32.c | |
parent | de27989157f35172b25f9e01e0c147ed8f6ae3ce (diff) | |
download | vim-git-509ce2a558e7e0c03242e32e844255af52f1c821.tar.gz |
patch 7.4.1537v7.4.1537
Problem: Too many feature flags for pipes, jobs and channels.
Solution: Only use FEAT_JOB_CHANNEL.
Diffstat (limited to 'src/os_win32.c')
-rw-r--r-- | src/os_win32.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/os_win32.c b/src/os_win32.c index 49fd0f703..d7b563459 100644 --- 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, jobopt_T *options) 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, jobopt_T *options) 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, jobopt_T *options) 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, jobopt_T *options) 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, jobopt_T *options) 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, jobopt_T *options) ? 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 * |