compatibility fixes Modified: branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/pch.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/functiontest.cpp Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp 2005-02-03 22:01:00 UTC (rev 13400) +++ branches/xmlbuildsystem/reactos/tools/rbuild/XML.cpp 2005-02-03 23:54:02 UTC (rev 13401) @@ -2,12 +2,16 @@
#include "pch.h"
+#ifdef _MSC_VER +#define MAX_PATH _MAX_PATH +#endif + #ifdef WIN32 -#include <direct.h> -#include <io.h> +# include <direct.h> +# include <io.h> #else -#include <sys/stat.h> -#define _MAX_PATH 255 +# include <sys/stat.h> +# define MAX_PATH PATH_MAX #endif #include <assert.h>
@@ -180,16 +184,10 @@ vout.push_back ( vpath[i++] );
// now merge vout into a string again - string out; + string out = "."; for ( i = 0; i < vout.size(); i++ ) { - // this squirreliness is b/c win32 has drive letters and *nix doesn't... -#ifdef WIN32 - if ( i ) out += "/"; -#else - out += out.size() ? "/" : "./"; -#endif - out += vout[i]; + out += "/" + vout[i]; } return out; } _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/pch.h --- branches/xmlbuildsystem/reactos/tools/rbuild/pch.h 2005-02-03 22:01:00 UTC (rev 13400) +++ branches/xmlbuildsystem/reactos/tools/rbuild/pch.h 2005-02-03 23:54:02 UTC (rev 13401) @@ -14,6 +14,10 @@
#include <stdarg.h>
+#ifdef _MSC_VER +#define MAX_PATH _MAX_PATH +#endif + #ifndef WIN32 #include <wctype.h> #include <math.h> _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h --- branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-02-03 22:01:00 UTC (rev 13400) +++ branches/xmlbuildsystem/reactos/tools/rbuild/rbuild.h 2005-02-03 23:54:02 UTC (rev 13401) @@ -6,12 +6,14 @@
#ifdef WIN32 #include <direct.h> #include <io.h> -#else -#define _MAX_PATH 255 #endif #include <sys/stat.h> #include <time.h> +#ifdef _MSC_VER +#include <sys/utime.h> +#else #include <utime.h> +#endif
#include "ssprintf.h" #include "exception.h" _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/functiontest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/functiontest.cpp 2005-02-03 22:01:00 UTC (rev 13400) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/functiontest.cpp 2005-02-03 23:54:02 UTC (rev 13401) @@ -5,5 +5,5 @@
void FunctionTest::Run () { string fixedupFilename = FixupTargetFilename ( "." SSEP "dir1" SSEP "dir2" SSEP ".." SSEP "filename.txt" ); - ARE_EQUAL ( "$(ROS_INTERMEDIATE)dir1" SSEP "filename.txt", fixedupFilename ); + ARE_EQUAL ( "$(ROS_INTERMEDIATE)." SSEP "dir1" SSEP "filename.txt", fixedupFilename ); } _____
Modified: branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp --- branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp 2005-02-03 22:01:00 UTC (rev 13400) +++ branches/xmlbuildsystem/reactos/tools/rbuild/tests/sourcefiletest.cpp 2005-02-03 23:54:02 UTC (rev 13401) @@ -38,9 +38,9 @@
AutomaticDependency automaticDependency ( project ); automaticDependency.Process (); ARE_EQUAL( 4, automaticDependency.sourcefile_map.size () ); - const SourceFile* include = automaticDependency.RetrieveFromCache ( "tests" SSEP "data" SSEP "sourcefile_include.h" ); + const SourceFile* include = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile_include.h" ); IS_NOT_NULL( include ); - const SourceFile* includenext = automaticDependency.RetrieveFromCache ( "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" ); + const SourceFile* includenext = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1" SSEP "sourcefile_includenext.h" ); IS_NOT_NULL( includenext ); }
@@ -51,9 +51,9 @@ AutomaticDependency automaticDependency ( project ); automaticDependency.Process (); ARE_EQUAL( 5, automaticDependency.sourcefile_map.size () ); - const SourceFile* header1 = automaticDependency.RetrieveFromCache ( "tests" SSEP "data" SSEP "sourcefile1_header1.h" ); + const SourceFile* header1 = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1_header1.h" ); IS_NOT_NULL( header1 ); - const SourceFile* recurse = automaticDependency.RetrieveFromCache ( "tests" SSEP "data" SSEP "sourcefile1_recurse.h" ); + const SourceFile* recurse = automaticDependency.RetrieveFromCache ( "." SSEP "tests" SSEP "data" SSEP "sourcefile1_recurse.h" ); IS_NOT_NULL( recurse ); IS_TRUE( IsParentOf ( header1, recurse ) );