Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / native_client / src / shared / imc / posix / nacl_imc_posix.cc
index 3761253..6194c88 100644 (file)
@@ -18,7 +18,6 @@
 #include <fcntl.h>
 #include <limits.h>
 #include <stdio.h>
-#include <string.h>
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/types.h>
@@ -80,29 +79,6 @@ int NaClWouldBlock(void) {
   return errno == EAGAIN;
 }
 
-int NaClGetLastErrorString(char* buffer, size_t length) {
-#if NACL_LINUX && !NACL_ANDROID
-  char* message;
-  /*
-   * Note some Linux distributions provide only GNU version of strerror_r().
-   */
-  if (buffer == NULL || length == 0) {
-    errno = ERANGE;
-    return -1;
-  }
-  message = strerror_r(errno, buffer, length);
-  if (message != buffer) {
-    size_t message_bytes = strlen(message) + 1;
-    length = std::min(message_bytes, length);
-    memmove(buffer, message, length);
-    buffer[length - 1] = '\0';
-  }
-  return 0;
-#else
-  return strerror_r(errno, buffer, length);
-#endif
-}
-
 #if !NACL_ANDROID
 static Atomic32 memory_object_count = 0;