From 1f1a15332b99bfaf2c6ae0fa702762a15b840d17 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Mon, 7 Dec 2015 21:21:12 +0000 Subject: getwd(3) with NULL pointer extension is supported on NetBSD Summary: The getwd() and getcwd() functions conform to IEEE Std 1003.1-1990 (POSIX.1). The IEEE Std 1003.1-2004 (POSIX.1) revision marked getwd() as legacy and recommended the use of getcwd() instead. The IEEE Std 1003.1-2008 (``POSIX.1'') revision removed getwd() from the specification. The ability to specify a NULL pointer and have getcwd() allocate memory as necessary is an extension. The getwd() function appeared in 4.0BSD. Reviewers: emaste, tfiala, clayborg Subscribers: lldb-commits, joerg Differential Revision: http://reviews.llvm.org/D15260 llvm-svn: 254944 --- lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h') diff --git a/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h b/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h index a943f28e731..dad8bba07a3 100644 --- a/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h +++ b/lldb/packages/Python/lldbsuite/test/api/multithreaded/common.h @@ -56,9 +56,9 @@ public: } }; -/// Allocates a char buffer with the current working directory on Linux/Darwin +/// Allocates a char buffer with the current working directory inline char* get_working_dir() { -#if defined(__APPLE__) || defined(__FreeBSD__) +#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) return getwd(0); #else return get_current_dir_name(); -- cgit v1.2.3