]> git.lyx.org Git - lyx.git/blobdiff - src/buffer.C
Fix my breakage. Sorry guys.
[lyx.git] / src / buffer.C
index 4a7de29cb7d8a012bf1c50b53017dc4cda2ce57a..fabaa9e0ed15f27ae49e780c66fbecd9c9848892 100644 (file)
@@ -65,7 +65,9 @@
 
 #include "support/FileInfo.h"
 #include "support/filetools.h"
-#include "support/gzstream.h"
+#ifdef USE_COMPRESSION
+# include "support/gzstream.h"
+#endif
 #include "support/lyxlib.h"
 #include "support/os.h"
 #include "support/path.h"
@@ -79,6 +81,7 @@
 #include <iomanip>
 #include <stack>
 #include <sstream>
+#include <fstream>
 
 
 using lyx::pos_type;
@@ -758,12 +761,15 @@ bool Buffer::writeFile(string const & fname) const
        bool retval = false;
 
        if (params().compressed) {
+#ifdef USE_COMPRESSION
                gz::ogzstream ofs(fname.c_str());
                if (!ofs)
                        return false;
 
                retval = do_writeFile(ofs);
-
+#else
+               return false;
+#endif
        } else {
                ofstream ofs(fname.c_str());
                if (!ofs)