mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
fix do_popen for cygwin
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3510 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
21245ae533
commit
c42c666fdc
@ -1,10 +1,15 @@
|
||||
2002-02-08 Jean-Marc Lasgouttes <lasgouttes@freesurf.fr>
|
||||
|
||||
* filetools.C (do_popen): fix for cygwin compatibility (from Claus
|
||||
Hentschel). This code should maybe be moved to os:: class.
|
||||
|
||||
2002-02-08 Herbert Voss <voss@perce.de>
|
||||
|
||||
* filetools.[C]: (unzipFile) fix typo
|
||||
* filetools.C: (unzipFile) fix typo
|
||||
|
||||
2002-02-06 Herbert Voss <voss@perce.de>
|
||||
|
||||
* filetools.[Ch]: fix sume bugs for detecting zipped files
|
||||
* filetools.[Ch]: fix some bugs for detecting zipped files
|
||||
adding unzipFile()
|
||||
|
||||
2002-02-04 Herbert Voss <voss@perce.de>
|
||||
|
@ -1134,7 +1134,18 @@ cmdret const do_popen(string const & cmd)
|
||||
// of course the best would be to have a
|
||||
// pstream (process stream), with the
|
||||
// variants ipstream, opstream
|
||||
FILE * inf = ::popen(cmd.c_str(), "r");
|
||||
|
||||
// CYGWIN needs 'b', but linux only works without it
|
||||
#ifdef __CYGWIN__
|
||||
FILE * inf = ::popen(cmd.c_str(), "rb");
|
||||
#else
|
||||
FILE * inf = ::popen(cmd.c_str(), "r");
|
||||
#endif
|
||||
|
||||
// (Claus Hentschel) Check if popen was succesful ;-)
|
||||
if (!inf)
|
||||
return make_pair(-1, string());
|
||||
|
||||
string ret;
|
||||
int c = fgetc(inf);
|
||||
while (c != EOF) {
|
||||
|
Loading…
Reference in New Issue
Block a user