Tim Peters | 22a51ef | 2001-12-04 01:11:32 +0000 | [diff] [blame] | 1 | #include "Python.h" |
Guido van Rossum | 49bff65 | 1997-05-20 22:40:26 +0000 | [diff] [blame] | 2 | |
Guido van Rossum | ff7e83d | 1999-08-27 20:39:37 +0000 | [diff] [blame] | 3 | #ifndef DONT_HAVE_STDIO_H |
Guido van Rossum | 2fff2e6 | 1997-01-20 18:34:26 +0000 | [diff] [blame] | 4 | #include <stdio.h> |
Guido van Rossum | ff7e83d | 1999-08-27 20:39:37 +0000 | [diff] [blame] | 5 | #endif |
Guido van Rossum | 2fff2e6 | 1997-01-20 18:34:26 +0000 | [diff] [blame] | 6 | |
7 | #ifndef DATE | ||||
8 | #ifdef __DATE__ | ||||
9 | #define DATE __DATE__ | ||||
10 | #else | ||||
11 | #define DATE "xx/xx/xx" | ||||
12 | #endif | ||||
13 | #endif | ||||
14 | |||||
15 | #ifndef TIME | ||||
16 | #ifdef __TIME__ | ||||
17 | #define TIME __TIME__ | ||||
18 | #else | ||||
19 | #define TIME "xx:xx:xx" | ||||
20 | #endif | ||||
21 | #endif | ||||
22 | |||||
23 | #ifndef BUILD | ||||
24 | #define BUILD 0 | ||||
25 | #endif | ||||
26 | |||||
Guido van Rossum | 2fff2e6 | 1997-01-20 18:34:26 +0000 | [diff] [blame] | 27 | const char * |
Thomas Wouters | f3f33dc | 2000-07-21 06:00:07 +0000 | [diff] [blame] | 28 | Py_GetBuildInfo(void) |
Guido van Rossum | 2fff2e6 | 1997-01-20 18:34:26 +0000 | [diff] [blame] | 29 | { |
Guido van Rossum | 54ecc3d | 1999-01-27 17:53:11 +0000 | [diff] [blame] | 30 | static char buildinfo[50]; |
Tim Peters | 22a51ef | 2001-12-04 01:11:32 +0000 | [diff] [blame] | 31 | PyOS_snprintf(buildinfo, sizeof(buildinfo), |
32 | "#%d, %.20s, %.9s", BUILD, DATE, TIME); | ||||
Guido van Rossum | 2fff2e6 | 1997-01-20 18:34:26 +0000 | [diff] [blame] | 33 | return buildinfo; |
34 | } |