Bo Peng wrote: >> HAVE_DECL_ISTREAMBUF_ITERATOR > > I have this macro defined. If my test works right, then msvc does not > have it. This piece of code is supposed to fix this so fixing it again > in config.h does not sound right. >
MSVC has it, the test should not fail with msvc. >> > # include <windows.h> >> > +# include <cerrno> >> > >> Seems msvc haven't defined a macro, here my patch: >> >> +# ifndef ESRCH >> +# define ESRCH 3 >> +# endif > > Hard-coding the value of ESRCH does not look right. If cerrno exists, > we should include it. I guess I can do a HAVE_CERRNO test and fix this > problem. > Yes, including cerror is better. >> You could fix this in config.h, don't use mkdir bit _mkdir: >> >> #ifdef _WIN32 >> #undef HAVE_MKDIR // use _mkdir instead >> #endif >> #ifdef _MSC_VER >> #undef HAVE_OPEN // use _open instead >> #endif > > This looks fine. > >> >> isn't config.h the better place? >> >> #ifdef _MSC_VER >> #define PATH_MAX 512 >> #endif > > So msvc does not define this at all? I haven't tried to include the correct header with the posix ifdef. > >> I've not compiled intl, what's the functionality of intl? > > intl directory has a copy of gettext library, it is used when nls=yes > and gettext=included. It needs more macro definitions than lyx itself, > and is tricky to compile right. There is supposed to be a > Makefile.msvc so that I can follow, but my msvc just can not compile > that piece of code. > > Cheers, > Bo > >