Missing #include from glib/gwin32.c ?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing #include from glib/gwin32.c ?

John Emmas
I just updated glib (from git) and tried to build the glib-2-44 branch,
using MSVC8.  I'm getting a compiler error at line 568 which looks like
this:-

       typedef NTSTATUS fRtlGetVersion (PRTL_OSVERSIONINFOEXW);

Basically, my compiler doesn't recognise NTSTATUS.  If I substitute LONG
instead of NTSTATUS, everything builds okay, so I'm assuming there's a
missing #include.  I tried #including <ntstatus.h> and when that didn't
work, I tried #include <winnt.h> (but that didn't work either).

Can anyone advise me what needs to get #included in order for NTSTATUS
to get recognised?  Thanks.

John
P.S. I assume the same problem might also exist in 'master' although I
haven't had a chance to try that yet.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Missing #include from glib/gwin32.c ?

Victor Aurélio Santos

Apparently at ntdef.h, try that I didn't tested.

On Oct 16, 2015 10:23 AM, "John Emmas" <[hidden email]> wrote:
I just updated glib (from git) and tried to build the glib-2-44 branch, using MSVC8.  I'm getting a compiler error at line 568 which looks like this:-

      typedef NTSTATUS fRtlGetVersion (PRTL_OSVERSIONINFOEXW);

Basically, my compiler doesn't recognise NTSTATUS.  If I substitute LONG instead of NTSTATUS, everything builds okay, so I'm assuming there's a missing #include.  I tried #including <ntstatus.h> and when that didn't work, I tried #include <winnt.h> (but that didn't work either).

Can anyone advise me what needs to get #included in order for NTSTATUS to get recognised?  Thanks.

John
P.S. I assume the same problem might also exist in 'master' although I haven't had a chance to try that yet.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: Missing #include from glib/gwin32.c ?

John Emmas
On 16/10/2015 15:21, Victor Aurélio Santos wrote:
>
> Apparently at ntdef.h, try that I didn't tested.
>

Hi Victor and thanks for the quick reply.

I think ntdef.h might be MinGW specific (I can't find it in MSVC) but
after a bit of experimenting I found 4 other header files which fix the
problem (if I #include any of them).  The 2 most promising are probably:-

         #include <wincred.h>  -  or
         #include <winternl.h>

and these two also work:-

         #include <ntsecapi.h>  -  or
         #include <subauth.h>

Conversely of course, it's possible that some of those might be MSVC
specific and not applicable to MinGW!  Maybe Chun-wei Fan will be able
to help us if he's around later.  Thanks again.

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

回覆: Missing #include from glib/gwin32.c ?

Fan, Chun-wei
In reply to this post by John Emmas
Hi John,

Can I know what is the Windows SDK you are using?  Most probably the SDK you are using is too old.  If upgrading the SDK is not an option, you will have to define NTSTATUS as LONG (or let me know).

With blessings.

寄件者: [hidden email]
寄件日期: ‎2015/‎10/‎16 21:23
收件者: [hidden email]
主旨: Missing #include from glib/gwin32.c ?

I just updated glib (from git) and tried to build the glib-2-44 branch,
using MSVC8.  I'm getting a compiler error at line 568 which looks like
this:-

       typedef NTSTATUS fRtlGetVersion (PRTL_OSVERSIONINFOEXW);

Basically, my compiler doesn't recognise NTSTATUS.  If I substitute LONG
instead of NTSTATUS, everything builds okay, so I'm assuming there's a
missing #include.  I tried #including <ntstatus.h> and when that didn't
work, I tried #include <winnt.h> (but that didn't work either).

Can anyone advise me what needs to get #included in order for NTSTATUS
to get recognised?  Thanks.

John
P.S. I assume the same problem might also exist in 'master' although I
haven't had a chance to try that yet.
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

回覆: Missing #include from glib/gwin32.c ?

Fan, Chun-wei
In reply to this post by John Emmas
Hi John,

I think winternl.h is a good bet as well.  It is used elsewhere as well in the code.

With blessings.  Sorry for the noise from the earlier email.
---
Hi Victor,

Can you see whether winternl.h works for you?
---
With blessings, thank you.

寄件者: [hidden email]
寄件日期: ‎2015/‎10/‎16 22:59
副本: [hidden email]
主旨: Re: Missing #include from glib/gwin32.c ?

On 16/10/2015 15:21, Victor Aurélio Santos wrote:
>
> Apparently at ntdef.h, try that I didn't tested.
>

Hi Victor and thanks for the quick reply.

I think ntdef.h might be MinGW specific (I can't find it in MSVC) but
after a bit of experimenting I found 4 other header files which fix the
problem (if I #include any of them).  The 2 most promising are probably:-

         #include <wincred.h>  -  or
         #include <winternl.h>

and these two also work:-

         #include <ntsecapi.h>  -  or
         #include <subauth.h>

Conversely of course, it's possible that some of those might be MSVC
specific and not applicable to MinGW!  Maybe Chun-wei Fan will be able
to help us if he's around later.  Thanks again.

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: 回覆: Missing #include from glib/gwin32.c ?

John Emmas
Apologies if this comes through twice.  The original was sent around 30 hours ago and seems to have gotten lost somewhere...

On 18/10/2015 10:31, John Emmas wrote:
On 16/10/2015 16:07, Fan, Chun-wei wrote:

Hi Victor,

Can you see whether winternl.h works for you?
---
With blessings, thank you.



Just bumping this in case Victor didn't see it.

Chun-wei - if you add a #include for winternl.h I don't think you'll need it in master as well.  It only seems to be needed in the 'glib-2-44' branch AFAICT.  Hope I haven't missed something!

I can just add it locally if it causes any problems.  Thanks again.

John


_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: 回覆: Missing #include from glib/gwin32.c ?

Victor Aurélio Santos
On Monday, October 19, 2015 10:37:35 AM BRT, John Emmas wrote:

> Apologies if this comes through twice.  The original was sent
> around 30 hours ago and seems to have gotten lost somewhere...
>
> On 18/10/2015 10:31, John Emmas wrote:
> On 16/10/2015 16:07, Fan, Chun-wei wrote:
>
> Hi Victor,
>
> Can you see whether winternl.h works for you?
> ---
> With blessings, thank you.
>
>
> Just bumping this in case Victor didn't see it.
>
> Chun-wei - if you add a #include for winternl.h I don't think
> you'll need it in master as well.  It only seems to be needed in
> the 'glib-2-44' branch AFAICT.  Hope I haven't missed something!
>
> I can just add it locally if it causes any problems.  Thanks again.
>
> John
>
>

Sorry I didn't see.

I don't have a windows environment to test this, sorry :(

I've done only a search at M$ documentation.

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list