MSVC build fixes.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9851 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Angus Leeming 2005-04-21 21:05:05 +00:00
parent ce286c29ba
commit df0c18d835
3 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2005-04-21 Angus Leeming <leeming@lyx.org>
* forkedcall.h: define pid_t for MSVC.
* forkedcall.C (kill): work around evil MSVC max macro.
2005-04-21 Angus Leeming <leeming@lyx.org>
* forkedcontr.C: add #include <csignal>.

View File

@ -180,7 +180,9 @@ void ForkedProcess::kill(int tol)
return;
}
int const tolerance = std::max(0, tol);
// The weird (std::max)(a,b) signature prevents expansion
// of an evil MSVC macro.
int const tolerance = (std::max)(0, tol);
if (tolerance == 0) {
// Kill it dead NOW!
Murder::killItDead(0, pid());

View File

@ -31,6 +31,11 @@
#include <sys/types.h>
// pid_t isn't defined by the stdlibs that ship with MSVC.
#if defined (_WIN32) && defined(_MSC_VER)
typedef int pid_t;
#endif
namespace lyx {
namespace support {