summaryrefslogtreecommitdiffstats
path: root/Modules/errnomodule.c
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2010-08-18 21:05:19 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2010-08-18 21:05:19 (GMT)
commitb85e165635889d9d736b7082c0e486217f2ca821 (patch)
treee3bc29f2ea73e15f461e6bb03ad60ea5c168a096 /Modules/errnomodule.c
parent324ac65cebf4b0141b946452a2604715f1ca7010 (diff)
downloadcpython-b85e165635889d9d736b7082c0e486217f2ca821.zip
cpython-b85e165635889d9d736b7082c0e486217f2ca821.tar.gz
cpython-b85e165635889d9d736b7082c0e486217f2ca821.tar.bz2
Issue #5737: Add Solaris-specific mnemonics in the errno module. Patch by
Matthew Ahrens.
Diffstat (limited to 'Modules/errnomodule.c')
-rw-r--r--Modules/errnomodule.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/Modules/errnomodule.c b/Modules/errnomodule.c
index 03c65f7..19b8bd5 100644
--- a/Modules/errnomodule.c
+++ b/Modules/errnomodule.c
@@ -82,7 +82,8 @@ PyInit_errno(void)
/*
* The names and comments are borrowed from linux/include/errno.h,
- * which should be pretty all-inclusive
+ * which should be pretty all-inclusive. However, the Solaris specific
+ * names and comments are borrowed from sys/errno.h in Solaris.
*/
#ifdef ENODEV
@@ -797,6 +798,26 @@ PyInit_errno(void)
inscode(d, ds, de, "WSAN", WSAN, "Error WSAN");
#endif
+ /* Solaris-specific errnos */
+#ifdef ECANCELED
+ inscode(d, ds, de, "ECANCELED", ECANCELED, "Operation canceled");
+#endif
+#ifdef ENOTSUP
+ inscode(d, ds, de, "ENOTSUP", ENOTSUP, "Operation not supported");
+#endif
+#ifdef EOWNERDEAD
+ inscode(d, ds, de, "EOWNERDEAD", EOWNERDEAD, "Process died with the lock");
+#endif
+#ifdef ENOTRECOVERABLE
+ inscode(d, ds, de, "ENOTRECOVERABLE", ENOTRECOVERABLE, "Lock is not recoverable");
+#endif
+#ifdef ELOCKUNMAPPED
+ inscode(d, ds, de, "ELOCKUNMAPPED", ELOCKUNMAPPED, "Locked lock was unmapped");
+#endif
+#ifdef ENOTACTIVE
+ inscode(d, ds, de, "ENOTACTIVE", ENOTACTIVE, "Facility is not active");
+#endif
+
Py_DECREF(de);
return m;
}