aboutsummaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp')
-rw-r--r--packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp b/packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp
new file mode 100644
index 000000000000..b4b073fbcb8d
--- /dev/null
+++ b/packages/Python/lldbsuite/test/functionalities/process_launch/print_cwd.cpp
@@ -0,0 +1,21 @@
+#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)
+{
+ char buffer[1024];
+
+ fprintf(stdout, "stdout: %s\n", getcwd(buffer, 1024));
+ fprintf(stderr, "stderr: %s\n", getcwd(buffer, 1024));
+
+ return 0;
+}