Fossil SCM
... and without -DUNICODE as well
Commit
7ba6a72443fce15acbfee08443c82ce17864f8e4
Parent
8bde948434b7c8e…
1 file changed
+5
+5
| --- src/popen.c | ||
| +++ src/popen.c | ||
| @@ -139,12 +139,17 @@ | ||
| 139 | 139 | if( !CreatePipe(&hStdinRd, &hStdinWr, &saAttr, 4096) ){ |
| 140 | 140 | win32_fatal_error("cannot create pipe for stdin"); |
| 141 | 141 | } |
| 142 | 142 | SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE); |
| 143 | 143 | |
| 144 | +#ifdef UNICODE | |
| 144 | 145 | win32_create_child_process(fossil_utf8_to_unicode(zCmd), |
| 145 | 146 | hStdinRd, hStdoutWr, hStderr,&childPid); |
| 147 | +#else | |
| 148 | + win32_create_child_process(fossil_utf8_to_mbcs(zCmd), | |
| 149 | + hStdinRd, hStdoutWr, hStderr,&childPid); | |
| 150 | +#endif | |
| 146 | 151 | *pChildPid = childPid; |
| 147 | 152 | *pfdIn = _open_osfhandle(PTR_TO_INT(hStdoutRd), 0); |
| 148 | 153 | fd = _open_osfhandle(PTR_TO_INT(hStdinWr), 0); |
| 149 | 154 | *ppOut = _fdopen(fd, "w"); |
| 150 | 155 | CloseHandle(hStdinRd); |
| 151 | 156 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -139,12 +139,17 @@ | |
| 139 | if( !CreatePipe(&hStdinRd, &hStdinWr, &saAttr, 4096) ){ |
| 140 | win32_fatal_error("cannot create pipe for stdin"); |
| 141 | } |
| 142 | SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE); |
| 143 | |
| 144 | win32_create_child_process(fossil_utf8_to_unicode(zCmd), |
| 145 | hStdinRd, hStdoutWr, hStderr,&childPid); |
| 146 | *pChildPid = childPid; |
| 147 | *pfdIn = _open_osfhandle(PTR_TO_INT(hStdoutRd), 0); |
| 148 | fd = _open_osfhandle(PTR_TO_INT(hStdinWr), 0); |
| 149 | *ppOut = _fdopen(fd, "w"); |
| 150 | CloseHandle(hStdinRd); |
| 151 |
| --- src/popen.c | |
| +++ src/popen.c | |
| @@ -139,12 +139,17 @@ | |
| 139 | if( !CreatePipe(&hStdinRd, &hStdinWr, &saAttr, 4096) ){ |
| 140 | win32_fatal_error("cannot create pipe for stdin"); |
| 141 | } |
| 142 | SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE); |
| 143 | |
| 144 | #ifdef UNICODE |
| 145 | win32_create_child_process(fossil_utf8_to_unicode(zCmd), |
| 146 | hStdinRd, hStdoutWr, hStderr,&childPid); |
| 147 | #else |
| 148 | win32_create_child_process(fossil_utf8_to_mbcs(zCmd), |
| 149 | hStdinRd, hStdoutWr, hStderr,&childPid); |
| 150 | #endif |
| 151 | *pChildPid = childPid; |
| 152 | *pfdIn = _open_osfhandle(PTR_TO_INT(hStdoutRd), 0); |
| 153 | fd = _open_osfhandle(PTR_TO_INT(hStdinWr), 0); |
| 154 | *ppOut = _fdopen(fd, "w"); |
| 155 | CloseHandle(hStdinRd); |
| 156 |