std.gregorian

negerns negerns at gmail.com
Sun May 16 09:37:41 PDT 2010


On 5/2/2010 9:38 AM, Andrei Alexandrescu wrote:
> I just committed a first draft of std.gregorian. The design and the code
> are copied from Jeff Garland's Boost date and time library. Once we get
> the library in shape and I discuss the matter with Jeff, I'll insert the
> proper attributions in the file.
>
> http://dsource.org/projects/phobos/browser/trunk/phobos/std/gregorian.d
>
> For the record I am stating that I have never looked at the Tango design
> or implementation of dates and times or in general.
>
> There's plenty more to do. It would be great if others could continue
> this work, to which I can't dedicate much more time. Until the ongoing
> issue finds a solution, only people who have not looked at Tango date
> and time should work on std.gregorian.
>
>
> Andrei

I got the following error messages. The file test.d is just

int main(string[] args) {
     return 0;
}

and gregorian.d is from the latest svn trunk.

Compile: dmd test.d gregorian.d

D:\projects\dmd\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25): 
Error: identifier 'siginfo_t' is not defined
D:\projects\dmd\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25): 
Error: siginfo_t is used as a type
D:\projects\dmd\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195): 
Error: identifier 'sigset_t' is not defined
D:\projects\dmd\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195): 
Error: sigset_t is used as a type

- siginfo_t is only for posix/linux; can't use it in windows.
- siginfo_t isn't really used by gregorian.d but the structure tm
   so i included the stdc.time module instead.

I modified gregorian.d and enclosed the import core.sys.posix.time 
within version statements.

version (Windows) {
     import core.stdc.time;
} else version (linux) {
     import core.sys.posix.time;
}


More information about the Digitalmars-d mailing list