Date: Sun, 22 Oct 2000 08:53:03 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Scott Brown cc: djgpp AT delorie DOT com Subject: Re: LFNs, timeslices and the preprocessor In-Reply-To: <39f23421.749522025@198.60.22.3> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Sun, 22 Oct 2000, Scott Brown wrote: > A few little questions for y'all.... It is usually better to post one question per message, and make the Subject reflect the issue. This makes the thread more easy to track. Please consider doing that in the future. > #1 - Is __dpmi_yield what I want to make my program stop being such a > pig when running in a Win9x DOS box? Yes. However, please note that there are several library functions which call `__dpmi_yield' for you, when they are busy-waiting. Examples include the functions `select' and `sleep'. If you call one of those functions, you don't need to call `__dpmi_yield' explicitly. > #2 - Is there a reliable way to detect whether long filenames are > supported? My program relies on LFNs to function correctly, and could > do a lot of damage if it thinks it has LFN support when it doesn't. Are you aware that DJGPP library functions detect the LFN API automatically and use it whenever available? If you need to know at the application level whether LFN is available, see the documentation of the library function `_use_lfn' in the library reference. > What else would be a good way to test the size of a type > at compile time (e.g. to make sure that long is exactly 32 bits)? You can use either LONG_MAX (from limits.h) or LONG_BITS and BITSPERBYTE (from values.h). The former is ANSI-standard, so will work on any platform, while the latter might be less portable to non-Posix systems.