summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1994-08-19 12:03:04 (GMT)
committerGuido van Rossum <guido@python.org>1994-08-19 12:03:04 (GMT)
commit72824bab44e8027d67325df94bfa0673c69999fb (patch)
tree310966603dae4a0f08eb2baa33adde9dbd7efb2d
parent0c7095484ee84253d00fd064512a5b203c3bae6f (diff)
downloadcpython-72824bab44e8027d67325df94bfa0673c69999fb.zip
cpython-72824bab44e8027d67325df94bfa0673c69999fb.tar.gz
cpython-72824bab44e8027d67325df94bfa0673c69999fb.tar.bz2
Move all code from version.c into config.c
-rw-r--r--Modules/Makefile.pre.in5
-rw-r--r--Modules/config.c.in34
2 files changed, 37 insertions, 2 deletions
diff --git a/Modules/Makefile.pre.in b/Modules/Makefile.pre.in
index 7ef0b0b..847412f 100644
--- a/Modules/Makefile.pre.in
+++ b/Modules/Makefile.pre.in
@@ -65,10 +65,11 @@ $(LIB): $(OBJS)
$(RANLIB) $(LIB)
../python: config.o $(MYLIBS)
- $(CC) config.o $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
+ $(CC) config.o \
+ $(MYLIBS) $(MODLIBS) $(LIBS) $(SYSLIBS) -o python
mv python ../python
-config.o: config.c Makefile
+config.o: config.c Makefile $(MYLIBS)
$(CC) $(CFLAGS) -DPYTHONPATH=\"$(PYTHONPATH)\" -c config.c
clean:
diff --git a/Modules/config.c.in b/Modules/config.c.in
index cc2371a..db8d7c5 100644
--- a/Modules/config.c.in
+++ b/Modules/config.c.in
@@ -68,6 +68,40 @@ getprogramname()
#endif
+/* Python version information */
+
+#include "patchlevel.h"
+
+/* Return the version string. This is constructed from the official
+ version number (from patchlevel.h), and the current date (if known
+ to the compiler, else a manually inserted date). */
+
+#define VERSION "%s (%s)"
+
+#ifdef __DATE__
+#define DATE __DATE__
+#else
+#define DATE "Aug 17 1994"
+#endif
+
+char *
+getversion()
+{
+ static char version[80];
+ sprintf(version, VERSION, PATCHLEVEL, DATE);
+ return version;
+}
+
+
+/* Return the copyright string. This is updated manually. */
+
+char *
+getcopyright()
+{
+ return "Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam";
+}
+
+
/* Return the initial python search path. This is called once from
initsys() to initialize sys.path.
The environment variable PYTHONPATH is fetched and the default path