[En-Nut-Discussion] The biggest problem when portting

Ralph Mason ralph.mason at telogis.com
Mon Jul 21 10:23:32 CEST 2003


> >The biggest problem is the type "int" when portting.
> >The type int has different size in different platforms.
> >On H8, the int is two bytes long so that it can not
> >be used as pointer since pointer is 32bits on H8.
> >I hate it !!!!

Pointers are pointers, not int's or shorts or any other type.  If you use a
pointer type then you have no problems.


> Oh...is that so? Well, I intended to replace all u_shorts
> by u_ints. But that would not make much sense then.

I run them all on a 32 bit pc with no trouble.  I modified the heap routines
to use a u_int for the size so that on bigger architectures it can use more
than 65kb and changed offending u_short casts for pointers to u_char* casts.

>
> >Too much work is needed to modify the crt routines.
> >So......? What I should do next?
> >To use system crt functions?

Not neccessary.

>
> No, because it is very convenient to use fprintf() on
> a socket and most apps would use it, making them non
> portable.

Ralph
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.491 / Virus Database: 290 - Release Date: 18/06/2003




More information about the En-Nut-Discussion mailing list