Thread overview
[phobos] Bug somewhere in core.posix.sys.time
May 22, 2010
Masahiro Nakagawa
May 22, 2010
Sean Kelly
May 23, 2010
Walter Bright
May 23, 2010
Sean Kelly
May 23, 2010
Walter Bright
May 22, 2010
I tried to build the HTML documentation with

make html

and got:

wine dmd -version=ddoc -d -c -o- ../docsrc/std.ddoc
-Df../web/2.0/phobos/std_gregorian.html std/gregorian.d
Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25):
Error: identifier 'siginfo_t' is not defined
Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25):
Error: siginfo_t is used as a type
Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
Error: identifier 'sigset_t' is not defined
Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
Error: sigset_t is used as a type
Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
Error: variable core.sys.posix.signal.sigaction_t.sa_mask voids have no
value
make: *** [../web/2.0/phobos/std_gregorian.html] Error 1

I reduced the problem down to this definition of std.gregorian (which is the culprit):

module std.gregorian;
import core.sys.posix.time;

So the problem is core.sys.posix.time. Since that contains "posix" in its name, does that imply it's not working on Windows? If so, you may want to insert a pragma error on version windows that leaves a nice error message behind.

Is that possible?


Andrei
May 23, 2010
This problem has been reported in d.learn.

http://lists.puremagic.com/pipermail/digitalmars-d-learn/2010-May/017087.html

Other modules also have same problem(e.g. core.sys.posix.pthread, std.windows.*).


On Sun, 23 May 2010 02:45:38 +0900, Andrei Alexandrescu <andrei at erdani.com> wrote:

> I tried to build the HTML documentation with
>
> make html
>
> and got:
>
> wine dmd -version=ddoc -d -c -o- ../docsrc/std.ddoc
> -Df../web/2.0/phobos/std_gregorian.html std/gregorian.d
> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25):
> Error: identifier 'siginfo_t' is not defined
> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25):
> Error: siginfo_t is used as a type
> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
> Error: identifier 'sigset_t' is not defined
> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
> Error: sigset_t is used as a type
> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
> Error: variable core.sys.posix.signal.sigaction_t.sa_mask voids have no
> value
> make: *** [../web/2.0/phobos/std_gregorian.html] Error 1
>
> I reduced the problem down to this definition of std.gregorian (which is the culprit):
>
> module std.gregorian;
> import core.sys.posix.time;
>
> So the problem is core.sys.posix.time. Since that contains "posix" in its name, does that imply it's not working on Windows? If so, you may want to insert a pragma error on version windows that leaves a nice error message behind.
>
> Is that possible?
>

