Some MSVC2003/2005 compatibility fixes, from Bo Peng (ben.bob@gmail.com)

* 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
This commit is contained in:
Bo Peng 2006-05-29 14:56:08 +00:00
parent 28fa2c0efa
commit a21c78f25b
6 changed files with 15 additions and 2 deletions

View 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();
}

View 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

View 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)

View 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

View File

@ -44,6 +44,10 @@
# include <CoreServices/CoreServices.h> // FSFindFolder, FSRefMakePath
#endif
#ifndef PATH_MAX
# define PATH_MAX 256
#endif
using std::string;
namespace fs = boost::filesystem;

View 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,