Giter VIP home page Giter VIP logo

Comments (4)

WalterBright avatar WalterBright commented on July 4, 2024

It hasn't been ported to 64 bits or systems other than Win32 yet.

from compiler.

biocyberman avatar biocyberman commented on July 4, 2024

Oh I see. Thanks

from compiler.

WalterBright avatar WalterBright commented on July 4, 2024

It's still a bug, just not in the Win32 version. I should fix it.

from compiler.

biocyberman avatar biocyberman commented on July 4, 2024

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:

dmd dmake dman -O -release -betterC -I.
dmake.o: In function `main':
dman.d:(.text.main[main]+0xc1): undefined reference to `RESPONSE_EXPAND'
dmake.o: In function `builtin_del':
dman.d:(.text.builtin_del[builtin_del]+0x74): undefined reference to `findfirst'
dman.d:(.text.builtin_del[builtin_del]+0x8a): undefined reference to `findnext'
dmake.o: In function `executerule':
dman.d:(.text.executerule[executerule]+0xfb): undefined reference to `spawnlp'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

findfirst and findnext have not been implemented.

from compiler.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.