blob: b541bb64c8f4b63d212f533479a21f69a2dde6ce [file] [log] [blame]
Tim Peters22a51ef2001-12-04 01:11:32 +00001#include "Python.h"
Guido van Rossum49bff651997-05-20 22:40:26 +00002
Guido van Rossumff7e83d1999-08-27 20:39:37 +00003#ifndef DONT_HAVE_STDIO_H
Guido van Rossum2fff2e61997-01-20 18:34:26 +00004#include <stdio.h>
Guido van Rossumff7e83d1999-08-27 20:39:37 +00005#endif
Guido van Rossum2fff2e61997-01-20 18:34:26 +00006
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 Rossum2fff2e61997-01-20 18:34:26 +000027const char *
Thomas Woutersf3f33dc2000-07-21 06:00:07 +000028Py_GetBuildInfo(void)
Guido van Rossum2fff2e61997-01-20 18:34:26 +000029{
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000030 static char buildinfo[50];
Tim Peters22a51ef2001-12-04 01:11:32 +000031 PyOS_snprintf(buildinfo, sizeof(buildinfo),
32 "#%d, %.20s, %.9s", BUILD, DATE, TIME);
Guido van Rossum2fff2e61997-01-20 18:34:26 +000033 return buildinfo;
34}