Skip to content

Commit

Permalink
[Windows] Fix getcwd() on Windows.
Browse files Browse the repository at this point in the history
Windows doesn't define getcwd(), so this test executable failed
to compile.

Patch by Adrian McCarthy
Differential Revision: http://reviews.llvm.org/D7962

llvm-svn: 230983
  • Loading branch information
Zachary Turner committed Mar 2, 2015
1 parent 136f4b3 commit 3cb611b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lldb/test/functionalities/process_launch/print_cwd.cpp
@@ -1,5 +1,13 @@
#include <stdio.h>

#ifdef _MSC_VER
#define _CRT_NONSTDC_NO_WARNINGS
#include <direct.h>
#undef getcwd
#define getcwd(buffer, length) _getcwd(buffer, length)
#else
#include <unistd.h>
#endif

int
main (int argc, char **argv)
Expand Down

0 comments on commit 3cb611b

Please sign in to comment.