Mail Archives: djgpp/2000/10/22/14:45:12
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.
<limits.h> has things like INT_MAX, which you can probably use.
--
Nate Eldredge
neldredge AT hmc DOT edu
- Raw text -