bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

_WIN32 and __CYGWIN__


From: Ken Brown
Subject: _WIN32 and __CYGWIN__
Date: Wed, 29 Aug 2018 09:35:06 -0400
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

There's a lot of code in gnulib that contains 'defined _WIN32 && ! defined __CYGWIN__'. The '! defined __CYGWIN__' part is redundant, because _WIN32 is never defined on Cygwin. It used to be defined if the GCC option -mno-cygwin was used, but that option has been unsupported for many years, starting with GCC 4, I think.

Would the gnulib maintainers be interested in a patch to clean up the code by removing '! defined __CYGWIN__' where it is not needed? Or has there been a deliberate decision to support GCC 3 and the -mno-cygwin option? In the latter case, someone would need to audit the code and make sure that it is really doing the right thing for GCC 3 with -mno-cygwin. I personally don't think it's worth the trouble, and I think the presence of a redundant '! defined __CYGWIN__' is confusing to people who read the code.

Ken




reply via email to

[Prev in Thread] Current Thread [Next in Thread]