Buglet: egcs' name is too long for Python startup message

Gregor Hoffleit flight at mathi.uni-heidelberg.de
Wed Apr 21 15:53:57 EDT 1999


A small annoyance: When I compile Python on a Debian system with egcc,
the startup message is cut-off strangely:

  freefly:1> python
  Python 1.5.2 (#0, Apr 21 1999, 14:13:38)  [GCC egcs-2.91.66 Debian
  GNU/Linux (egc on linux2
  Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
  >>> 

This is due to a short printf field in Python/getversion.c. Certainly
Guido didn't think that some compiler might use a 54 char __VERSION__ like
"egcs-2.91.66 Debian GNU/Linux (egcs-1.1.2 release)" :-)

Therefore, the correct startup message would be:

  Python 1.5.2 (#0, Apr 21 1999, 14:49:42)  [GCC egcs-2.91.66 Debian
  GNU/Linux (egcs-1.1.2 release)] on linux2

The following patch should do no harm to anything else, therefore I'd like
to see it applied.

	Gregor


--- python-1.5.2.orig/Python/getversion.c
+++ python-1.5.2/Python/getversion.c
@@ -39,7 +39,7 @@
 Py_GetVersion()
 {
        static char version[100];
-       sprintf(version, "%.10s (%.40s) %.40s", PY_VERSION,
+       sprintf(version, "%.10s (%.40s) %.80s", PY_VERSION,
                Py_GetBuildInfo(), Py_GetCompiler());
        return version;
 }





More information about the Python-list mailing list