From 3c208ff1f520c7b749a005157391bea0d7e60b0f Mon Sep 17 00:00:00 2001 From: ishmal Date: Fri, 2 Mar 2007 16:46:19 +0000 Subject: [PATCH] fix result piping from shelled-out commands on win32 --- buildtool.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/buildtool.cpp b/buildtool.cpp index e2c28b4c0..5a53f745a 100644 --- a/buildtool.cpp +++ b/buildtool.cpp @@ -30,9 +30,14 @@ * btool * or * btool {target} + * + * Note: recent win32api builds from MinGW have gettimeofday() + * defined, so you might need to build with + * g++ -O3 -DHAVE_GETTIMEOFDAY buildtool.cpp -o btool.exe + * */ - +#define BUILDTOOL_VERSION "BuildTool v0.6.2, 2007 Bob Jamison" #include #include @@ -58,8 +63,9 @@ //######################################################################## //# Definition of gettimeofday() for those who don't have it //######################################################################## -#ifdef __WIN32__ +#ifndef HAVE_GETTIMEOFDAY #include + struct timezone { int tz_minuteswest; /* minutes west of Greenwich */ int tz_dsttime; /* type of dst correction */ @@ -82,6 +88,7 @@ static int gettimeofday (struct timeval *tv, struct timezone *tz) } return 0; } + #endif @@ -3478,7 +3485,11 @@ bool MakeBase::executeCommand(const String &command, for (unsigned int i=0 ; i 0) @@ -7521,7 +7532,7 @@ public: * */ virtual String version() - { return "BuildTool v0.6.1, 2006 Bob Jamison"; } + { return BUILDTOOL_VERSION; } /** * Overload a -- 2.30.2