[Lldb-commits] [lldb] r254944 - getwd(3) with NULL pointer extension is supported on NetBSD
Kamil Rytarowski via lldb-commits
lldb-commits at lists.llvm.org
Mon Dec 7 13:21:12 PST 2015
Author: kamil
Date: Mon Dec 7 15:21:12 2015
New Revision: 254944
URL: http://llvm.org/viewvc/llvm-project?rev=254944&view=rev
Log:
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
Modified:
lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/common.h
Modified: lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/common.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/common.h?rev=254944&r1=254943&r2=254944&view=diff
==============================================================================
--- lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/common.h (original)
+++ lldb/trunk/packages/Python/lldbsuite/test/api/multithreaded/common.h Mon Dec 7 15:21:12 2015
@@ -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();
More information about the lldb-commits
mailing list