@@ -82,7 +82,8 @@ PyInit_errno(void)
8282
8383 /*
8484 * The names and comments are borrowed from linux/include/errno.h,
85- * which should be pretty all-inclusive
85+ * which should be pretty all-inclusive. However, the Solaris specific
86+ * names and comments are borrowed from sys/errno.h in Solaris.
8687 */
8788
8889#ifdef ENODEV
@@ -797,6 +798,26 @@ PyInit_errno(void)
797798 inscode (d , ds , de , "WSAN" , WSAN , "Error WSAN" );
798799#endif
799800
801+ /* Solaris-specific errnos */
802+ #ifdef ECANCELED
803+ inscode (d , ds , de , "ECANCELED" , ECANCELED , "Operation canceled" );
804+ #endif
805+ #ifdef ENOTSUP
806+ inscode (d , ds , de , "ENOTSUP" , ENOTSUP , "Operation not supported" );
807+ #endif
808+ #ifdef EOWNERDEAD
809+ inscode (d , ds , de , "EOWNERDEAD" , EOWNERDEAD , "Process died with the lock" );
810+ #endif
811+ #ifdef ENOTRECOVERABLE
812+ inscode (d , ds , de , "ENOTRECOVERABLE" , ENOTRECOVERABLE , "Lock is not recoverable" );
813+ #endif
814+ #ifdef ELOCKUNMAPPED
815+ inscode (d , ds , de , "ELOCKUNMAPPED" , ELOCKUNMAPPED , "Locked lock was unmapped" );
816+ #endif
817+ #ifdef ENOTACTIVE
818+ inscode (d , ds , de , "ENOTACTIVE" , ENOTACTIVE , "Facility is not active" );
819+ #endif
820+
800821 Py_DECREF (de );
801822 return m ;
802823}
0 commit comments