diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2010-12-17 16:07:40 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2010-12-17 16:07:40 (GMT) |
commit | a4a5e375685adcfe765c45be086706720a96dbea (patch) | |
tree | eca75620e8ced57b1b810fdf8abf9eeea5d4ea29 /Tests | |
parent | cfe53cddbde124864ffb0500475bc1c1cbd3ddbc (diff) | |
download | CMake-a4a5e375685adcfe765c45be086706720a96dbea.zip CMake-a4a5e375685adcfe765c45be086706720a96dbea.tar.gz CMake-a4a5e375685adcfe765c45be086706720a96dbea.tar.bz2 |
Use iostream to make Borland happy
It seems as though cstdio doesn't bring in stdio.h with the Borland
compilers.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/TestsWorkingDirectory/main.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Tests/TestsWorkingDirectory/main.cxx b/Tests/TestsWorkingDirectory/main.cxx index 6a3a6be..42c3d34 100644 --- a/Tests/TestsWorkingDirectory/main.cxx +++ b/Tests/TestsWorkingDirectory/main.cxx @@ -1,8 +1,9 @@ -#include <cstdio> #include <cstdlib> #include <cstring> #include <ctype.h> +#include <iostream> + #if defined(_WIN32) && (defined(_MSC_VER) || defined(__WATCOMC__) || defined(__BORLANDC__) || defined(__MINGW32__)) #include <io.h> @@ -18,7 +19,7 @@ inline const char* Getcwd(char* buf, unsigned int len) const char* ret = _getcwd(buf, len); if(!ret) { - fprintf(stderr, "No current working directory.\n"); + std::cerr << "No current working directory." << std::endl; abort(); } // make sure the drive letter is capital @@ -46,7 +47,7 @@ inline const char* Getcwd(char* buf, unsigned int len) const char* ret = getcwd(buf, len); if(!ret) { - fprintf(stderr, "No current working directory\n"); + std::cerr << "No current working directory" << std::endl; abort(); } return ret; @@ -59,7 +60,7 @@ int main(int argc, char *argv[]) char buf[2048]; const char *cwd = Getcwd(buf, sizeof(buf)); - fprintf(stdout, "Working directory: -->%s<--", cwd); + std::cout << "Working directory: -->" << cwd << "<--"; return 0; } |