summaryrefslogtreecommitdiffstats
path: root/Modules/config.c.in
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-01-10 17:43:33 (GMT)
committerGuido van Rossum <guido@python.org>1995-01-10 17:43:33 (GMT)
commit6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be (patch)
tree272cf71937fdd8612162ce179786467c44ec3c70 /Modules/config.c.in
parent062cfb0c4e804a6c0d5d9d1711abdcfb1882e200 (diff)
downloadcpython-6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be.zip
cpython-6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be.tar.gz
cpython-6c1874fc2bd0e0d2e30de78fe1f1fe8bcf8a20be.tar.bz2
changes for C++ (Tim MacKenzie)
Diffstat (limited to 'Modules/config.c.in')
-rw-r--r--Modules/config.c.in21
1 files changed, 21 insertions, 0 deletions
diff --git a/Modules/config.c.in b/Modules/config.c.in
index ba8b9d7..0c2f114 100644
--- a/Modules/config.c.in
+++ b/Modules/config.c.in
@@ -41,6 +41,9 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "osdefs.h"
#include "intrcheck.h"
+#if defined(__cplusplus)
+extern "C" {
+#endif
#ifndef NO_MAIN
@@ -59,9 +62,14 @@ static char *argv0;
static char **orig_argv;
static int orig_argc;
+#if defined(__cplusplus)
+int realmain(int, char**);
+main(int argc, char **argv)
+#else
main(argc, argv)
int argc;
char **argv;
+#endif
{
orig_argc = argc;
orig_argv = argv;
@@ -76,9 +84,13 @@ getprogramname()
}
void
+#if defined(__cplusplus)
+getargcargv(int *argc, char ***argv)
+#else
getargcargv(argc,argv)
int *argc;
char ***argv;
+#endif
{
*argc = orig_argc;
*argv = orig_argv;
@@ -144,11 +156,16 @@ getcopyright()
#define PYTHONPATH ".:/usr/local/lib/python"
#endif /* !PYTHONPATH */
+#ifndef __cplusplus
extern char *getenv();
+#endif
char *
getpythonpath()
{
+#ifdef __cplusplus
+ void fatal(char *);
+#endif
char *path = getenv("PYTHONPATH");
char *defpath = PYTHONPATH;
static char *buf = NULL;
@@ -215,3 +232,7 @@ struct frozen {
{0, 0, 0}
};
#endif
+
+#if defined(__cplusplus)
+}
+#endif