-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build 'make' with dmd 2.080.0 #5
Comments
It hasn't been ported to 64 bits or systems other than Win32 yet. |
Oh I see. Thanks |
It's still a bug, just not in the Win32 version. I should fix it. |
Yeah I actually fixed all the errors before opening this issue. But it did not work anyway so I report the 'original' problem. FYI, this is what I changed on my local repo, keeping the spirit of "recreate first, optimize later": diff --git a/dm/src/make/dmake.d b/dm/src/make/dmake.d
index fb858e7..6f438c5 100644
--- a/dm/src/make/dmake.d
+++ b/dm/src/make/dmake.d
@@ -913,7 +913,7 @@ int readline(FILE *f)
do
{
L0:
- while (TRUE)
+ while (true)
{
if (i >= bufmax)
{ bufmax += 100;
@@ -1085,13 +1085,13 @@ char *expandline(char *buf)
buf[p] = 0;
text = searchformacro(buf + b);
buf[p] = c;
- textlen = strlen(text);
+ textlen = cast(uint)strlen(text);
/* If replacement text exactly matches macro call, skip expansion */
if (textlen == t - i && strncmp(text,buf + i,t - i) == 0)
i = t;
else
{
- buflen = strlen(buf);
+ buflen = cast(uint)strlen(buf);
buf = cast(char*)mem_realloc(buf,buflen + textlen + 1);
memmove(buf + i + textlen,buf + t,buflen + 1 - t);
memmove(buf + i,text,textlen);
@@ -1228,7 +1228,7 @@ int ispchar(char c)
char *filespecforceext(char* name, char* ext)
{ char* newname,p;
- newname = cast(char*)mem_calloc(strlen(name) + strlen(ext) + 1 + 1);
+ newname = cast(char*)mem_calloc(cast(uint)(strlen(name) + strlen(ext) + 1 + 1));
strcpy(newname,name);
p = filespecdotext(newname);
*p++ = '.';
@@ -1773,7 +1773,7 @@ void *mem_realloc(void *oldbuf,uint newbufsize)
char *mem_strdup(const char *s)
{
- return strcpy(cast(char*)mem_calloc(strlen(s) + 1),s);
+ return strcpy(cast(char*)mem_calloc(cast(uint)(strlen(s) + 1)),s);
}
}
And compile:
|
The text was updated successfully, but these errors were encountered: