Mailing-List: contact cygwin-apps-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-apps-owner AT sourceware DOT cygnus DOT com List-Subscribe: List-Archive: List-Post: List-Help: , Delivered-To: mailing list cygwin-apps AT sources DOT redhat DOT com Message-ID: <022d01c0ad55$d545ca00$0200a8c0@lifelesswks> From: "Robert Collins" To: "edward" , "Akim Demaille" Cc: , References: <035401c0ac91$3ba21fd0$0200a8c0 AT lifelesswks><022001c0accf$29b724d0$0200a8c0 AT lifelesswks><007f01c0ad2e$f3dc5d20$0200a8c0 AT lifelesswks><00a301c0ad32$57ad0220$0200a8c0 AT lifelesswks><00c801c0ad36$01ec3370$0200a8c0 AT lifelesswks><011a01c0ad41$c0fbc9a0$0200a8c0 AT lifelesswks><01b801c0ad4b$9b2f1380$0200a8c0 AT lifelesswks><01c401c0ad4c$7e469ad0$0200a8c0 AT lifelesswks><000001c0ad53$b37dc9b0$9865fea9 AT edward> Subject: Re: updated win32 macro Date: Fri, 16 Mar 2001 00:42:45 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-OriginalArrivalTime: 15 Mar 2001 13:36:58.0838 (UTC) FILETIME=[02469760:01C0AD55] ----- Original Message ----- From: "Akim Demaille" To: "edward" Cc: "Robert Collins" ; ; Sent: Friday, March 16, 2001 12:41 AM Subject: Re: updated win32 macro > >>>>> "tailbert" == tailbert writes: > > tailbert> it's a language feature. > > OK, but then I fail to understand why you'd need to have WIN32=' ' to > know the test was run. Either you are looking for a switch for a > language dependent feature, or you look for some support of something > on your system, in which case AC_HEADER_WINDOWS was fine, IMHO. > > But Robert says he needs more: be able to make decisions based on > whether windows.h is there or not, and he was suggesting to provide > $WIN32 as a configure interface to HAVE_WINDOWS_H. Then, it is a host > feature you are looking for, and AC_SYS is the logical answer. > Not quite. I chose windows.h INCORRECTLY. I was trying to test whether the win32 api was _really working_ without running the code (so that cross compiling would still work). The #define WIN32 is a much better test (Edward and I took that part off-line). It is a language feature as Edward described. The test is not for language features, but to allow (for example) certain targets to be only built if that language feature exists. An example (as I've used in the email that crossed this one) is if a given package has some targets that build on unix and on windows, and some targets that only build on windows _with that language_. If AC_SYS_WIN32 is a new macro you are suggesting, that will test whether the target system will run WIN32 code, that's probably a useful macro to have. But it's what the language is able to build that interests me. Here's the real-world example I am wrestling with. I've just written an async file system module for squid that uses WIN32 threads, not pthreads. So if the compiler can't build code that uses WIN32 threads I need to turn off compilation of that module if the end user requested it. Conversely I want to make that module built by default if the compiler can build code that uses WIN32 threads (to offer the end user best performance). The test therefore is very useful, and tied to the language. Rob