www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - siginfo_t not defined

reply negerns <negerns gmail.com> writes:
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\
osix\signal.d(195): 
Error: identifier 'sigset_t' is not defined
D:\projects\dmd\dmd2\windows\bin\..\..\src\druntime\import\core\sys\
osix\signal.d(195): 
Error: sigset_t is used as a type
May 16 2010
parent reply negerns <negerns gmail.com> writes:
Why is the definition of 'siginfo_t' in 
druntime\import\core\sys\posix\signal.d commented out?
BTW, I'm using dmd 2.046 on windows vista 32-bit.
May 16 2010
parent negerns <negerns gmail.com> writes:
On 5/16/2010 10:46 PM, negerns wrote:
 Why is the definition of 'siginfo_t' in
 druntime\import\core\sys\posix\signal.d commented out?
 BTW, I'm using dmd 2.046 on windows vista 32-bit.

- 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; } I don't get the errors anymore. It's time to play with the gregorian module :)
May 16 2010