Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Mon, 8 Jan 2001 12:45:27 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: perl-5.6.1 DB_file support Message-ID: <20010108124527.C31528@redhat.com> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <3A5605B3 DOT AAC25D7F AT sbox DOT tu-graz DOT ac DOT at> <3A59255F DOT 85918DE8 AT sbox DOT tu-graz DOT ac DOT at> <3A5966E5 DOT 735999FE AT ece DOT gatech DOT edu> <3A59C529 DOT 4342E4D4 AT yahoo DOT com> <3A59DF65 DOT 353364C2 AT yahoo DOT com> <20010108105732 DOT A18692 AT redhat DOT com> <3A59F800 DOT 3E947DD4 AT yahoo DOT com> <20010108123346 DOT B31528 AT redhat DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.11i In-Reply-To: <20010108123346.B31528@redhat.com>; from cgf@redhat.com on Mon, Jan 08, 2001 at 12:33:46PM -0500 On Mon, Jan 08, 2001 at 12:33:46PM -0500, Christopher Faylor wrote: >On Mon, Jan 08, 2001 at 12:25:20PM -0500, Earnie Boyd wrote: >>Christopher Faylor wrote: >>> >>> On Mon, Jan 08, 2001 at 10:40:21AM -0500, Earnie Boyd wrote: >>> >Well, it is a MS Windows standard. And if _WIN32 is defined shouldn't I >>> >expect to find a Win32 standard definition such as MAX_PATH and >>> >_MAX_PATH defined? Even Cygwin itself uses MAX_PATH, E.G.: >>> >/usr/include/sys/cygwin.h. >>> >>> Cygwin isn't a UNIX application. >> >>Uh, I don't consider Cygwin an application, it is a runtime library used >>to make applications run. > >Ok. Let me rephrase then: "Cygwin isn't a UNIX runtime library used to >make applications run." > >>My statement that if _WIN32 is defined, then I should expect that >>standard Win32 definitions also be defined still stands. MAX_PATH is >>just an example of one of those definitions. > >MAX_PATH *is* defined. It is in /cygnus/i686-pc-cygwin/include/w32api/windef.h. > >The code in /usr/include/sys/cygwin.h is only used when WINVER is >defined. WINVER is also defined in windef.h, although the real intent >is that the sys/cygwin.h include file should be preceded by an '#include >' if you are attempting to use any of the stuff controlled by >the '#ifdef WINVER' conditional. Besides "MAX_PATH", there are also >other Windows-specific constructs inside this conditional block like >"HANDLE", and "DWORD". (Sorry. Stopped typing too soon.) So, you can't use cygwin as an example of something that needs to have a MAX_PATH in stdlib.h. I do see that there is a definition in the standard Windows version of stdlib.h from MSVC 6. This is sort of a gray area, though. I guess I wouldn't object to something like this being added to stdlib.h if someone wants to send a patch to newlib AT sources DOT redhat DOT com: #ifdef __WIN32__ #ifndef _MAX_DIR #define _MAX_DIR 256 #endif #ifndef _MAX_EXT #define _MAX_EXT 256 #endif #ifndef _MAX_DRIVE #define _MAX_DRIVE 3 #endif #ifndef _MAX_FNAME #define _MAX_FNAME 256 #endif #ifndef _MAX_PATH #define _MAX_PATH 260 #endif #ifndef MAX_PATH #define MAX_PATH _MAX_PATH #endif etc. #endif /*__WIN32__*/ cgf -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple