forked from pool/schismtracker
47 lines
1.6 KiB
Diff
47 lines
1.6 KiB
Diff
|
From: Jan Engelhardt <jengelh@medozas.de>
|
||
|
Upstream: never
|
||
|
|
||
|
Replace __DATE__ and __TIME__ with static text.
|
||
|
|
||
|
Note: rpmlint will still complain when the static date that was
|
||
|
encoded happens to be the current day. That is ok, since rpmlint
|
||
|
uses just a heuristic - excessive rebuilds should not actually
|
||
|
be happening.
|
||
|
---
|
||
|
schism/version.c | 8 ++++++--
|
||
|
1 file changed, 6 insertions(+), 2 deletions(-)
|
||
|
|
||
|
Index: schismtracker/schism/version.c
|
||
|
===================================================================
|
||
|
--- schismtracker.orig/schism/version.c
|
||
|
+++ schismtracker/schism/version.c
|
||
|
@@ -100,6 +100,10 @@ Note: this is a hack, it'd be great to h
|
||
|
Fortunately, most of this should be able to be optimized down to static assignment.
|
||
|
*/
|
||
|
|
||
|
+/* update whenever you checkout */
|
||
|
+#define __HG_DATE__ "Apr 9 2011"
|
||
|
+#define __HG_TIME__ "00:00:00" /* screw this */
|
||
|
+
|
||
|
static int get_version_tm(struct tm *version)
|
||
|
{
|
||
|
char *ret;
|
||
|
@@ -119,7 +123,7 @@ static int get_version_tm(struct tm *ver
|
||
|
return 1;
|
||
|
/* Argh. */
|
||
|
memset(version, 0, sizeof(*version));
|
||
|
- ret = strptime(__DATE__, "%b %e %Y", version);
|
||
|
+ ret = strptime(__HG_DATE__, "%b %e %Y", version);
|
||
|
if (ret && !*ret)
|
||
|
return 1;
|
||
|
/* Give up; we don't know anything. */
|
||
|
@@ -152,7 +156,7 @@ void ver_init(void)
|
||
|
#endif
|
||
|
snprintf(top_banner_normal, sizeof(top_banner_normal) - 1,
|
||
|
"Schism Tracker %s built %s %s",
|
||
|
- ver, __DATE__, __TIME__);
|
||
|
+ ver, __HG_DATE__, __HG_TIME__);
|
||
|
top_banner_normal[sizeof(top_banner_normal) - 1] = '\0'; /* to be sure */
|
||
|
}
|
||
|
|