mirror of
https://github.com/reactos/reactos.git
synced 2025-07-25 14:33:49 +00:00
compatibility fixes
svn path=/branches/xmlbuildsystem/; revision=13401
This commit is contained in:
parent
cb6d12288b
commit
2212e07d3e
5 changed files with 23 additions and 19 deletions
|
@ -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 @@ Path::RelativeFromWorkingDirectory ( const string& path )
|
|||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue