@@ -84,6 +84,8 @@ PyInit_errno(void)
8484 * The names and comments are borrowed from linux/include/errno.h,
8585 * which should be pretty all-inclusive. However, the Solaris specific
8686 * names and comments are borrowed from sys/errno.h in Solaris.
87+ * MacOSX specific names and comments are borrowed from sys/errno.h in
88+ * MacOSX.
8789 */
8890
8991#ifdef ENODEV
@@ -848,6 +850,59 @@ PyInit_errno(void)
848850 inscode (d , ds , de , "ENOTACTIVE" , ENOTACTIVE , "Facility is not active" );
849851#endif
850852
853+ /* MacOSX specific errnos */
854+ #ifdef EAUTH
855+ inscode (d , ds , de , "EAUTH" , EAUTH , "Authentication error" );
856+ #endif
857+ #ifdef EBADARCH
858+ inscode (d , ds , de , "EBADARCH" , EBADARCH , "Bad CPU type in executable" );
859+ #endif
860+ #ifdef EBADEXEC
861+ inscode (d , ds , de , "EBADEXEC" , EBADEXEC , "Bad executable (or shared library)" );
862+ #endif
863+ #ifdef EBADMACHO
864+ inscode (d , ds , de , "EBADMACHO" , EBADMACHO , "Malformed Mach-o file" );
865+ #endif
866+ #ifdef EBADRPC
867+ inscode (d , ds , de , "EBADRPC" , EBADRPC , "RPC struct is bad" );
868+ #endif
869+ #ifdef EDEVERR
870+ inscode (d , ds , de , "EDEVERR" , EDEVERR , "Device error" );
871+ #endif
872+ #ifdef EFTYPE
873+ inscode (d , ds , de , "EFTYPE" , EFTYPE , "Inappropriate file type or format" );
874+ #endif
875+ #ifdef ENEEDAUTH
876+ inscode (d , ds , de , "ENEEDAUTH" , ENEEDAUTH , "Need authenticator" );
877+ #endif
878+ #ifdef ENOATTR
879+ inscode (d , ds , de , "ENOATTR" , ENOATTR , "Attribute not found" );
880+ #endif
881+ #ifdef ENOPOLICY
882+ inscode (d , ds , de , "ENOPOLICY" , ENOPOLICY , "Policy not found" );
883+ #endif
884+ #ifdef EPROCLIM
885+ inscode (d , ds , de , "EPROCLIM" , EPROCLIM , "Too many processes" );
886+ #endif
887+ #ifdef EPROCUNAVAIL
888+ inscode (d , ds , de , "EPROCUNAVAIL" , EPROCUNAVAIL , "Bad procedure for program" );
889+ #endif
890+ #ifdef EPROGMISMATCH
891+ inscode (d , ds , de , "EPROGMISMATCH" , EPROGMISMATCH , "Program version wrong" );
892+ #endif
893+ #ifdef EPROGUNAVAIL
894+ inscode (d , ds , de , "EPROGUNAVAIL" , EPROGUNAVAIL , "RPC prog. not avail" );
895+ #endif
896+ #ifdef EPWROFF
897+ inscode (d , ds , de , "EPWROFF" , EPWROFF , "Device power is off" );
898+ #endif
899+ #ifdef ERPCMISMATCH
900+ inscode (d , ds , de , "ERPCMISMATCH" , ERPCMISMATCH , "RPC version wrong" );
901+ #endif
902+ #ifdef ESHLIBVERS
903+ inscode (d , ds , de , "ESHLIBVERS" , ESHLIBVERS , "Shared library version mismatch" );
904+ #endif
905+
851906 Py_DECREF (de );
852907 return m ;
853908}
0 commit comments