View mode: basic / threaded / horizontal-split · Log in · Help
September 21, 2006
Re: Build v3.03 released
On Thu, 21 Sep 2006 11:44:08 -0700, Gregor Richards wrote:

> In util/fdt.d, the section:
> 
>      version(Windows) static import opsys = std.c.windows.windows;
>      version(linux)   static import opsys = std.c.linux.linux;
>      version(darwin)  static import opsys = std.c.darwin.darwin;
>      version(Unix)    static import opsys = std.c.unix;
>      version(Posix)   static import std.string;
> 
> needs to become:
> 
>      version(Windows) static import opsys = std.c.windows.windows;
>      else version(linux)   static import opsys = std.c.linux.linux;
>      else version(darwin)  static import opsys = std.c.darwin.darwin;
>      else version(Unix)    static import opsys = std.c.unix;
>      else version(Posix)   static import std.string;
> 
> This is because the different platforms aren't mutually exclusive, so 
> it'll end up importing two modules as opsys, oops :(

Hmmm...I'll have to check this out a bit more. They ought to be mutually
exclusive, IMHO.

-- 
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"
September 21, 2006
Re: Build v3.03 released
On Thu, 21 Sep 2006 13:24:33 -0400, dickl wrote:


> 
> Sorry to say, 3.03 is messed up for Windows builds.

Damn! So am I! I forgot to retest this. 

> In the linker .rsp file, the libraries are placed on separate lines. 
> Optlink wants all the libraries on 1 line with '+' between the lib names.

A quick fix would be to replace lines 1079-1082  in build.d with ...

                       lCommandLine ~= vLinkLibSwitch ~
util.str.enquote(lLib) ~ vArgFileDelim;
                   }
               }
               lCommandLine ~= "\n";
I think this will work but I haven't tested it yet. I'll do that later
today.

-- 
Derek Parnell
Melbourne, Australia
"Down with mediocrity!"
September 21, 2006
Re: Build v3.03 released
Derek Parnell wrote:
> On Thu, 21 Sep 2006 11:44:08 -0700, Gregor Richards wrote:
> 
>> In util/fdt.d, the section:
>>
>>      version(Windows) static import opsys = std.c.windows.windows;
>>      version(linux)   static import opsys = std.c.linux.linux;
>>      version(darwin)  static import opsys = std.c.darwin.darwin;
>>      version(Unix)    static import opsys = std.c.unix;
>>      version(Posix)   static import std.string;
>>
>> needs to become:
>>
>>      version(Windows) static import opsys = std.c.windows.windows;
>>      else version(linux)   static import opsys = std.c.linux.linux;
>>      else version(darwin)  static import opsys = std.c.darwin.darwin;
>>      else version(Unix)    static import opsys = std.c.unix;
>>      else version(Posix)   static import std.string;
>>
>> This is because the different platforms aren't mutually exclusive, so 
>> it'll end up importing two modules as opsys, oops :(
> 
> Hmmm...I'll have to check this out a bit more. They ought to be mutually
> exclusive, IMHO.
> 

GNU/Linux on gdc is version(linux), version(Unix) and version(Posix). 
Mac OS X is version(darwin), version(Unix) and version(Posix).

 - Gregor Richards
September 21, 2006
Re: Build v3.03 released
Gregor Richards wrote:
> 
> GNU/Linux on gdc is version(linux), version(Unix) and version(Posix). 
> Mac OS X is version(darwin), version(Unix) and version(Posix).
> 
>  - Gregor Richards

Hmm, what does Mac OS X have to do with darwin and Unix?
September 22, 2006
Re: Build v3.03 released
Hasan Aljudy wrote:
> 
> 
> Gregor Richards wrote:
> 
>>
>> GNU/Linux on gdc is version(linux), version(Unix) and version(Posix). 
>> Mac OS X is version(darwin), version(Unix) and version(Posix).
>>
>>  - Gregor Richards
> 
> 
> Hmm, what does Mac OS X have to do with darwin and Unix?

... Mac OS X is Darwin.  Darwin is Unix.

 - Gregor Richards

PS: Actually, it would be reasonable to remove version(Unix) from 
GNU/Linux, as GNU's Not Unix, but Mac OS X most certainly is.
September 22, 2006
Re: Build v3.03 released
Gregor Richards wrote:
> Hasan Aljudy wrote:
>>
>>
>> Gregor Richards wrote:
>>
>>>
>>> GNU/Linux on gdc is version(linux), version(Unix) and version(Posix). 
>>> Mac OS X is version(darwin), version(Unix) and version(Posix).
>>>
>>>  - Gregor Richards
>>
>>
>> Hmm, what does Mac OS X have to do with darwin and Unix?
> 
> ... Mac OS X is Darwin.  Darwin is Unix.

Ah! Really?
I thought darwin was just another linux distribution! hahaha!

