[PATCH] D17676: Add some minimal portability code paths for PS4.

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 2 14:10:25 PST 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL262527: Add some minimal portability code paths for PS4. (authored by silvas).

Changed prior to commit:
  http://reviews.llvm.org/D17676?vs=49402&id=49666#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D17676

Files:
  compiler-rt/trunk/lib/profile/InstrProfilingPort.h
  compiler-rt/trunk/lib/profile/InstrProfilingUtil.h

Index: compiler-rt/trunk/lib/profile/InstrProfilingPort.h
===================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingPort.h
+++ compiler-rt/trunk/lib/profile/InstrProfilingPort.h
@@ -25,6 +25,8 @@
 #define COMPILER_RT_MAX_HOSTLEN 128
 #ifdef _MSC_VER
 #define COMPILER_RT_GETHOSTNAME(Name, Len) gethostname(Name, Len)
+#elif defined(__PS4__)
+#define COMPILER_RT_GETHOSTNAME(Name, Len) (-1)
 #else
 #define COMPILER_RT_GETHOSTNAME(Name, Len) GetHostName(Name, Len)
 #define COMPILER_RT_HAS_UNAME 1
Index: compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
===================================================================
--- compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
+++ compiler-rt/trunk/lib/profile/InstrProfilingUtil.h
@@ -10,7 +10,14 @@
 #ifndef PROFILE_INSTRPROFILINGUTIL_H
 #define PROFILE_INSTRPROFILINGUTIL_H
 
+#include <stddef.h>
+
 /*! \brief Create a directory tree. */
 void __llvm_profile_recursive_mkdir(char *Pathname);
 
+/* PS4 doesn't have getenv. Define a shim. */
+#if __PS4__
+static inline char *getenv(const char *name) { return NULL; }
+#endif /* #if __PS4__ */
+
 #endif  /* PROFILE_INSTRPROFILINGUTIL_H */


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D17676.49666.patch
Type: text/x-patch
Size: 1202 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160302/55cd6d8d/attachment.bin>


More information about the llvm-commits mailing list