From: Nate Eldredge Newsgroups: comp.os.msdos.djgpp Subject: Re: LFNs, timeslices and the preprocessor Date: 22 Oct 2000 11:32:00 -0700 Organization: InterWorld Communications Lines: 35 Sender: nate AT mercury DOT st DOT hmc DOT edu Message-ID: <8366mkafrz.fsf@mercury.st.hmc.edu> References: <39f23421 DOT 749522025 AT 198 DOT 60 DOT 22 DOT 3> NNTP-Posting-Host: mercury.st.hmc.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: nntp1.interworld.net 972239520 83098 134.173.57.219 (22 Oct 2000 18:32:00 GMT) X-Complaints-To: usenet AT news DOT interworld DOT net NNTP-Posting-Date: Sun, 22 Oct 2000 18:32:00 +0000 (UTC) User-Agent: Gnus/5.0802 (Gnus v5.8.2) Emacs/20.5 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com skb AT xmission DOT com (Scott Brown) writes: > A few little questions for y'all.... > > #1 - Is __dpmi_yield what I want to make my program stop being such a > pig when running in a Win9x DOS box? The current incarnation (built > with BC++ 3.0) is *supposed* to run without being too noticeable, but > in reality it makes Windows pretty much unusable until it finishes. > I'm porting it to DJGPP for other reasons, but making it better > behaved would be a nice bonus. It should, yes. > #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. `_use_lfn' > #3 - Slightly off-topic portability question. Reading the CLC FAQ > suggests that a construct like "#if sizeof(int)" doesn't work (it does > work in BC, apparently just to annoy people trying to port stuff from > BC to GCC). 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)? I > could check it with sizeof at runtime, but that would be nasty. GNU programs do it with a configure script, which compiles a small program which outputs the size, and then adds the value to a header. has things like INT_MAX, which you can probably use. -- Nate Eldredge neldredge AT hmc DOT edu