summaryrefslogtreecommitdiffstats
path: root/Modules/posixmodule.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-01-07 20:57:09 (GMT)
committerBarry Warsaw <barry@python.org>2003-01-07 20:57:09 (GMT)
commit5676bd1c2dcee741f9340e15cd5e7fe8d374c212 (patch)
treee492fdda464c3f722a3337578094cc02167138f2 /Modules/posixmodule.c
parentf8ba39c4c097046c4246091f243fb45c9d2085a6 (diff)
downloadcpython-5676bd1c2dcee741f9340e15cd5e7fe8d374c212.zip
cpython-5676bd1c2dcee741f9340e15cd5e7fe8d374c212.tar.gz
cpython-5676bd1c2dcee741f9340e15cd5e7fe8d374c212.tar.bz2
all_ins(): EX_OK and friends, constants from sysexits.h
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r--Modules/posixmodule.c57
1 files changed, 57 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index cce8011..f1d5117 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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;