]> granicus.if.org Git - python/commitdiff
all_ins(): EX_OK and friends, constants from sysexits.h
authorBarry Warsaw <barry@python.org>
Tue, 7 Jan 2003 20:57:09 +0000 (20:57 +0000)
committerBarry Warsaw <barry@python.org>
Tue, 7 Jan 2003 20:57:09 +0000 (20:57 +0000)
Modules/posixmodule.c

index cce801125dd91972d7fb6c0ff9e0f9b2e6ecb157..f1d5117150a90a4176c6d4af432e77e127af01ab 100644 (file)
@@ -88,6 +88,10 @@ corresponding Unix manual entries for more information on calls.");
 #include <grp.h>
 #endif
 
+#ifdef HAVE_SYSEXITS_H
+#include <sysexits.h>
+#endif /* HAVE_SYSEXITS_H */
+
 /* Various compilers have only certain posix functions */
 /* XXX Gosh I wish these were all moved into pyconfig.h */
 #if defined(PYCC_VACPP) && defined(PYOS_OS2)
@@ -7651,6 +7655,59 @@ all_ins(PyObject *d)
         if (ins(d, "O_NOFOLLOW", (long)O_NOFOLLOW)) return -1;
 #endif
 
+       /* These come from sysexits.h */
+#ifdef EX_OK
+       if (ins(d, "EX_OK", (long)EX_OK)) return -1;
+#endif EX_OK
+#ifdef EX_USAGE
+       if (ins(d, "EX_USAGE", (long)EX_USAGE)) return -1;
+#endif EX_USAGE
+#ifdef EX_DATAERR
+       if (ins(d, "EX_DATAERR", (long)EX_DATAERR)) return -1;
+#endif EX_DATAERR
+#ifdef EX_NOINPUT
+       if (ins(d, "EX_NOINPUT", (long)EX_NOINPUT)) return -1;
+#endif EX_NOINPUT
+#ifdef EX_NOUSER
+       if (ins(d, "EX_NOUSER", (long)EX_NOUSER)) return -1;
+#endif EX_NOUSER
+#ifdef EX_NOHOST
+       if (ins(d, "EX_NOHOST", (long)EX_NOHOST)) return -1;
+#endif EX_NOHOST
+#ifdef EX_UNAVAILABLE
+       if (ins(d, "EX_UNAVAILABLE", (long)EX_UNAVAILABLE)) return -1;
+#endif EX_UNAVAILABLE
+#ifdef EX_SOFTWARE
+       if (ins(d, "EX_SOFTWARE", (long)EX_SOFTWARE)) return -1;
+#endif EX_SOFTWARE
+#ifdef EX_OSERR
+       if (ins(d, "EX_OSERR", (long)EX_OSERR)) return -1;
+#endif EX_OSERR
+#ifdef EX_OSFILE
+       if (ins(d, "EX_OSFILE", (long)EX_OSFILE)) return -1;
+#endif EX_OSFILE
+#ifdef EX_CANTCREAT
+       if (ins(d, "EX_CANTCREAT", (long)EX_CANTCREAT)) return -1;
+#endif EX_CANTCREAT
+#ifdef EX_IOERR
+       if (ins(d, "EX_IOERR", (long)EX_IOERR)) return -1;
+#endif EX_IOERR
+#ifdef EX_TEMPFAIL
+       if (ins(d, "EX_TEMPFAIL", (long)EX_TEMPFAIL)) return -1;
+#endif EX_TEMPFAIL
+#ifdef EX_PROTOCOL
+       if (ins(d, "EX_PROTOCOL", (long)EX_PROTOCOL)) return -1;
+#endif EX_PROTOCOL
+#ifdef EX_NOPERM
+       if (ins(d, "EX_NOPERM", (long)EX_NOPERM)) return -1;
+#endif EX_NOPERM
+#ifdef EX_CONFIG
+       if (ins(d, "EX_CONFIG", (long)EX_CONFIG)) return -1;
+#endif EX_CONFIG
+#ifdef EX_NOTFOUND
+       if (ins(d, "EX_NOTFOUND", (long)EX_NOTFOUND)) return -1;
+#endif EX_NOTFOUND
+
 #ifdef HAVE_SPAWNV
 #if defined(PYOS_OS2) && defined(PYCC_GCC)
        if (ins(d, "P_WAIT", (long)P_WAIT)) return -1;