Fossil SCM

... and without -DUNICODE as well

jan.nijtmans 2012-08-22 14:57 eclipse-project
Commit 7ba6a72443fce15acbfee08443c82ce17864f8e4
1 file changed +5
--- src/popen.c
+++ src/popen.c
@@ -139,12 +139,17 @@
139139
if( !CreatePipe(&hStdinRd, &hStdinWr, &saAttr, 4096) ){
140140
win32_fatal_error("cannot create pipe for stdin");
141141
}
142142
SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE);
143143
144
+#ifdef UNICODE
144145
win32_create_child_process(fossil_utf8_to_unicode(zCmd),
145146
hStdinRd, hStdoutWr, hStderr,&childPid);
147
+#else
148
+ win32_create_child_process(fossil_utf8_to_mbcs(zCmd),
149
+ hStdinRd, hStdoutWr, hStderr,&childPid);
150
+#endif
146151
*pChildPid = childPid;
147152
*pfdIn = _open_osfhandle(PTR_TO_INT(hStdoutRd), 0);
148153
fd = _open_osfhandle(PTR_TO_INT(hStdinWr), 0);
149154
*ppOut = _fdopen(fd, "w");
150155
CloseHandle(hStdinRd);
151156
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button