Hi, At Sat, 11 Dec 2004 07:10:54 +0900, Berger, Daniel wrote in [ruby-core:03944]: > It turns out that some Win32 functions, such as AttachConsole(), are > only conditionally available, and depend on the values of specific > macros. > > From > http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winprog > /winprog/using_the_windows_headers.asp > > "Certain functions that depend on a particular version of Windows are > declared using conditional code. This enables you to use the compiler to > detect whether your application uses functions that are not supported on > its target version(s) of Windows. To compile an application that uses > these functions, you must define the appropriate macros. Otherwise, you > will receive the C2065 error message." It doesn't seem meaningful to check the compiling environment. Rather you should check the target, the environment to run that extension, no? > This will be more of an issue when 64-bit Windows becomes more popular, > though I am even hitting it currently with some of the Win32Utils > extensions I've been working on. > > Now, we could leave it up to individual extension authors to set this > themselves manually, but that's a pain, and error prone (it's easy to > forget, and some may not know to do it in the first place). I thought > it would be nice if mkmf would set it for us. So, I submit the > following patch for consideration: I guess that developers who intend to restrict the target should add such macros by themselves. -- Nobu Nakada