[Issue 5243] dmd -run potentially removes user files

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Jan 7 12:31:43 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=5243



--- Comment #3 from Andrej Mitrovic <andrej.mitrovich at gmail.com> 2013-01-07 12:31:42 PST ---
(In reply to comment #2)
> Can you convert this into a pull request? It will make reviewing more easy.

I'll do it later tonight.

> All your changes are POSIX only, is the overwriting not happening on Windows?

No because executables on win32 always end with .exe. Even if you do "dmd
-oftest", DMD will still append an .exe .

> Finally, any reason for declaring getuid() manually instead of including the
> appropriate headers?

The DMC header is unistd.h, but the front-end is also used by GDC and LDC, I
don't know which headers they use for this function. It seemed easiest to just
declare the function rather than to include an entire header (remember that
includes are costly for compile-times in C++).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list