Fixed some funny linking.

This commit is contained in:
n-a-c-h
2006-02-14 04:17:46 +00:00
parent cc817214f4
commit 21b52de1fd

View File

@@ -3140,26 +3140,25 @@ int CheckBatteryPercent()
return((SysPowerStat.BatteryLifePercent == 255) ? -1 : SysPowerStat.BatteryLifePercent); return((SysPowerStat.BatteryLifePercent == 255) ? -1 : SysPowerStat.BatteryLifePercent);
} }
extern "C" { extern "C" unsigned int PrevBuildNum;
extern unsigned int PrevBuildNum; extern "C" char *VERSION_STR;
char *VERSION_STR;
void placedate();
void placetime();
}
void DisplayWIPDisclaimer() void DisplayWIPDisclaimer()
{ {
void placedate();
void placetime();
// This stupid function calculates a build hash based on the build date // This stupid function calculates a build hash based on the build date
unsigned int ver_len = sizeof(__DATE__) + sizeof(__TIME__) + 10; //+10 because some names are longer than others unsigned int ver_len = sizeof(__DATE__) + sizeof(__TIME__) + 10; //+10 because some names are longer than others
VERSION_STR = new char[ver_len]; VERSION_STR = (char *)malloc(ver_len);
*VERSION_STR = 0; *VERSION_STR = 0;
placedate(); placedate();
placetime(); placetime();
unsigned int CurrentBuildNum = ~crc32(0, (const unsigned char *)VERSION_STR, ver_len); unsigned int CurrentBuildNum = ~crc32(0, (const unsigned char *)VERSION_STR, ver_len);
delete[] VERSION_STR; free(VERSION_STR);
if (CurrentBuildNum != PrevBuildNum) if (CurrentBuildNum != PrevBuildNum)
{ {