diff options
author | Benoit Foucher <benoit@zeroc.com> | 2002-10-29 17:55:00 +0000 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2002-10-29 17:55:00 +0000 |
commit | c214064a84ab2d988c086fc9da9c2e03d4c06c62 (patch) | |
tree | bbfd2d16ac9f70434a4a8cb683199d13e87ce67c /cpp/src/Slice/Preprocessor.cpp | |
parent | Fixed the translators to use the icecpp C preprocessor. (diff) | |
download | ice-c214064a84ab2d988c086fc9da9c2e03d4c06c62.tar.bz2 ice-c214064a84ab2d988c086fc9da9c2e03d4c06c62.tar.xz ice-c214064a84ab2d988c086fc9da9c2e03d4c06c62.zip |
Windows fixes
Diffstat (limited to 'cpp/src/Slice/Preprocessor.cpp')
-rw-r--r-- | cpp/src/Slice/Preprocessor.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index 532ed8be9d6..c73765164a1 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -171,18 +171,26 @@ Slice::Preprocessor::checkInputFile() string Slice::Preprocessor::searchIceCpp() { +#ifndef WIN32 const char* icecpp = "icecpp"; +#else + const char* icecpp = "icecpp.exe"; +#endif string::size_type pos = _path.find_last_of("/\\"); if(pos != string::npos) { string path = _path.substr(0, pos + 1); path += icecpp; - + struct stat st; if(stat(path.c_str(), &st) == 0) { +#ifndef WIN32 if(st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) +#else + if(st.st_mode & (S_IEXEC)) +#endif { return path; } |