> 
>  - Gregor Richards
> 
> PS: Actually, it would be reasonable to remove version(Unix) from 
> GNU/Linux, as GNU's Not Unix, but Mac OS X most certainly is.

OK, is it "Darwin is Unix" or is it "Darwin is *a* Unix"?
Sorry, I don't understand the Unix/Linux/GNU world. <g>
September 22, 2006
Re: Build v3.03 released
Hasan Aljudy wrote:
> 
> 
> Gregor Richards wrote:
> 
>> Hasan Aljudy wrote:
>>
>>>
>>>
>>> Gregor Richards wrote:
>>>
>>>>
>>>> GNU/Linux on gdc is version(linux), version(Unix) and 
>>>> version(Posix). Mac OS X is version(darwin), version(Unix) and 
>>>> version(Posix).
>>>>
>>>>  - Gregor Richards
>>>
>>>
>>>
>>> Hmm, what does Mac OS X have to do with darwin and Unix?
>>
>>
>> ... Mac OS X is Darwin.  Darwin is Unix.
> 
> 
> Ah! Really?
> I thought darwin was just another linux distribution! hahaha!
> 
>>
>>  - Gregor Richards
>>
>> PS: Actually, it would be reasonable to remove version(Unix) from 
>> GNU/Linux, as GNU's Not Unix, but Mac OS X most certainly is.
> 
> 
> OK, is it "Darwin is Unix" or is it "Darwin is *a* Unix"?
> Sorry, I don't understand the Unix/Linux/GNU world. <g>

Unix is an entire tree of operating systems, so it would be reasonable 
to say "Darwin is *a* Unix".  Darwin is a Unix because, if you trace 
back its lineage, it has its roots in the original Unixes (SysVR4, BSD, 
etc).

And the reason that linux is marked as a Unix is being linux works very 
much like a Unix, even though it's not actually based in code on Unix at 
all.  So while it's technically not a Unix, it acts like one.  More so 
than Mac OS X, actually ;)

 - Gregor Richards
September 22, 2006
Re: Build v3.03 released
That won't quite work, it leaves a trailing '+' which the linker doesn't 
like. The change needs to be something like this

   if (lLibraryFiles.length > 0)
   {
       foreach( char[] lLib; lLibraryFiles)
       {
           lLib =  std.path.addExt(lLib, vLibExtention);
           lCommandLine ~= vLinkLibSwitch ~ util.str.enquote(lLib) ~ 
vArgFileDelim;
       }
       lCommandLine.length = lCommandLine.length -1;
    }
    lCommandLine ~= "\n";


Derek Parnell wrote:
> On Thu, 21 Sep 2006 13:24:33 -0400, dickl wrote:
> 
> 
>> Sorry to say, 3.03 is messed up for Windows builds.
> 
> Damn! So am I! I forgot to retest this. 
>  
>> In the linker .rsp file, the libraries are placed on separate lines. 
>> Optlink wants all the libraries on 1 line with '+' between the lib names.
> 
> A quick fix would be to replace lines 1079-1082  in build.d with ...
> 
>                         lCommandLine ~= vLinkLibSwitch ~
> util.str.enquote(lLib) ~ vArgFileDelim;
>                     }
>                 }
>                 lCommandLine ~= "\n";
> I think this will work but I haven't tested it yet. I'll do that later
> today.
>
September 22, 2006
Re: Build v3.03 released
On Thu, 21 Sep 2006 22:17:57 -0400, dickl wrote:

> That won't quite work, it leaves a trailing '+' which the linker doesn't 
> like.

LOL. Yeah, I found that out in my testing.

Here is the code I ended up using....

               lLibraryFiles = vDefaultLibs ~ lLibraryFiles;
               if (lLibraryFiles.length > 0)
               {
                   foreach( int i, char[] lLib; lLibraryFiles)
                   {
                       lLib =  std.path.addExt(lLib, vLibExtention);
                       if (i > 0)
                           lCommandLine ~= vArgFileDelim;
                       lCommandLine ~= vLinkLibSwitch ~
                                       util.str.enquote(lLib);
                   }
               }
               lCommandLine ~= "\n";

This caters for situations where the 'vArgFileDelim' is longer than one
character.

-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
"Down with mediocrity!"
22/09/2006 2:18:58 PM
September 22, 2006
Re: Build v3.03 released
Gregor Richards wrote:
> And the reason that linux is marked as a Unix is being linux works very
> much like a Unix, even though it's not actually based in code on Unix at
> all.  So while it's technically not a Unix, it acts like one.  More so
> than Mac OS X, actually ;)

And if a Linux-user even considered mentioning Linux and Unix (I mean
*nix :) in the same sentence, SCO would immediately sue them all for
infringing their copyrights/trademarks/patents/etc.

BTW, the patent trolls are again trying to ram through software patents
here in EU. It seems they'll never stop until they get that stupid law.

-- 
Jari-Matti
1 2 3
Top | Discussion index | About this forum | D home