Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / src / trusted / service_runtime / include / sys / errno.h
index 990a1c3..6f1f227 100644 (file)
@@ -8,16 +8,16 @@
  * NaCl Service Runtime API.
  */
 
-#ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_BITS_ERRNO_H_
-#define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_BITS_ERRNO_H_
+#ifndef NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_SYS_ERRNO_H_
+#define NATIVE_CLIENT_SRC_TRUSTED_SERVICE_RUNTIME_INCLUDE_SYS_ERRNO_H_
+
+#if defined(NACL_IN_TOOLCHAIN_HEADERS)
+#include <sys/reent.h>
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-#ifdef __native_client__
-#include <sys/reent.h>
-
 #ifndef _REENT_ONLY
 #define errno (*__errno())
   extern int *__errno _PARAMS ((void));
@@ -29,15 +29,20 @@ extern __IMPORT _CONST char * _CONST _sys_errlist[];
 extern __IMPORT int _sys_nerr;
 
 #define __errno_r(ptr) ((ptr)->_errno)
-#endif  /* __native_client__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif  /* defined(NACL_IN_TOOLCHAIN_HEADERS) */
 
 /*
  * NOTE: when adding new errnos here, check
- * service_runtime/nacl_host_desc_common.[hc] and
- * service_runtime/win/xlate_system_error.h.
+ * service_runtime/nacl_host_desc_common.c and
+ * service_runtime/win/xlate_system_error.c.
  */
 
-/* 
+/*
  * The errno values below 2048 here are the same as Linux's errno
  * values.  See Linux's asm-generic/errno-base.h and
  * asm-generic/errno.h.
@@ -167,6 +172,8 @@ extern __IMPORT int _sys_nerr;
 #define NACL_ABI_ENOTSUP NACL_ABI_EOPNOTSUPP   /* Not supported */
 #define NACL_ABI_ENOMEDIUM 123   /* No medium (in tape drive) */
 #define NACL_ABI_ECANCELED 125 /* Operation canceled. */
+#define NACL_ABI_EOWNERDEAD 130 /* Owner died */
+#define NACL_ABI_ENOTRECOVERABLE 131 /* State not recoverable */
 
 
 /*
@@ -186,8 +193,4 @@ extern __IMPORT int _sys_nerr;
 /* From cygwin32.  */
 #define NACL_ABI_EWOULDBLOCK NACL_ABI_EAGAIN      /* Operation would block */
 
-#ifdef __cplusplus
-}
-#endif
-
 #endif