]> granicus.if.org Git - python/commitdiff
Issue #5737: Add Solaris-specific mnemonics in the errno module. Patch by
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Aug 2010 21:05:19 +0000 (21:05 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 18 Aug 2010 21:05:19 +0000 (21:05 +0000)
Matthew Ahrens.

Misc/ACKS
Misc/NEWS
Modules/errnomodule.c

index 45cd1b70cdbb2fa49cfccda04c45233b0890b4bd..4ad93a3a88753b503dbefe48b39009c0299b4360 100644 (file)
--- a/Misc/ACKS
+++ b/Misc/ACKS
@@ -14,6 +14,7 @@ and the list is in rough alphabetical order by last names.
 David Abrahams
 Jim Ahlstrom
 Farhan Ahmad
+Matthew Ahrens
 Nir Aides
 Yaniv Aknin
 Jyrki Alakuijala
index fe2080fd5b0259e9aa6eca68a3c99f5724083f42..1e7acc6254d69807c36c041e642b8c8938b61909 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -63,6 +63,9 @@ Core and Builtins
 Extensions
 ----------
 
+- Issue #5737: Add Solaris-specific mnemonics in the errno module.  Patch by
+  Matthew Ahrens.
+
 - Restore GIL in nis_cat in case of error.
 
 - Issue #665761: ``functools.reduce()`` will no longer mask exceptions
index 03c65f796d739e2b6d8175be354bca2ac16a1308..19b8bd5bc7883849ec73f6b8e92ab18deb367651 100644 (file)
@@ -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;
 }