Bo Peng wrote: > Index: src/support/lyxsum.C > =================================================================== > --- src/support/lyxsum.C (revision 13941) > +++ src/support/lyxsum.C (working copy) > @@ -122,6 +122,7 @@ > } > #else > > +using std::ifstream; > using std::istream_iterator; > using std::ios; > >
I think you could fix this by the configure process: Test code: #include <streambuf> #include <istream> typedef std::istreambuf_iterator<char> type; int main(){return 0;} macro: HAVE_DECL_ISTREAMBUF_ITERATOR > This looks necessary. Can I add this, JMarc? > > > Index: src/support/forkedcall.C > =================================================================== > --- src/support/forkedcall.C (revision 13941) > +++ src/support/forkedcall.C (working copy) > @@ -44,6 +44,7 @@ > # define SIGKILL 9 > # include <process.h> > # include <windows.h> > +# include <cerrno> > > #else > # include <cerrno> > > > This is needed for error code, I do not know why mingw does not need > this. Is it safe to move cerrno out of the ifdef? > > Seems msvc haven't defined a macro, here my patch: +# ifndef ESRCH +# define ESRCH 3 +# endif > Index: src/support/mkdir.C > =================================================================== > --- src/support/mkdir.C (revision 13941) > +++ src/support/mkdir.C (working copy) > @@ -24,6 +24,7 @@ > #endif > #ifdef _WIN32 > # include <windows.h> > +# include <direct.h> > #endif > > int lyx::support::mkdir(std::string const & pathname, unsigned long int > mode) > Index: src/support/tempname.C > > > Under windows, mkdir is in direct.h. I guess this is needed. You could fix this in config.h, don't use mkdir bit _mkdir: #ifdef _WIN32 #undef HAVE_MKDIR // use _mkdir instead #endif > > > =================================================================== > --- src/support/tempname.C (revision 13941) > +++ src/support/tempname.C (working copy) > @@ -38,6 +38,11 @@ > # endif > #endif > > +#if (!defined S_IRUSR) > + #define S_IRUSR S_IREAD > + #define S_IWUSR S_IWRITE > +#endif > + > using boost::scoped_array; > > using std::string; > > > I need expert opinions here. Where can I get S_IRUSR under msvc? lyx > was compiled with msvc before so I guess I need to do something in > SConstruct. > > Also here, you could fix this by config.h. #ifdef _MSC_VER #undef HAVE_OPEN // use _open instead #endif > Index: src/support/package.C.in > =================================================================== > --- src/support/package.C.in (revision 13941) > +++ src/support/package.C.in (working copy) > @@ -26,7 +26,11 @@ > > #if defined (USE_WINDOWS_PACKAGING) > # include "support/os_win32.h" > +// PATH_MAX is not defined? (msvc) > +#ifndef PATH_MAX > +#define PATH_MAX 512 > #endif > +#endif > > #include <boost/filesystem/operations.hpp> > #include <boost/tuple/tuple.hpp> > > > I can not find PATH_MAX but this thing should be there somewhere. Can > anyone help? > > isn't config.h the better place? #ifdef _MSC_VER #define PATH_MAX 512 #endif > At least, I can not build included intl with msvc. Peter, do you know > the command line options and needed macros? My attempt stops at > gettextP.c > I've not compiled intl, what's the functionality of intl? Peter