]> git.lyx.org Git - features.git/commitdiff
Some MSVC2003/2005 compatibility fixes, from Bo Peng (ben.bob@gmail.com)
authorBo Peng <bpeng@lyx.org>
Mon, 29 May 2006 14:56:08 +0000 (14:56 +0000)
committerBo Peng <bpeng@lyx.org>
Mon, 29 May 2006 14:56:08 +0000 (14:56 +0000)
* src/support/lyxsum.C: fix HAVE_DECL_ISTREAMBUF_ITERATOR
* src/support/mkdir.C: add direct.h for windows
* src/support/forkedcall.C: add cerrno under windows
* src/support/tempname.C: define S_IRUSR and S_IWUSR
* src/support/package.C.in: define PATH_MAX=256

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13951 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/BulletsModule.C
src/support/forkedcall.C
src/support/lyxsum.C
src/support/mkdir.C
src/support/package.C.in
src/support/tempname.C

index a23d3934e014d7af1ef34d4dc15559ab69c23a8a..54b85691ed55bb7fd749d57ef806b03ea17902de 100644 (file)
@@ -250,6 +250,8 @@ QPixmap BulletsModule::getPixmap(int font, int character)
        default:
                return standard_->pixmap(row,col);
        }*/
+       // make qt4 frontend at least compilable now.
+       return QPixmap();
 }
 
 
index e37e49d9d6f5e243f9e4861e2154392e93dec9fb..e1d5ef50cfd04655cc54f83479cc4438c06fda5c 100644 (file)
@@ -38,6 +38,7 @@
 #include <boost/bind.hpp>
 
 #include <vector>
+#include <cerrno>
 
 #ifdef _WIN32
 # define SIGHUP 1
@@ -46,7 +47,6 @@
 # include <windows.h>
 
 #else
-# include <cerrno>
 # include <csignal>
 # include <cstdlib>
 # ifdef HAVE_UNISTD_H
index d14ea24d7d24a3e34078fa440f66b9b3911d14c1..b9cee3289b50dfb883a751143ae606a0509ff072 100644 (file)
@@ -103,8 +103,8 @@ unsigned long do_crc(InputIterator first, InputIterator last)
 
 } // namespace
 
-#if HAVE_DECL_ISTREAMBUF_ITERATOR
 using std::ifstream;
+#if HAVE_DECL_ISTREAMBUF_ITERATOR
 using std::istreambuf_iterator;
 
 unsigned long lyx::support::sum(string const & file)
index 5d91b713bb8998e3b4b7225a8479321f321ad9ee..ddea3dd6047b977465e0c47ce36fc4432bddc9f8 100644 (file)
@@ -22,6 +22,9 @@
 #ifdef HAVE_UNISTD_H
 # include <unistd.h>
 #endif
+#ifdef HAVE_DIRECT_H
+# include <direct.h>
+#endif
 #ifdef _WIN32
 # include <windows.h>
 #endif
index 6810a5509fd2974aa8962ed1655d0a1c939ad60c..86bcd69582c748f6f266732b0dd205aabb7994b2 100644 (file)
 # include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath
 #endif
 
+#ifndef PATH_MAX
+# define PATH_MAX 256
+#endif
+
 using std::string;
 
 namespace fs = boost::filesystem;
index 54833b5b47d28b41dda8a588bcee8795fc9978ec..86f968d58b436bd237fde526b200c0a7061172a5 100644 (file)
@@ -54,6 +54,10 @@ int make_tempfile(char * templ)
        // This probably just barely works...
        ::mktemp(templ);
 # if defined (HAVE_OPEN)
+# if (!defined S_IRUSR)
+#   define S_IRUSR S_IREAD
+#   define S_IWUSR S_IWRITE
+# endif
        return ::open(templ, O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
 # elif defined (HAVE__OPEN)
        return ::_open(templ,