aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/util.cpp
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2010-02-15 12:30:05 +0000
committermarha <marha@users.sourceforge.net>2010-02-15 12:30:05 +0000
commit5a30da03ddafd49caf68942f7ddf021bd898ef6d (patch)
tree11925152a0ca608d0c07ee5514b1c1f15e6a8ac7 /tools/mhmake/src/util.cpp
parent266b3ab4e449ba783abadd6d5ffc5397d42a6069 (diff)
downloadvcxsrv-5a30da03ddafd49caf68942f7ddf021bd898ef6d.tar.gz
vcxsrv-5a30da03ddafd49caf68942f7ddf021bd898ef6d.tar.bz2
vcxsrv-5a30da03ddafd49caf68942f7ddf021bd898ef6d.zip
linux: solved problem running svn info when the mhmakeconf points to a symbolic link
autodep scanning: # include may contain spaces
Diffstat (limited to 'tools/mhmake/src/util.cpp')
-rw-r--r--tools/mhmake/src/util.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/mhmake/src/util.cpp b/tools/mhmake/src/util.cpp
index 9fc03ddad..a6ce9e8bf 100644
--- a/tools/mhmake/src/util.cpp
+++ b/tools/mhmake/src/util.cpp
@@ -276,7 +276,21 @@ loadedmakefile::loadedmakefile_statics::loadedmakefile_statics()
try
{
string SvnCommand=SearchCommand("svn",EXEEXT);
+ #ifdef WIN32
Ret=OsExeCommand(SvnCommand,string(" info ")+m_MhMakeConf->GetQuotedFullFileName(),false,&Output);
+ #else
+ struct stat Stat;
+ lstat(m_MhMakeConf->GetFullFileName().c_str(),&Stat);
+ if (S_ISLNK(Stat.st_mode))
+ {
+ char FileName[1024];
+ int len=readlink(m_MhMakeConf->GetFullFileName().c_str(),FileName,sizeof(FileName));
+ FileName[len]=0;
+ Ret=OsExeCommand(SvnCommand,string(" info ")+GetFileInfo(FileName,m_MhMakeConf->GetDir())->GetQuotedFullFileName(),false,&Output);
+ }
+ else
+ Ret=OsExeCommand(SvnCommand,string(" info ")+m_MhMakeConf->GetQuotedFullFileName(),false,&Output);
+ #endif
}
catch (string Message)
{