Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread walter harms


Am 17.05.2019 21:51, schrieb Thomas Dickey:
> On Fri, May 17, 2019 at 04:26:10PM +0200, walter harms wrote:
>>
>>
>> Am 17.05.2019 13:01, schrieb James Larrowe:
>>> I use _WIN32 or __WIN32__ depending on the context.
>>>
>> my idea was to reduce the number of defines :)
>>
>> the problem is that i have no way to test what would happen if
>> i replace WIN32 with _WIN32.
>>
>> So the question is left, is WIN32 still used ?
> 
> sure - there was a recent update in Intrinsic.c which relies upon that slice.
> 

Actually that made me investigate the use.
There is a single use for _WIN32 in NextEvent.c
making this to WIN32 would clean the table, but
i can not test.


#ifdef _WIN32
typedef long suseconds_t;
#endif


re,
 wh

> ___
> xorg-devel@lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: https://lists.x.org/mailman/listinfo/xorg-devel
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread walter harms


Am 17.05.2019 21:57, schrieb Thomas Dickey:
> On Fri, May 17, 2019 at 10:08:47AM +0200, walter harms wrote:
>> Hi list,
>> is there a common ground for using OS related defines ?
>> I was look at some libs and found some defines that
>> look pretty ancient. And some like
>> WIN32 vs _WIN32
>> seems to confuse other people also ( ask you search engine)
>>
>> I found also:
>> ISC  *
> 
> I'll be removing that one.
> 
>> hpux
> 
> That one's for HPUX 9 vs 10 (both old).
> 
> However, before removing code, it helps to read and investigate the
> comment, which says that has to match existing code in Xlib.
> 

I am aware, the point was Alan what said ''We've removed a bunch of code using 
those defines already (I've mostly
used #unifdef to do so, with manual editing only for special cases).

We still need the #ifdefs for sun & sparc, but prefer the __sun & __sparc
forms so they still work in strict standards compliance mode. ''

I was look for a common set of defines and systems that are defined in all 
libraries.
Obviously, it is a for a user no help if FOO is defined in one and removed in 
others.

more over, i would argue for one define per system. If need this can handled if 
#ifdef.
Now i would like to see what ancient code can be removed.

re,
 wh

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread Thomas Dickey
On Fri, May 17, 2019 at 10:08:47AM +0200, walter harms wrote:
> Hi list,
> is there a common ground for using OS related defines ?
> I was look at some libs and found some defines that
> look pretty ancient. And some like
> WIN32 vs _WIN32

however, they're distinct:

https://stackoverflow.com/questions/662084/whats-the-difference-between-the-win32-and-win32-defines-in-c

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: Digital signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread Thomas Dickey
On Fri, May 17, 2019 at 04:26:10PM +0200, walter harms wrote:
> 
> 
> Am 17.05.2019 13:01, schrieb James Larrowe:
> > I use _WIN32 or __WIN32__ depending on the context.
> > 
> my idea was to reduce the number of defines :)
> 
> the problem is that i have no way to test what would happen if
> i replace WIN32 with _WIN32.
> 
> So the question is left, is WIN32 still used ?

sure - there was a recent update in Intrinsic.c which relies upon that slice.

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: Digital signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread Thomas Dickey
On Fri, May 17, 2019 at 10:08:47AM +0200, walter harms wrote:
> Hi list,
> is there a common ground for using OS related defines ?
> I was look at some libs and found some defines that
> look pretty ancient. And some like
> WIN32 vs _WIN32
> seems to confuse other people also ( ask you search engine)
> 
> I found also:
> ISC  *

I'll be removing that one.

> hpux

That one's for HPUX 9 vs 10 (both old).

However, before removing code, it helps to read and investigate the
comment, which says that has to match existing code in Xlib.

-- 
Thomas E. Dickey 
https://invisible-island.net
ftp://ftp.invisible-island.net


signature.asc
Description: Digital signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread Alan Coopersmith

On 5/17/19 1:08 AM, walter harms wrote:

I found also:
ISC  *
MOTOROLA *
VMS*
USG*
sgi
ultrix *
__osf__ *


We've removed a bunch of code using those defines already (I've mostly
used #unifdef to do so, with manual editing only for special cases).

We still need the #ifdefs for sun & sparc, but prefer the __sun & __sparc
forms so they still work in strict standards compliance mode.

--
-Alan Coopersmith-   alan.coopersm...@oracle.com
 Oracle Solaris Engineering - https://blogs.oracle.com/alanc
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread James Larrowe
If that's what you want to do, then I suggest to just use _WIN32 for
everything.
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread walter harms


Am 17.05.2019 13:01, schrieb James Larrowe:
> I use _WIN32 or __WIN32__ depending on the context.
> 
my idea was to reduce the number of defines :)

the problem is that i have no way to test what would happen if
i replace WIN32 with _WIN32.

So the question is left, is WIN32 still used ?

re,
 wh
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

rfc: WIN32 vs _WIN32 and more

2019-05-17 Thread walter harms
Hi list,
is there a common ground for using OS related defines ?
I was look at some libs and found some defines that
look pretty ancient. And some like
WIN32 vs _WIN32
seems to confuse other people also ( ask you search engine)

I found also:
ISC  *
MOTOROLA *
VMS*
USG*
hpux
sgi
sparc
sun
ultrix *
__osf__ *


* dead ?

For easier maintainability i would like to remove defines that are not
in use any more.

re,
 wh
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel