summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-07-28 09:05:47 (GMT)
committerGuido van Rossum <guido@python.org>1993-07-28 09:05:47 (GMT)
commita3309960a50dbadfd854299e7420223eb8718a56 (patch)
tree450507606b30e153bcd20d61c3cc0571a246457d
parentf6da4f62b41db6f50481ae300b4997856638399c (diff)
downloadcpython-a3309960a50dbadfd854299e7420223eb8718a56.zip
cpython-a3309960a50dbadfd854299e7420223eb8718a56.tar.gz
cpython-a3309960a50dbadfd854299e7420223eb8718a56.tar.bz2
* Added support for X11 modules.
* Makefile: change location of FORMS library. * posixmodule.c: turn #if 0 into #ifdef MSDOS (stuff in unistd.h or not) * Almost all .h files: added CPP magic to avoid duplicate inclusions and to support inclusion from C++.
-rw-r--r--Include/accessobject.h11
-rw-r--r--Include/allobjects.h16
-rw-r--r--Include/assert.h11
-rw-r--r--Include/bitset.h11
-rw-r--r--Include/bltinmodule.h11
-rw-r--r--Include/ceval.h11
-rw-r--r--Include/cgensupport.h11
-rw-r--r--Include/classobject.h11
-rw-r--r--Include/compile.h11
-rw-r--r--Include/dictobject.h11
-rw-r--r--Include/errcode.h11
-rwxr-xr-xInclude/errors.h11
-rw-r--r--Include/eval.h11
-rw-r--r--Include/fileobject.h11
-rw-r--r--Include/floatobject.h11
-rw-r--r--Include/frameobject.h11
-rw-r--r--Include/funcobject.h11
-rw-r--r--Include/grammar.h11
-rw-r--r--Include/import.h11
-rw-r--r--Include/intobject.h11
-rw-r--r--Include/intrcheck.h11
-rw-r--r--Include/listobject.h11
-rw-r--r--Include/longintrepr.h11
-rw-r--r--Include/longobject.h11
-rw-r--r--Include/mappingobject.h11
-rw-r--r--Include/marshal.h11
-rw-r--r--Include/metagrammar.h11
-rw-r--r--Include/methodobject.h11
-rw-r--r--Include/modsupport.h11
-rw-r--r--Include/moduleobject.h11
-rw-r--r--Include/mymalloc.h11
-rw-r--r--Include/myselect.h11
-rw-r--r--Include/node.h11
-rw-r--r--Include/object.h11
-rw-r--r--Include/objimpl.h11
-rw-r--r--Include/opcode.h11
-rw-r--r--Include/osdefs.h11
-rw-r--r--Include/parsetok.h11
-rw-r--r--Include/pgenheaders.h11
-rw-r--r--Include/pyerrors.h11
-rw-r--r--Include/pythonrun.h11
-rwxr-xr-xInclude/rename1.h349
-rw-r--r--Include/stringobject.h11
-rw-r--r--Include/structmember.h11
-rw-r--r--Include/sysmodule.h11
-rw-r--r--Include/token.h11
-rw-r--r--Include/traceback.h11
-rw-r--r--Include/tupleobject.h11
-rw-r--r--Modules/cgensupport.h11
-rw-r--r--Modules/config.c.in35
-rw-r--r--Modules/posixmodule.c6
-rw-r--r--Modules/regexpr.h11
-rw-r--r--Modules/yuv.h11
-rw-r--r--Parser/assert.h11
-rw-r--r--Parser/parser.h11
-rw-r--r--Parser/pgen.h11
-rw-r--r--Parser/tokenizer.h11
57 files changed, 986 insertions, 3 deletions
diff --git a/Include/accessobject.h b/Include/accessobject.h
index d50d028..31b7190 100644
--- a/Include/accessobject.h
+++ b/Include/accessobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_ACCESSOBJECT_H
+#define Py_ACCESSOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -53,3 +59,8 @@ object *cloneaccessobject PROTO((object *));
int hasaccessvalue PROTO((object *));
extern typeobject Anynumbertype, Anysequencetype, Anymappingtype;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ACCESSOBJECT_H */
diff --git a/Include/allobjects.h b/Include/allobjects.h
index 859f0b3..8f9091a 100644
--- a/Include/allobjects.h
+++ b/Include/allobjects.h
@@ -1,3 +1,9 @@
+#ifndef Py_ALLOBJECTS_H
+#define Py_ALLOBJECTS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -53,4 +59,14 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "errors.h"
#include "mymalloc.h"
+#include "modsupport.h"
+#include "ceval.h"
+
+#include "rename1.h"
+
extern void fatal PROTO((char *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ALLOBJECTS_H */
diff --git a/Include/assert.h b/Include/assert.h
index ac9c5d2..dbce369 100644
--- a/Include/assert.h
+++ b/Include/assert.h
@@ -1,3 +1,9 @@
+#ifndef Py_ASSERT_H
+#define Py_ASSERT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -23,3 +29,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ASSERT_H */
diff --git a/Include/bitset.h b/Include/bitset.h
index 07b64b0..f7dbe8f 100644
--- a/Include/bitset.h
+++ b/Include/bitset.h
@@ -1,3 +1,9 @@
+#ifndef Py_BITSET_H
+#define Py_BITSET_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -44,3 +50,8 @@ void mergebitset PROTO((bitset bs1, bitset bs2, int nbits));
#define BYTE2BIT(ibyte) ((ibyte) * BITSPERBYTE)
#define testbit(ss, ibit) (((ss)[BIT2BYTE(ibit)] & BIT2MASK(ibit)) != 0)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_BITSET_H */
diff --git a/Include/bltinmodule.h b/Include/bltinmodule.h
index f162af1..0c8ecc2 100644
--- a/Include/bltinmodule.h
+++ b/Include/bltinmodule.h
@@ -1,3 +1,9 @@
+#ifndef Py_BLTINMODULE_H
+#define Py_BLTINMODULE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -25,3 +31,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* Built-in module interface */
extern object *getbuiltin PROTO((object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_BLTINMODULE_H */
diff --git a/Include/ceval.h b/Include/ceval.h
index 992b63d..a6948f1 100644
--- a/Include/ceval.h
+++ b/Include/ceval.h
@@ -1,3 +1,9 @@
+#ifndef Py_CEVAL_H
+#define Py_CEVAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -100,3 +106,8 @@ extern void restore_thread PROTO((object *));
#define END_SAVE }
#endif /* !USE_THREAD */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CEVAL_H */
diff --git a/Include/cgensupport.h b/Include/cgensupport.h
index 43818bc..8472b03 100644
--- a/Include/cgensupport.h
+++ b/Include/cgensupport.h
@@ -1,3 +1,9 @@
+#ifndef Py_CGENSUPPORT_H
+#define Py_CGENSUPPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -36,3 +42,8 @@ extern int getilongarg PROTO((object *args, int nargs, int i, long *p_a));
extern int getishortarg PROTO((object *args, int nargs, int i, short *p_a));
extern int getifloatarg PROTO((object *args, int nargs, int i, float *p_a));
extern int getistringarg PROTO((object *args, int nargs, int i, string *p_a));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CGENSUPPORT_H */
diff --git a/Include/classobject.h b/Include/classobject.h
index ccab6a3..aa1cb6b 100644
--- a/Include/classobject.h
+++ b/Include/classobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_CLASSOBJECT_H
+#define Py_CLASSOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -56,3 +62,8 @@ extern object *instancemethodgetclass PROTO((object *));
extern object *instance_convert PROTO((object *, char *));
extern int issubclass PROTO((object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CLASSOBJECT_H */
diff --git a/Include/compile.h b/Include/compile.h
index a447852..a23fea1 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -1,3 +1,9 @@
+#ifndef Py_COMPILE_H
+#define Py_COMPILE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -51,3 +57,8 @@ struct _node; /* Declare the existence of this type */
codeobject *compile PROTO((struct _node *, char *));
codeobject *newcodeobject
PROTO((object *, object *, object *, object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_COMPILE_H */
diff --git a/Include/dictobject.h b/Include/dictobject.h
index 1475f10..f1df1ef 100644
--- a/Include/dictobject.h
+++ b/Include/dictobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_DICTOBJECT_H
+#define Py_DICTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -39,3 +45,8 @@ extern int dictremove PROTO((object *dp, char *key));
#define dict2lookup mappinglookup
#define dict2insert mappinginsert
#define dict2remove mappingremove
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_DICTOBJECT_H */
diff --git a/Include/errcode.h b/Include/errcode.h
index 1439c7b..d2a2ac6 100644
--- a/Include/errcode.h
+++ b/Include/errcode.h
@@ -1,3 +1,9 @@
+#ifndef Py_ERRCODE_H
+#define Py_ERRCODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -34,3 +40,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define E_NOMEM 15 /* Ran out of memory */
#define E_DONE 16 /* Parsing complete */
#define E_ERROR 17 /* Execution error */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ERRCODE_H */
diff --git a/Include/errors.h b/Include/errors.h
index 0e5ae9f..2444ee1 100755
--- a/Include/errors.h
+++ b/Include/errors.h
@@ -1,3 +1,9 @@
+#ifndef Py_ERRORS_H
+#define Py_ERRORS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -63,3 +69,8 @@ extern void err_input PROTO((int));
extern void err_badcall PROTO((void));
extern object *err_getexc PROTO((void));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ERRORS_H */
diff --git a/Include/eval.h b/Include/eval.h
index a7a0ec8..91e2374 100644
--- a/Include/eval.h
+++ b/Include/eval.h
@@ -1,3 +1,9 @@
+#ifndef Py_EVAL_H
+#define Py_EVAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -26,3 +32,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
object *eval_code
PROTO((codeobject *, object *, object *, object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_EVAL_H */
diff --git a/Include/fileobject.h b/Include/fileobject.h
index ee2201f..14c345f 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_FILEOBJECT_H
+#define Py_FILEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -33,3 +39,8 @@ extern object *newopenfileobject
PROTO((FILE *, char *, char *, int (*)FPROTO((FILE *))));
extern FILE *getfilefile PROTO((object *));
extern object *filegetline PROTO((object *, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FILEOBJECT_H */
diff --git a/Include/floatobject.h b/Include/floatobject.h
index 9a70c3b..dad1fe1 100644
--- a/Include/floatobject.h
+++ b/Include/floatobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_FLOATOBJECT_H
+#define Py_FLOATOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -42,3 +48,8 @@ extern double getfloatvalue PROTO((object *));
/* Macro, trading safety for speed */
#define GETFLOATVALUE(op) ((op)->ob_fval)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FLOATOBJECT_H */
diff --git a/Include/frameobject.h b/Include/frameobject.h
index c514de2..5eeb2ad 100644
--- a/Include/frameobject.h
+++ b/Include/frameobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_FRAMEOBJECT_H
+#define Py_FRAMEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -88,3 +94,8 @@ block *pop_block PROTO((frameobject *));
/* Extend the value stack */
object **extend_stack PROTO((frameobject *, int, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FRAMEOBJECT_H */
diff --git a/Include/funcobject.h b/Include/funcobject.h
index e4ed269..ffe2996 100644
--- a/Include/funcobject.h
+++ b/Include/funcobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_FUNCOBJECT_H
+#define Py_FUNCOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -38,3 +44,8 @@ extern typeobject Functype;
extern object *newfuncobject PROTO((object *, object *));
extern object *getfunccode PROTO((object *));
extern object *getfuncglobals PROTO((object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_FUNCOBJECT_H */
diff --git a/Include/grammar.h b/Include/grammar.h
index 5aace87..506304f 100644
--- a/Include/grammar.h
+++ b/Include/grammar.h
@@ -1,3 +1,9 @@
+#ifndef Py_GRAMMAR_H
+#define Py_GRAMMAR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -103,3 +109,8 @@ void addaccelerators PROTO((grammar *g));
void printgrammar PROTO((grammar *g, FILE *fp));
void printnonterminals PROTO((grammar *g, FILE *fp));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_GRAMMAR_H */
diff --git a/Include/import.h b/Include/import.h
index c934fe5..d960c9f 100644
--- a/Include/import.h
+++ b/Include/import.h
@@ -1,3 +1,9 @@
+#ifndef Py_IMPORT_H
+#define Py_IMPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -34,3 +40,8 @@ extern struct {
char *name;
void (*initfunc)();
} inittab[];
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_IMPORT_H */
diff --git a/Include/intobject.h b/Include/intobject.h
index ef11c2f..7b778e9 100644
--- a/Include/intobject.h
+++ b/Include/intobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_INTOBJECT_H
+#define Py_INTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -70,3 +76,8 @@ extern intobject FalseObject, TrueObject; /* Don't use these directly */
/* Macro, trading safety for speed */
#define GETINTVALUE(op) ((op)->ob_ival)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTOBJECT_H */
diff --git a/Include/intrcheck.h b/Include/intrcheck.h
index 886dbed..7f1b526 100644
--- a/Include/intrcheck.h
+++ b/Include/intrcheck.h
@@ -1,3 +1,9 @@
+#ifndef Py_INTRCHECK_H
+#define Py_INTRCHECK_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -24,3 +30,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern int intrcheck PROTO((void));
extern void initintr PROTO((void));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_INTRCHECK_H */
diff --git a/Include/listobject.h b/Include/listobject.h
index f18877f..7af8058 100644
--- a/Include/listobject.h
+++ b/Include/listobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_LISTOBJECT_H
+#define Py_LISTOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -59,3 +65,8 @@ extern int sortlist PROTO((object *));
/* Macro, trading safety for speed */
#define GETLISTITEM(op, i) ((op)->ob_item[i])
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LISTOBJECT_H */
diff --git a/Include/longintrepr.h b/Include/longintrepr.h
index 7ca69ba..2188153 100644
--- a/Include/longintrepr.h
+++ b/Include/longintrepr.h
@@ -1,3 +1,9 @@
+#ifndef Py_LONGINTREPR_H
+#define Py_LONGINTREPR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -61,3 +67,8 @@ struct _longobject {
};
longobject *alloclongobject PROTO((int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LONGINTREPR_H */
diff --git a/Include/longobject.h b/Include/longobject.h
index 5a8b715..7566a38 100644
--- a/Include/longobject.h
+++ b/Include/longobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_LONGOBJECT_H
+#define Py_LONGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -37,3 +43,8 @@ extern double dgetlongvalue PROTO((object *));
object *long_format PROTO((object *, int));
object *long_scan PROTO((char *, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_LONGOBJECT_H */
diff --git a/Include/mappingobject.h b/Include/mappingobject.h
index fa7402d..f6d36e0 100644
--- a/Include/mappingobject.h
+++ b/Include/mappingobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_MAPPINGOBJECT_H
+#define Py_MAPPINGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -38,3 +44,8 @@ extern int mappinggetnext
extern object *getmappingkeys PROTO((object *mp));
extern object *getmappingvalues PROTO((object *mp));
extern object *getmappingitems PROTO((object *mp));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MAPPINGOBJECT_H */
diff --git a/Include/marshal.h b/Include/marshal.h
index 1adc2ad..7823f5c 100644
--- a/Include/marshal.h
+++ b/Include/marshal.h
@@ -1,3 +1,9 @@
+#ifndef Py_MARSHAL_H
+#define Py_MARSHAL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -32,3 +38,8 @@ long rd_long PROTO((FILE *));
int rd_short PROTO((FILE *));
object *rd_object PROTO((FILE *));
object *rds_object PROTO((char *, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MARSHAL_H */
diff --git a/Include/metagrammar.h b/Include/metagrammar.h
index 40b7d6c..d22f458 100644
--- a/Include/metagrammar.h
+++ b/Include/metagrammar.h
@@ -1,3 +1,9 @@
+#ifndef Py_METAGRAMMAR_H
+#define Py_METAGRAMMAR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -28,3 +34,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define ALT 259
#define ITEM 260
#define ATOM 261
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_METAGRAMMAR_H */
diff --git a/Include/methodobject.h b/Include/methodobject.h
index 0cbfd6a..0252334 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_METHODOBJECT_H
+#define Py_METHODOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -42,3 +48,8 @@ struct methodlist {
};
extern object *findmethod PROTO((struct methodlist *, object *, char *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_METHODOBJECT_H */
diff --git a/Include/modsupport.h b/Include/modsupport.h
index 5c1bdf5..f476f13 100644
--- a/Include/modsupport.h
+++ b/Include/modsupport.h
@@ -1,3 +1,9 @@
+#ifndef Py_MODSUPPORT_H
+#define Py_MODSUPPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -45,3 +51,8 @@ extern object *vmkvalue PROTO((char *, va_list));
#define getintarg(v, a) getargs(v, "i", a)
#define getlongarg(v, a) getargs(v, "l", a)
#define getstrarg(v, a) getargs(v, "s", a)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MODSUPPORT_H */
diff --git a/Include/moduleobject.h b/Include/moduleobject.h
index bf3c4a4..b4c0cdf 100644
--- a/Include/moduleobject.h
+++ b/Include/moduleobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_MODULEOBJECT_H
+#define Py_MODULEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -31,3 +37,8 @@ extern typeobject Moduletype;
extern object *newmoduleobject PROTO((char *));
extern object *getmoduledict PROTO((object *));
extern char *getmodulename PROTO((object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MODULEOBJECT_H */
diff --git a/Include/mymalloc.h b/Include/mymalloc.h
index 6259712..959f296 100644
--- a/Include/mymalloc.h
+++ b/Include/mymalloc.h
@@ -1,3 +1,9 @@
+#ifndef Py_MYMALLOC_H
+#define Py_MYMALLOC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -74,3 +80,8 @@ extern ANY *calloc PROTO((MALLARG, MALLARG));
extern ANY *realloc PROTO((ANY *, MALLARG));
extern void free PROTO((ANY *)); /* XXX sometimes int on Unix old systems */
#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MYMALLOC_H */
diff --git a/Include/myselect.h b/Include/myselect.h
index 3f65243..174da11 100644
--- a/Include/myselect.h
+++ b/Include/myselect.h
@@ -1,3 +1,9 @@
+#ifndef Py_MYSELECT_H
+#define Py_MYSELECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -78,3 +84,8 @@ typedef struct fd_set {
#define FD_ZERO(p) memset((char *)(p), '\0', sizeof(*(p)))
#endif /* FD_SET */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_MYSELECT_H */
diff --git a/Include/node.h b/Include/node.h
index 31bae1b..bfae7da 100644
--- a/Include/node.h
+++ b/Include/node.h
@@ -1,3 +1,9 @@
+#ifndef Py_NODE_H
+#define Py_NODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -56,3 +62,8 @@ extern void freetree PROTO((node *n));
extern void listtree PROTO((node *));
extern void listnode PROTO((FILE *, node *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_NODE_H */
diff --git a/Include/object.h b/Include/object.h
index 0aed1d0..2a6b170 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -1,3 +1,9 @@
+#ifndef Py_OBJECT_H
+#define Py_OBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -347,3 +353,8 @@ times.
123456789-123456789-123456789-123456789-123456789-123456789-123456789-12
*/
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OBJECT_H */
diff --git a/Include/objimpl.h b/Include/objimpl.h
index 683f03e..25f8b94 100644
--- a/Include/objimpl.h
+++ b/Include/objimpl.h
@@ -1,3 +1,9 @@
+#ifndef Py_OBJIMPL_H
+#define Py_OBJIMPL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -46,3 +52,8 @@ extern varobject *newvarobject PROTO((typeobject *, unsigned int));
#define NEWOBJ(type, typeobj) ((type *) newobject(typeobj))
#define NEWVAROBJ(type, typeobj, n) ((type *) newvarobject(typeobj, n))
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OBJIMPL_H */
diff --git a/Include/opcode.h b/Include/opcode.h
index 5f5826f..b53b44d 100644
--- a/Include/opcode.h
+++ b/Include/opcode.h
@@ -1,3 +1,9 @@
+#ifndef Py_OPCODE_H
+#define Py_OPCODE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -126,3 +132,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
enum cmp_op {LT, LE, EQ, NE, GT, GE, IN, NOT_IN, IS, IS_NOT, EXC_MATCH, BAD};
#define HAS_ARG(op) ((op) >= HAVE_ARGUMENT)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OPCODE_H */
diff --git a/Include/osdefs.h b/Include/osdefs.h
index 939978a..5ff75ba 100644
--- a/Include/osdefs.h
+++ b/Include/osdefs.h
@@ -1,3 +1,9 @@
+#ifndef Py_OSDEFS_H
+#define Py_OSDEFS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -50,3 +56,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef DELIM
#define DELIM ':'
#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_OSDEFS_H */
diff --git a/Include/parsetok.h b/Include/parsetok.h
index 623c4d8..efb1a05 100644
--- a/Include/parsetok.h
+++ b/Include/parsetok.h
@@ -1,3 +1,9 @@
+#ifndef Py_PARSETOK_H
+#define Py_PARSETOK_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -27,3 +33,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern int parsestring PROTO((char *, grammar *, int start, node **n_ret));
extern int parsefile PROTO((FILE *, char *, grammar *, int start,
char *ps1, char *ps2, node **n_ret));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PARSETOK_H */
diff --git a/Include/pgenheaders.h b/Include/pgenheaders.h
index 049e9f4..8395960 100644
--- a/Include/pgenheaders.h
+++ b/Include/pgenheaders.h
@@ -1,3 +1,9 @@
+#ifndef Py_PGENHEADERS_H
+#define Py_PGENHEADERS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -52,3 +58,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "mymalloc.h"
extern void fatal PROTO((char *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PGENHEADERS_H */
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 0e5ae9f..2444ee1 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -1,3 +1,9 @@
+#ifndef Py_ERRORS_H
+#define Py_ERRORS_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -63,3 +69,8 @@ extern void err_input PROTO((int));
extern void err_badcall PROTO((void));
extern object *err_getexc PROTO((void));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ERRORS_H */
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index c3c3aca..cc5bb05 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -1,3 +1,9 @@
+#ifndef Py_PYTHONRUN_H
+#define Py_PYTHONRUN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -48,3 +54,8 @@ object *compile_string PROTO((char *, char *, int));
void print_error PROTO((void));
void goaway PROTO((int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PYTHONRUN_H */
diff --git a/Include/rename1.h b/Include/rename1.h
new file mode 100755
index 0000000..cfad02b
--- /dev/null
+++ b/Include/rename1.h
@@ -0,0 +1,349 @@
+#ifndef Py_RENAME1_H
+#define Py_RENAME1_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/***********************************************************
+Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
+Amsterdam, The Netherlands.
+
+ All Rights Reserved
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted,
+provided that the above copyright notice appear in all copies and that
+both that copyright notice and this permission notice appear in
+supporting documentation, and that the names of Stichting Mathematisch
+Centrum or CWI not be used in advertising or publicity pertaining to
+distribution of the software without specific, written prior permission.
+
+STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO
+THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE
+FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
+OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+******************************************************************/
+
+/* This file contains a bunch of #defines that make it possible to use
+ "new style" names (e.g. PyObject) with the old style Python source
+ distribution. */
+
+typedef ANY *PyUnivPtr;
+
+#define Py_NO_DEBUG NDEBUG
+#define Py_TRACE_REFS TRACE_REFS
+#define Py_REF_DEBUG REF_DEBUG
+#define Py_HAVE_PROTOTYPES HAVE_PROTOTYPES
+#define Py_HAVE_STDLIB HAVE_STDLIB
+#define _Py_ZeroStruct FalseObject
+#define _Py_NoneStruct NoObject
+#define _Py_TrueStruct TrueObject
+#define Py_DebugFlag debugging
+#define _PyParser_Grammar gram
+#define _PySys_ProfileFunc sys_profile
+#define _PySys_TraceFunc sys_trace
+#define _PyThread_Started threads_started
+#define _PyParser_TokenNames tok_name
+#define Py_VerboseFlag verbose
+#define PyExc_AttributeError AttributeError
+#define PyExc_EOFError EOFError
+#define PyExc_IOError IOError
+#define PyExc_ImportError ImportError
+#define PyExc_IndexError IndexError
+#define PyExc_KeyError KeyError
+#define PyExc_MemoryError MemoryError
+#define PyExc_NameError NameError
+#define PyExc_OverflowError OverflowError
+#define PyExc_RuntimeError RuntimeError
+#define PyExc_SyntaxError SyntaxError
+#define PyExc_SystemError SystemError
+#define PyExc_TypeError TypeError
+#define PyExc_ValueError ValueError
+#define PyExc_ZeroDivisionError ZeroDivisionError
+#define PyExc_KeyboardInterrupt KeyboardInterrupt
+#define PyExc_SystemExit SystemExit
+#define PyFloat_Type Floattype
+#define PyInt_Type Inttype
+#define PyLong_Type Longtype
+#define PyNothing_Type Notype
+#define PyString_Type Stringtype
+#define PyType_Type Typetype
+#define PyList_Type Listtype
+#define PyDict_Type Dicttype
+#define PyTuple_Type Tupletype
+#define PyFile_Type Filetype
+#define PyClass_Type Classtype
+#define PyFunction_Type Functype
+#define PyMethod_Type Instancemethodtype
+#define PyInstance_Type Instancetype
+#define PyCFunction_Type Methodtype
+#define PyModule_Type Moduletype
+#define PyCode_Type Codetype
+#define PyFrame_Type Frametype
+#define PyFloatObject floatobject
+#define PyIntObject intobject
+#define PyLongObject longobject
+#define PyNothingObject noobject
+#define PyStringObject stringobject
+#define PyTypeObject typeobject
+#define PyListObject listobject
+#define PyDictObject dictobject
+#define PyTupleObject tupleobject
+#define PyFileObject fileobject
+#define PyClassObject classobject
+#define PyCodeObject codeobject
+#define PyFrameObject frameobject
+#define PyFunctionObject funcobject
+#define PyMethodObject instancemethodobject
+#define PyInstanceObject instanceobject
+#define PyCFunctionObject methodobject
+#define PyModuleObject moduleobject
+#define PyNumberMethods number_methods
+#define PySequenceMethods sequence_methods
+#define PyMappingMethods mapping_methods
+#define PyObject_HEAD OB_HEAD
+#define PyObject_VAR_HEAD OB_VARHEAD
+#define PyObject_HEAD_INIT OB_HEAD_INIT
+#define PyObject_NEW NEWOBJ
+#define PyObject_NEW_VAR NEWVAROBJ
+#define Py_PROTO PROTO
+#define Py_FPROTO PROTO
+#define PyMem_NEW NEW
+#define PyMem_RESIZE RESIZE
+#define PyMem_DEL DEL
+#define PyMem_XDEL XDEL
+#define Py_BEGIN_ALLOW_THREADS BGN_SAVE
+#define Py_BLOCK_THREADS RET_SAVE
+#define Py_UNBLOCK_THREADS RES_SAVE
+#define Py_END_ALLOW_THREADS END_SAVE
+#define PyFloat_Check is_floatobject
+#define PyInt_Check is_intobject
+#define PyLong_Check is_longobject
+#define PyNothing_Check is_noobject
+#define PyString_Check is_stringobject
+#define PyType_Check is_typeobject
+#define PyList_Check is_listobject
+#define PyDict_Check is_dictobject
+#define PyTuple_Check is_tupleobject
+#define PyFile_Check is_fileobject
+#define PyClass_Check is_classobject
+#define PyCode_Check is_codeobject
+#define PyFrame_Check is_frameobject
+#define PyFunction_Check is_funcobject
+#define PyMethod_Check is_instancemethodobject
+#define PyInstance_Check is_instanceobject
+#define PyCFunction_Check is_methodobject
+#define PyModule_Check is_moduleobject
+#define Py_INCREF INCREF
+#define Py_DECREF DECREF
+#define Py_XINCREF XINCREF
+#define Py_XDECREF XDECREF
+#define _Py_NewReference NEWREF
+#define _Py_Dealloc DELREF
+#define _Py_ForgetReference UNREF
+#define Py_None None
+#define Py_False False
+#define Py_True True
+#define PyObject_Compare cmpobject
+#define PyObject_GetAttrString getattr
+#define PyObject_GetAttr getattro
+#define PyObject_Hash hashobject
+#define _PyObject_New newobject
+#define _PyObject_NewVar newvarobject
+#define PyObject_Print printobject
+#define PyObject_Repr reprobject
+#define PyObject_SetAttrString setattr
+#define PyObject_SetAttr setattro
+#define PyObject_IsTrue testbool
+#define Py_PRINT_RAW PRINT_RAW
+#define PyFloat_AsString float_buf_repr
+#define PyFloat_AsDouble getfloatvalue
+#define PyFloat_AS_DOUBLE GETFLOATVALUE
+#define PyFloat_FromDouble newfloatobject
+#define PyInt_AsLong getintvalue
+#define PyInt_AS_LONG GETINTVALUE
+#define PyInt_FromLong newintobject
+#define _PyLong_New alloclongobject
+#define PyLong_AsDouble dgetlongvalue
+#define PyLong_FromDouble dnewlongobject
+#define PyLong_AsLong getlongvalue
+#define PyLong_FromString long_scan
+#define PyLong_FromLong newlongobject
+#define PyString_Format formatstring
+#define PyString_Size getstringsize
+#define PyString_AsString getstringvalue
+#define PyString_AS_STRING GETSTRINGVALUE
+#define PyString_Concat joinstring
+#define PyString_FromStringAndSize newsizedstringobject
+#define PyString_FromString newstringobject
+#define _PyString_Resize resizestring
+#define PyList_Append addlistitem
+#define PyList_GetItem getlistitem
+#define PyList_GET_ITEM GETLISTITEM
+#define PyList_Size getlistsize
+#define PyList_GetSlice getlistslice
+#define PyList_Insert inslistitem
+#define PyList_New newlistobject
+#define PyList_SetItem setlistitem
+#define PyList_SetSlice setlistslice
+#define PyList_Sort sortlist
+#define PyDict_SetItemString dictinsert
+#define PyDict_GetItemString dictlookup
+#define PyDict_DelItemString dictremove
+#define PyDict_Items getmappingitems
+#define PyDict_Keys getmappingkeys
+#define PyDict_Values getmappingvalues
+#define PyDict_Clear mappingclear
+#define PyDict_Next mappinggetnext
+#define PyDict_SetItem mappinginsert
+#define PyDict_GetItem mappinglookup
+#define PyDict_DelItem mappingremove
+#define PyDict_New newmappingobject
+#define PyTuple_GetItem gettupleitem
+#define PyTuple_GET_ITEM GETTUPLEITEM
+#define PyTuple_Size gettuplesize
+#define PyTuple_GetSlice gettupleslice
+#define PyTuple_New newtupleobject
+#define PyTuple_SetItem settupleitem
+#define PyFile_GetLine filegetline
+#define PyFile_AsFile getfilefile
+#define PyFile_FromString newfileobject
+#define PyFile_FromFile newopenfileobject
+#define PyFile_SoftSpace softspace
+#define PyFile_WriteObject writeobject
+#define PyFile_WriteString writestring
+#define PyMethod_Class instancemethodgetclass
+#define PyMethod_Function instancemethodgetfunc
+#define PyMethod_Self instancemethodgetself
+#define PyClass_IsSubclass issubclass
+#define PyClass_New newclassobject
+#define PyMethod_New newinstancemethodobject
+#define PyInstance_New newinstanceobject
+#define PyTryBlock block
+#define PyFrame_ExtendStack extend_stack
+#define PyFrame_New newframeobject
+#define PyFrame_BlockPop pop_block
+#define PyFrame_BlockSetup setup_block
+#define PyFunction_GetCode getfunccode
+#define PyFunction_GetGlobals getfuncglobals
+#define PyFunction_New newfuncobject
+#define PyCFunction method
+#define Py_FindMethod findmethod
+#define PyCFunction_GetFunction getmethod
+#define PyCFunction_GetSelf getself
+#define PyCFunction_IsVarArgs getvarargs
+#define PyCFunction_New newmethodobject
+#define PyModule_GetDict getmoduledict
+#define PyModule_GetName getmodulename
+#define PyModule_New newmoduleobject
+#define PyGrammar_AddAccelerators addaccelerators
+#define PyGrammar_FindDFA finddfa
+#define PyGrammar_LabelRepr labelrepr
+#define PyNode_ListTree listtree
+#define PyNode_AddChild addchild
+#define PyNode_Free freetree
+#define PyNode_New newtree
+#define PyParser_AddToken addtoken
+#define PyParser_Delete delparser
+#define PyParser_New newparser
+#define PyParser_ParseFile parsefile
+#define PyParser_ParseString parsestring
+#define PyToken_OneChar tok_1char
+#define PyToken_TwoChars tok_2char
+#define PyTokenizer_Free tok_free
+#define PyTokenizer_Get tok_get
+#define PyTokenizer_FromFile tok_setupf
+#define PyTokenizer_FromString tok_setups
+#define PyNode_Compile compile
+#define PyCode_New newcodeobject
+#define PyEval_CallObject call_object
+#define PyEval_EvalCode eval_code
+#define Py_FlushLine flushline
+#define PyEval_GetGlobals getglobals
+#define PyEval_GetLocals getlocals
+#define PyEval_InitThreads init_save_thread
+#define PyErr_PrintTraceBack printtraceback
+#define PyEval_RestoreThread restore_thread
+#define PyEval_SaveThread save_thread
+#define PyTraceBack_Fetch tb_fetch
+#define PyTraceBack_Here tb_here
+#define PyTraceBack_Print tb_print
+#define PyTraceBack_Store tb_store
+#define PyImport_AddModule add_module
+#define PyImport_Cleanup doneimport
+#define PyImport_GetModuleDict get_modules
+#define PyImport_ImportModule import_module
+#define PyImport_ImportFrozenModule init_frozen
+#define PyImport_Init initimport
+#define PyImport_ReloadModule reload_module
+#define PyNumber_Coerce coerce
+#define PyBuiltin_GetObject getbuiltin
+#define PyBuiltin_Init initbuiltin
+#define PyMarshal_Init initmarshal
+#define PyMarshal_ReadLongFromFile rd_long
+#define PyMarshal_ReadObjectFromFile rd_object
+#define PyMarshal_ReadObjectFromString rds_object
+#define PyMarshal_WriteLongToFile wr_long
+#define PyMarshal_WriteObjectToFile wr_object
+#define PySys_Init initsys
+#define PySys_SetArgv setpythonargv
+#define PySys_SetPath setpythonpath
+#define PySys_GetObject sysget
+#define PySys_GetFile sysgetfile
+#define PySys_SetObject sysset
+#define Py_CompileString compile_string
+#define Py_FatalError fatal
+#define Py_Exit goaway
+#define Py_Initialize initall
+#define PyErr_Print print_error
+#define PyParser_SimpleParseFile parse_file
+#define PyParser_SimpleParseString parse_string
+#define PyRun_AnyFile run
+#define PyRun_SimpleFile run_script
+#define PyRun_SimpleString run_command
+#define PyRun_File run_file
+#define PyRun_String run_string
+#define PyRun_InteractiveOne run_tty_1
+#define PyRun_InteractiveLoop run_tty_loop
+#define PyMember_Get getmember
+#define PyMember_Set setmember
+#define Py_InitModule initmodule
+#define Py_BuildValue mkvalue
+#define Py_VaBuildValue vmkvalue
+#define PyArg_Parse getargs
+#define PyArg_GetChar getichararg
+#define PyArg_GetDoubleArray getidoublearray
+#define PyArg_GetFloat getifloatarg
+#define PyArg_GetFloatArray getifloatarray
+#define PyArg_GetLong getilongarg
+#define PyArg_GetLongArray getilongarray
+#define PyArg_GetLongArraySize getilongarraysize
+#define PyArg_GetObject getiobjectarg
+#define PyArg_GetShort getishortarg
+#define PyArg_GetShortArray getishortarray
+#define PyArg_GetShortArraySize getishortarraysize
+#define PyArg_GetString getistringarg
+#define PyErr_BadArgument err_badarg
+#define PyErr_BadInternalCall err_badcall
+#define PyErr_Input err_input
+#define PyErr_NoMemory err_nomem
+#define PyErr_SetFromErrno err_errno
+#define PyErr_SetNone err_set
+#define PyErr_SetString err_setstr
+#define PyErr_SetObject err_setval
+#define PyErr_Occurred err_occurred
+#define PyErr_GetAndClear err_get
+#define PyErr_Clear err_clear
+#define PyOS_InterruptableGetString fgets_intr
+#define PyOS_InitInterrupts initintr
+#define PyOS_InterruptOccurred intrcheck
+#define PyOS_GetLastModificationTime getmtime
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_RENAME1_H */
diff --git a/Include/stringobject.h b/Include/stringobject.h
index 2a3d47a..a4b4ea6 100644
--- a/Include/stringobject.h
+++ b/Include/stringobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_STRINGOBJECT_H
+#define Py_STRINGOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -62,3 +68,8 @@ extern object *formatstring PROTO((object *, object *));
/* Macro, trading safety for speed */
#define GETSTRINGVALUE(op) ((op)->ob_sval)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_STRINGOBJECT_H */
diff --git a/Include/structmember.h b/Include/structmember.h
index 425300c..2462aa7 100644
--- a/Include/structmember.h
+++ b/Include/structmember.h
@@ -1,3 +1,9 @@
+#ifndef Py_STRUCTMEMBER_H
+#define Py_STRUCTMEMBER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -70,3 +76,8 @@ struct memberlist {
object *getmember PROTO((char *, struct memberlist *, char *));
int setmember PROTO((char *, struct memberlist *, char *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_STRUCTMEMBER_H */
diff --git a/Include/sysmodule.h b/Include/sysmodule.h
index 36a4499..f6e4d08 100644
--- a/Include/sysmodule.h
+++ b/Include/sysmodule.h
@@ -1,3 +1,9 @@
+#ifndef Py_SYSMODULE_H
+#define Py_SYSMODULE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -30,3 +36,8 @@ FILE *sysgetfile PROTO((char *, FILE *));
void initsys PROTO((void));
extern object *sys_trace, *sys_profile;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_SYSMODULE_H */
diff --git a/Include/token.h b/Include/token.h
index 053ceab..6939cc8 100644
--- a/Include/token.h
+++ b/Include/token.h
@@ -1,3 +1,9 @@
+#ifndef Py_TOKEN_H
+#define Py_TOKEN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -77,3 +83,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
extern char *tok_name[]; /* Token names */
extern int tok_1char PROTO((int));
extern int tok_2char PROTO((int, int));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TOKEN_H */
diff --git a/Include/traceback.h b/Include/traceback.h
index c45526c..07c0c1e 100644
--- a/Include/traceback.h
+++ b/Include/traceback.h
@@ -1,3 +1,9 @@
+#ifndef Py_TRACEBACK_H
+#define Py_TRACEBACK_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -28,3 +34,8 @@ int tb_here PROTO((struct _frame *));
object *tb_fetch PROTO((void));
int tb_store PROTO((object *));
int tb_print PROTO((object *, object *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TRACEBACK_H */
diff --git a/Include/tupleobject.h b/Include/tupleobject.h
index 4c8d302..b5f2230 100644
--- a/Include/tupleobject.h
+++ b/Include/tupleobject.h
@@ -1,3 +1,9 @@
+#ifndef Py_TUPLEOBJECT_H
+#define Py_TUPLEOBJECT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -55,3 +61,8 @@ extern object *gettupleslice PROTO((object *, int, int));
/* Macro, trading safety for speed */
#define GETTUPLEITEM(op, i) ((op)->ob_item[i])
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TUPLEOBJECT_H */
diff --git a/Modules/cgensupport.h b/Modules/cgensupport.h
index 43818bc..8472b03 100644
--- a/Modules/cgensupport.h
+++ b/Modules/cgensupport.h
@@ -1,3 +1,9 @@
+#ifndef Py_CGENSUPPORT_H
+#define Py_CGENSUPPORT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -36,3 +42,8 @@ extern int getilongarg PROTO((object *args, int nargs, int i, long *p_a));
extern int getishortarg PROTO((object *args, int nargs, int i, short *p_a));
extern int getifloatarg PROTO((object *args, int nargs, int i, float *p_a));
extern int getistringarg PROTO((object *args, int nargs, int i, string *p_a));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_CGENSUPPORT_H */
diff --git a/Modules/config.c.in b/Modules/config.c.in
index 692827e..faf36a8 100644
--- a/Modules/config.c.in
+++ b/Modules/config.c.in
@@ -295,6 +295,21 @@ extern void initmd5();
#ifdef USE_ARRAY
extern void initarray();
#endif
+#ifdef USE_XT
+extern void initXt();
+#endif
+#ifdef USE_XAW
+extern void initXaw();
+#endif
+#ifdef USE_XM
+extern void initXm();
+#endif
+#ifdef USE_GLX
+extern void initGlx();
+#endif
+#ifdef USE_HTML
+extern void initHTML();
+#endif
/* -- ADDMODULE MARKER 1 -- */
struct {
@@ -450,6 +465,26 @@ struct {
{"array", initarray},
#endif
+#ifdef USE_XT
+ {"Xt", initXt},
+#endif
+
+#ifdef USE_XAW
+ {"Xaw", initXaw},
+#endif
+
+#ifdef USE_XM
+ {"Xm", initXm},
+#endif
+
+#ifdef USE_GLX
+ {"Glx", initGlx},
+#endif
+
+#ifdef USE_HTML
+ {"HTML", initHTML},
+#endif
+
/* -- ADDMODULE MARKER 2 -- */
{0, 0} /* Sentinel */
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index e29be40..d3f3583 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -85,15 +85,15 @@ extern int chdir PROTO((const char *));
extern int rmdir PROTO((const char *));
extern int chmod PROTO((const char *, mode_t));
extern char *getcwd PROTO((char *, int)); /* XXX or size_t? */
-#if 0
+#ifndef MSDOS
extern char *strerror PROTO((int));
extern int link PROTO((const char *, const char *));
extern int rename PROTO((const char *, const char *));
extern int stat PROTO((const char *, struct stat *));
extern int unlink PROTO((const char *));
extern int pclose PROTO((FILE *));
-#endif
-#endif /* _SEQUENT_ */
+#endif /* !MSDOS */
+#endif /* !_SEQUENT_ */
#ifdef NO_LSTAT
#define lstat stat
#else
diff --git a/Modules/regexpr.h b/Modules/regexpr.h
index ef46554..7e82abd 100644
--- a/Modules/regexpr.h
+++ b/Modules/regexpr.h
@@ -1,3 +1,9 @@
+#ifndef Py_REGEXPR_H
+#define Py_REGEXPR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
regexpr.h
@@ -138,3 +144,8 @@ int re_exec();
#endif /* REGEXPR_H */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_REGEXPR_H */
diff --git a/Modules/yuv.h b/Modules/yuv.h
index 6c7b1e2..4046df6 100644
--- a/Modules/yuv.h
+++ b/Modules/yuv.h
@@ -1,3 +1,9 @@
+#ifndef Py_YUV_H
+#define Py_YUV_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* SVideo YUV 4:1:1 format.
*
@@ -85,3 +91,8 @@ struct yuv422 {
void yuv_sv411_to_cl422dc(int, void *, void *, int, int);
void yuv_sv411_to_cl422dc_quartersize(int, void *, void *, int, int);
void yuv_sv411_to_cl422dc_sixteenthsize(int, void *, void *, int, int);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_YUV_H */
diff --git a/Parser/assert.h b/Parser/assert.h
index ac9c5d2..dbce369 100644
--- a/Parser/assert.h
+++ b/Parser/assert.h
@@ -1,3 +1,9 @@
+#ifndef Py_ASSERT_H
+#define Py_ASSERT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -23,3 +29,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
#define assert(e) { if (!(e)) { printf("Assertion failed\n"); abort(); } }
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_ASSERT_H */
diff --git a/Parser/parser.h b/Parser/parser.h
index 0763312..b025a50 100644
--- a/Parser/parser.h
+++ b/Parser/parser.h
@@ -1,3 +1,9 @@
+#ifndef Py_PARSER_H
+#define Py_PARSER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -48,3 +54,8 @@ parser_state *newparser PROTO((struct _grammar *g, int start));
void delparser PROTO((parser_state *ps));
int addtoken PROTO((parser_state *ps, int type, char *str, int lineno));
void addaccelerators PROTO((grammar *g));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PARSER_H */
diff --git a/Parser/pgen.h b/Parser/pgen.h
index 948f5a5..872a3fa 100644
--- a/Parser/pgen.h
+++ b/Parser/pgen.h
@@ -1,3 +1,9 @@
+#ifndef Py_PGEN_H
+#define Py_PGEN_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -30,3 +36,8 @@ extern grammar *meta_grammar PROTO((void));
struct _node;
extern grammar *pgen PROTO((struct _node *));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_PGEN_H */
diff --git a/Parser/tokenizer.h b/Parser/tokenizer.h
index bdef859..17f44e5 100644
--- a/Parser/tokenizer.h
+++ b/Parser/tokenizer.h
@@ -1,3 +1,9 @@
+#ifndef Py_TOKENIZER_H
+#define Py_TOKENIZER_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/***********************************************************
Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum,
Amsterdam, The Netherlands.
@@ -54,3 +60,8 @@ extern struct tok_state *tok_setups PROTO((char *));
extern struct tok_state *tok_setupf PROTO((FILE *, char *ps1, char *ps2));
extern void tok_free PROTO((struct tok_state *));
extern int tok_get PROTO((struct tok_state *, char **, char **));
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* !Py_TOKENIZER_H */