# HG changeset patch # User Tomas Lindquist Olsen # Date 1235654598 -3600 # Node ID 2137797748a8aed390bb1431a946ff4e2dc4cb6e # Parent 420ef073448d5fda4b284dff7eabab5d65328880 oups, seems like I broke some constness in D1 last commit, compiles again! diff -r 420ef073448d -r 2137797748a8 dmd/cond.c --- a/dmd/cond.c Thu Feb 26 14:13:27 2009 +0100 +++ b/dmd/cond.c Thu Feb 26 14:23:18 2009 +0100 @@ -71,11 +71,11 @@ global.params.debuglevel = level; } -void DebugCondition::addGlobalIdent(char *ident) +void DebugCondition::addGlobalIdent(const char *ident) { if (!global.params.debugids) global.params.debugids = new Array(); - global.params.debugids->push(ident); + global.params.debugids->push((void*)ident); } @@ -123,7 +123,7 @@ global.params.versionlevel = level; } -void VersionCondition::checkPredefined(Loc loc, char *ident) +void VersionCondition::checkPredefined(Loc loc, const char *ident) { static const char* reserved[] = { @@ -151,17 +151,17 @@ error(loc, "version identifier '%s' is reserved and cannot be set", ident); } -void VersionCondition::addGlobalIdent(char *ident) +void VersionCondition::addGlobalIdent(const char *ident) { checkPredefined(0, ident); addPredefinedGlobalIdent(ident); } -void VersionCondition::addPredefinedGlobalIdent(char *ident) +void VersionCondition::addPredefinedGlobalIdent(const char *ident) { if (!global.params.versionids) global.params.versionids = new Array(); - global.params.versionids->push(ident); + global.params.versionids->push((void*)ident); } diff -r 420ef073448d -r 2137797748a8 dmd/inifile.c --- a/dmd/inifile.c Thu Feb 26 14:13:27 2009 +0100 +++ b/dmd/inifile.c Thu Feb 26 14:23:18 2009 +0100 @@ -50,7 +50,7 @@ void inifile(char *argv0, const char *inifile) { char *path; // need path for @P macro - char *filename; + const char *filename; OutBuffer buf; int i; int k; @@ -80,7 +80,7 @@ filename = FileName::combine(getenv("HOME"), inifile); if (!FileName::exists(filename)) { - filename = FileName::replaceName(argv0, inifile); + filename = FileName::replaceName(argv0, (char*)inifile); if (!FileName::exists(filename)) { #if POSIX @@ -112,7 +112,7 @@ filename = FileName::searchPath(paths, argv0, 0); if (!filename) goto Letc; // argv0 not found on path - filename = FileName::replaceName(filename, inifile); + filename = FileName::replaceName((char*)filename, (char*)inifile); if (FileName::exists(filename)) goto Ldone; #endif @@ -132,7 +132,7 @@ printf("\tpath = '%s', filename = '%s'\n", path, filename); #endif - File file(filename); + File file((char*)filename); if (file.read()) return; // error reading file