getbuildinfo.c 483 Bytes
Newer Older
1
#include "Python.h"
2

3
#ifndef DONT_HAVE_STDIO_H
4
#include <stdio.h>
5
#endif
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27

#ifndef DATE
#ifdef __DATE__
#define DATE __DATE__
#else
#define DATE "xx/xx/xx"
#endif
#endif

#ifndef TIME
#ifdef __TIME__
#define TIME __TIME__
#else
#define TIME "xx:xx:xx"
#endif
#endif

#ifndef BUILD
#define BUILD 0
#endif

const char *
28
Py_GetBuildInfo(void)
29
{
30
	static char buildinfo[50];
31 32
	PyOS_snprintf(buildinfo, sizeof(buildinfo),
		      "#%d, %.20s, %.9s", BUILD, DATE, TIME);
33 34
	return buildinfo;
}