Fossil

Check-in [7ba6a724]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:... and without -DUNICODE as well
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | eclipse-project
Files: files | file ages | folders
SHA1:7ba6a72443fce15acbfee08443c82ce17864f8e4
User & Date: jan.nijtmans 2012-08-22 14:57:06
Context
2012-08-23
07:25
merge SQL injection prevention patches into the eclipse-project branch check-in: 0fdb1f4f user: jan.nijtmans tags: eclipse-project
2012-08-22
14:57
... and without -DUNICODE as well check-in: 7ba6a724 user: jan.nijtmans tags: eclipse-project
14:53
Allow popen.c and winhttp.c to be compiled with -DUNICODE -D_UNICODE (the latter just by undefining those) check-in: 8bde9484 user: jan.nijtmans tags: eclipse-project
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/popen.c.

137
138
139
140
141
142
143

144
145




146
147
148
149
150
151
152
  SetHandleInformation( hStdoutRd, HANDLE_FLAG_INHERIT, FALSE);

  if( !CreatePipe(&hStdinRd, &hStdinWr, &saAttr, 4096) ){
    win32_fatal_error("cannot create pipe for stdin");
  }
  SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE);
  

  win32_create_child_process(fossil_utf8_to_unicode(zCmd),
                             hStdinRd, hStdoutWr, hStderr,&childPid);




  *pChildPid = childPid;
  *pfdIn = _open_osfhandle(PTR_TO_INT(hStdoutRd), 0);
  fd = _open_osfhandle(PTR_TO_INT(hStdinWr), 0);
  *ppOut = _fdopen(fd, "w");
  CloseHandle(hStdinRd); 
  CloseHandle(hStdoutWr);
  return 0;







>


>
>
>
>







137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
  SetHandleInformation( hStdoutRd, HANDLE_FLAG_INHERIT, FALSE);

  if( !CreatePipe(&hStdinRd, &hStdinWr, &saAttr, 4096) ){
    win32_fatal_error("cannot create pipe for stdin");
  }
  SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE);
  
#ifdef UNICODE
  win32_create_child_process(fossil_utf8_to_unicode(zCmd),
                             hStdinRd, hStdoutWr, hStderr,&childPid);
#else
  win32_create_child_process(fossil_utf8_to_mbcs(zCmd),
                             hStdinRd, hStdoutWr, hStderr,&childPid);
#endif
  *pChildPid = childPid;
  *pfdIn = _open_osfhandle(PTR_TO_INT(hStdoutRd), 0);
  fd = _open_osfhandle(PTR_TO_INT(hStdinWr), 0);
  *ppOut = _fdopen(fd, "w");
  CloseHandle(hStdinRd); 
  CloseHandle(hStdoutWr);
  return 0;