Some posix modules may work on Windows if user uses INTERIX(I didn't try). So, I think module selection using version statement on user side is better than pragma insertion to each modules.
May 22, 2010
OK, I just fixed that.

Andrei

On 05/22/2010 03:00 PM, Masahiro Nakagawa wrote:
> This problem has been reported in d.learn.
>
> http://lists.puremagic.com/pipermail/digitalmars-d-learn/2010-May/017087.html
>
>
> Other modules also have same problem(e.g. core.sys.posix.pthread,
> std.windows.*).
>
>
> On Sun, 23 May 2010 02:45:38 +0900, Andrei Alexandrescu <andrei at erdani.com> wrote:
>
>> I tried to build the HTML documentation with
>>
>> make html
>>
>> and got:
>>
>> wine dmd -version=ddoc -d -c -o- ../docsrc/std.ddoc
>> -Df../web/2.0/phobos/std_gregorian.html std/gregorian.d
>> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25):
>> Error: identifier 'siginfo_t' is not defined
>> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(25):
>> Error: siginfo_t is used as a type
>> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
>> Error: identifier 'sigset_t' is not defined
>> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
>> Error: sigset_t is used as a type
>> Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys\posix\signal.d(195):
>> Error: variable core.sys.posix.signal.sigaction_t.sa_mask voids have
>> no value
>> make: *** [../web/2.0/phobos/std_gregorian.html] Error 1
>>
>> I reduced the problem down to this definition of std.gregorian (which
>> is the culprit):
>>
>> module std.gregorian;
>> import core.sys.posix.time;
>>
>> So the problem is core.sys.posix.time. Since that contains "posix" in its name, does that imply it's not working on Windows? If so, you may want to insert a pragma error on version windows that leaves a nice error message behind.
>>
>> Is that possible?
>>
>
> Some posix modules may work on Windows if user uses INTERIX(I didn't try).
> So, I think module selection using version statement on user side is
> better than pragma insertion to each modules.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
May 22, 2010
Windows is ostensibly posix-compliant, Ive just not bothered to add the defs.  The Windows posix subsystem ducks enough that there's really little point.

Sent from my iPhone

On May 22, 2010, at 10:45 AM, Andrei Alexandrescu <andrei at erdani.com> wrote:

> I tried to build the HTML documentation with
>
> make html
>
> and got:
>
> wine dmd -version=ddoc -d -c -o- ../docsrc/std.ddoc -Df../web/2.0/ phobos/std_gregorian.html std/gregorian.d Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys \posix\signal.d(25): Error: identifier 'siginfo_t' is not defined Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys \posix\signal.d(25): Error: siginfo_t is used as a type Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys \posix\signal.d(195): Error: identifier 'sigset_t' is not defined Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys \posix\signal.d(195): Error: sigset_t is used as a type Z:\home\andrei\dmd2\windows\bin\..\..\src\druntime\import\core\sys \posix\signal.d(195): Error: variable core.sys.posix.signal.sigaction_t.sa_mask voids have no value make: *** [../web/2.0/phobos/std_gregorian.html] Error 1
>
> I reduced the problem down to this definition of std.gregorian (which is the culprit):
>
> module std.gregorian;
> import core.sys.posix.time;
>
> So the problem is core.sys.posix.time. Since that contains "posix" in its name, does that imply it's not working on Windows? If so, you may want to insert a pragma error on version windows that leaves a nice error message behind.
>
> Is that possible?
>
>
> Andrei
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
May 22, 2010

Sean Kelly wrote:
> Windows is ostensibly posix-compliant, Ive just not bothered to add the defs.  The Windows posix subsystem ducks enough that there's really little point.
>

The Windows posix subsystem is a kludge and an extra dll, and is often treated as a poor step-daughter by Microsoft. I strongly suggest we stay away from it. Phobos should use the native Windows APIs. I also do not want to encourage its use by providing a set of posix declarations for Windows as part of Phobos.
May 22, 2010
Agreed.  I actually tried porting a large Unix app (Solaris/Linux) to Microsoft SUA once.  Simply getting it to build was a huge hassle and making it run correctly would have taken a bunch of recoding.  Between that and the abysmal command interface I really don't understand why MS bothers to maintain the thing at all.  Hm... what about Cygwin?  I suppose that might be another Windows/Posix platform?  Or is the OS "Cygwin" in that case?

On May 22, 2010, at 5:04 PM, Walter Bright wrote:
> 
> Sean Kelly wrote:
>> Windows is ostensibly posix-compliant, Ive just not bothered to add the defs.  The Windows posix subsystem ducks enough that there's really little point.
>> 
> 
> The Windows posix subsystem is a kludge and an extra dll, and is often treated as a poor step-daughter by Microsoft. I strongly suggest we stay away from it. Phobos should use the native Windows APIs. I also do not want to encourage its use by providing a set of posix declarations for Windows as part of Phobos.
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos

May 22, 2010
Phobos should not in any way require or rely on Cygwin, for a long list of reasons.

Sean Kelly wrote:
> Agreed.  I actually tried porting a large Unix app (Solaris/Linux) to Microsoft SUA once.  Simply getting it to build was a huge hassle and making it run correctly would have taken a bunch of recoding.  Between that and the abysmal command interface I really don't understand why MS bothers to maintain the thing at all.  Hm... what about Cygwin?  I suppose that might be another Windows/Posix platform?  Or is the OS "Cygwin" in that case?
>
> On May 22, 2010, at 5:04 PM, Walter Bright wrote:
> 
>> Sean Kelly wrote:
>> 
>>> Windows is ostensibly posix-compliant, Ive just not bothered to add the defs.  The Windows posix subsystem ducks enough that there's really little point.
>>>
>>> 
>> The Windows posix subsystem is a kludge and an extra dll, and is often treated as a poor step-daughter by Microsoft. I strongly suggest we stay away from it. Phobos should use the native Windows APIs. I also do not want to encourage its use by providing a set of posix declarations for Windows as part of Phobos.
>> _______________________________________________
>> phobos mailing list
>> phobos at puremagic.com
>> http://lists.puremagic.com/mailman/listinfo/phobos
>> 
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos
>
>
>