[PATCH] D33171: Fix DynamicLibraryTest.cpp on FreeBSD
Kamil Rytarowski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 14 07:13:43 PDT 2017
krytarowski added inline comments.
================
Comment at: lib/Support/Unix/Path.inc:80
#include <sys/mount.h>
+#if defined(__FreeBSD__)
+#include <sys/sysctl.h>
----------------
`|| defined ( __NetBSD__)`
================
Comment at: lib/Support/Unix/Path.inc:114
namespace fs {
-#if defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
- defined(__OpenBSD__) || defined(__minix) || defined(__FreeBSD_kernel__) || \
- defined(__linux__) || defined(__CYGWIN__) || defined(__DragonFly__) || \
- defined(_AIX)
+#if defined (__NetBSD__) || defined(__Bitrig__) || defined(__OpenBSD__) || \
+ defined(__minix) || defined(__linux__) || defined(__CYGWIN__) || \
----------------
drop `defined (__NetBSD__)`
================
Comment at: lib/Support/Unix/Path.inc:169
}
-#endif // __FreeBSD__ || __NetBSD__ || __FreeBSD_kernel__
+#endif // NetBSD || _Bitrig || OpenBSD || minix || linux || CYGWIN || DragonFly || _AIX
----------------
drop `NetBSD || `
================
Comment at: lib/Support/Unix/Path.inc:185
}
-#elif defined(__FreeBSD__) || defined (__NetBSD__) || defined(__Bitrig__) || \
- defined(__OpenBSD__) || defined(__minix) || defined(__DragonFly__) || \
- defined(__FreeBSD_kernel__) || defined(_AIX)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ int mib[4];
----------------
`|| defined(__NetBSD__)`
================
Comment at: lib/Support/Unix/Path.inc:187
+ int mib[4];
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_PROC;
----------------
```
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
mib[0] = CTL_KERN;
mib[1] = KERN_PROC;
mib[2] = KERN_PROC_PATHNAME;
mib[3] = -1;
#else
mib[0] = CTL_KERN;
mib[1] = KERN_PROC_ARGS;
mib[2] = -1;
mib[3] = KERN_PROC_PATHNAME;
#endif
```
================
Comment at: lib/Support/Unix/Path.inc:195
+ return exe_path;
+#elif defined (__NetBSD__) || defined(__Bitrig__) || defined(__OpenBSD__) || \
+ defined(__minix) || defined(__DragonFly__) || defined(_AIX)
----------------
drop `defined (__NetBSD__)`
https://reviews.llvm.org/D33171
More information about the llvm-commits
mailing list