Hi Alain,

>      *  The date and time arguments to _dos_getftime() and 
> _dos_setftime() are now using 'unsigned int' type instead of 'unsigned 
> short'. This change has been made to improve compatibility with other 
> compilers.

What kind of compatibility / which compilers? I am used to "int"
meaning "32 bit" on 32 bit capable compilers unless explicit size
keywords like short or long are added. But making the DOS time or
date value 32 bit would be bad, as DOS itself uses 16 bit here...

>      * The segment argument used with _dos_allocmem(), _dos_freemem() 
> and _dos_setblock() is now unsigned int instead of unsigned short. This 
> change was made for compatibility with other compilers.

Similar to above: int without short / long sounds like "32 bit"
to me in OW context but segments must always be 16 bit values.
Our portab.h is explicit about sizes, too:

typedef unsigned char UBYTE;
typedef unsigned short UWORD;
typedef unsigned long UDWORD;
...
typedef int COUNT;
typedef unsigned int UCOUNT;

The latter two mean "whichever size is default for the compiler,
both 16 and 32 bit are okay for this type in the freedos kernel"

For things like dos_allocmem, our kernel would not use COUNT in
the API, only in internal calculations. The API would use UWORD
and in my opinion OpenWatcom should keep doing exactly that.

Interestingly, our BOOL is also "int": maybe char would save a
bit of RAM but default sized int are nicer for optimizations as
they use a default CPU register size of the target architecture.

> A fix for this would requide conditionals based no the compiler 
> version... really not nice at all :(

I hope the OpenWatcom people can fix it on their side instead?

Eric



------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Freedos-devel mailing list
Freedos-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to