* w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin
@ 2012-10-20 13:12 Christian Franke
2012-10-20 16:20 ` JonY
0 siblings, 1 reply; 5+ messages in thread
From: Christian Franke @ 2012-10-20 13:12 UTC (permalink / raw)
To: cygwin
Just for Info:
The new /usr/include/w32api/windef.h does no longer define _WIN32.
This may require compile fixes for some sources which check only for
_WIN32 and not for __CYGWIN__ after windows.h is included.
Christian
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin
2012-10-20 13:12 w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin Christian Franke
@ 2012-10-20 16:20 ` JonY
2012-10-20 16:56 ` Kai Tietz
0 siblings, 1 reply; 5+ messages in thread
From: JonY @ 2012-10-20 16:20 UTC (permalink / raw)
To: cygwin; +Cc: Kai Tietz
[-- Attachment #1: Type: text/plain, Size: 601 bytes --]
On 10/20/2012 21:12, Christian Franke wrote:
> Just for Info:
>
> The new /usr/include/w32api/windef.h does no longer define _WIN32.
>
> This may require compile fixes for some sources which check only for
> _WIN32 and not for __CYGWIN__ after windows.h is included.
>
> Christian
I can't imagine why you'd include windows.h and then check for _WIN32
after the fact, but I still think mixing win32 calls and Cygwin calls is
a bad idea, except for a few special cases.
Anyway, I'll leave it to Kai to decide if it should be done, as I'm not
sure if this request is proper.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin
2012-10-20 16:20 ` JonY
@ 2012-10-20 16:56 ` Kai Tietz
2012-10-20 17:32 ` Christian Franke
0 siblings, 1 reply; 5+ messages in thread
From: Kai Tietz @ 2012-10-20 16:56 UTC (permalink / raw)
To: JonY; +Cc: cygwin
2012/10/20 JonY wrote:
> On 10/20/2012 21:12, Christian Franke wrote:
>> Just for Info:
>>
>> The new /usr/include/w32api/windef.h does no longer define _WIN32.
>>
>> This may require compile fixes for some sources which check only for
>> _WIN32 and not for __CYGWIN__ after windows.h is included.
>>
>> Christian
>
> I can't imagine why you'd include windows.h and then check for _WIN32
> after the fact, but I still think mixing win32 calls and Cygwin calls is
> a bad idea, except for a few special cases.
>
> Anyway, I'll leave it to Kai to decide if it should be done, as I'm not
> sure if this request is proper.
That we don't define _WIN32 - actual we do internally but don't show
it to includer - is done by intention. Actual Corinna and I decided
that this behavior is for cygwin the desired.
If you need to define _WIN32 then please do it within your
source-file, but don't expect that it gets defined for you by some
psdk-headers.
Kai
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin
2012-10-20 16:56 ` Kai Tietz
@ 2012-10-20 17:32 ` Christian Franke
2012-10-21 1:25 ` JonY
0 siblings, 1 reply; 5+ messages in thread
From: Christian Franke @ 2012-10-20 17:32 UTC (permalink / raw)
To: cygwin
Kai Tietz wrote:
> 2012/10/20 JonY wrote:
>> On 10/20/2012 21:12, Christian Franke wrote:
>>> Just for Info:
>>>
>>> The new /usr/include/w32api/windef.h does no longer define _WIN32.
>>>
>>> This may require compile fixes for some sources which check only for
>>> _WIN32 and not for __CYGWIN__ after windows.h is included.
>>>
>>> Christian
>> I can't imagine why you'd include windows.h and then check for _WIN32
>> after the fact, but I still think mixing win32 calls and Cygwin calls is
>> a bad idea, except for a few special cases.
>>
>> Anyway, I'll leave it to Kai to decide if it should be done, as I'm not
>> sure if this request is proper.
> That we don't define _WIN32 - actual we do internally but don't show
> it to includer - is done by intention. Actual Corinna and I decided
> that this behavior is for cygwin the desired.
For the long term, it was IMO a good decision to change (fix) the old
behavior.
For now, some (trivial) fixes to existing code may be required. I built
the smartmontools-6.0-1 Cygwin package a few hours before the new
headers were uploaded. Build from source package does no longer work
with new headers (unfortunately the foreign CSMI include file requires
_WIN32).
Christian
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin
2012-10-20 17:32 ` Christian Franke
@ 2012-10-21 1:25 ` JonY
0 siblings, 0 replies; 5+ messages in thread
From: JonY @ 2012-10-21 1:25 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1444 bytes --]
On 10/21/2012 01:31, Christian Franke wrote:
> Kai Tietz wrote:
>> 2012/10/20 JonY wrote:
>>> On 10/20/2012 21:12, Christian Franke wrote:
>>>> Just for Info:
>>>>
>>>> The new /usr/include/w32api/windef.h does no longer define _WIN32.
>>>>
>>>> This may require compile fixes for some sources which check only for
>>>> _WIN32 and not for __CYGWIN__ after windows.h is included.
>>>>
>>>> Christian
>>> I can't imagine why you'd include windows.h and then check for _WIN32
>>> after the fact, but I still think mixing win32 calls and Cygwin calls is
>>> a bad idea, except for a few special cases.
>>>
>>> Anyway, I'll leave it to Kai to decide if it should be done, as I'm not
>>> sure if this request is proper.
>> That we don't define _WIN32 - actual we do internally but don't show
>> it to includer - is done by intention. Actual Corinna and I decided
>> that this behavior is for cygwin the desired.
>
> For the long term, it was IMO a good decision to change (fix) the old
> behavior.
>
> For now, some (trivial) fixes to existing code may be required. I built
> the smartmontools-6.0-1 Cygwin package a few hours before the new
> headers were uploaded. Build from source package does no longer work
> with new headers (unfortunately the foreign CSMI include file requires
> _WIN32).
>
> Christian
I suppose the following is fine too in smartmontools:
#define _WIN32
#include <windows.h>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 196 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-21 1:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-20 13:12 w32api-headers-3.0b_svn5431-1: _WIN32 no longer set on Cygwin Christian Franke
2012-10-20 16:20 ` JonY
2012-10-20 16:56 ` Kai Tietz
2012-10-20 17:32 ` Christian Franke
2012-10-21 1:25 ` JonY
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).