From: XXguille AT XXiies DOT XXes (Guillermo Rodriguez Garcia) Newsgroups: comp.os.msdos.djgpp Subject: Re: Portability and size_t type related question Date: Thu, 13 May 1999 21:58:26 GMT Organization: Telefonica Transmision de Datos Lines: 42 Message-ID: <373ab719.990094@noticias.iies.es> References: NNTP-Posting-Host: iies249.iies.es Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Forte Agent 1.5/32.451 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com El día Thu, 13 May 1999 09:47:48 +0300 (EET DST), Pasi Franti escribió: > >> Ok. thanx. it is like here then: >> >> typedef unsigned short U16; >> typedef unsigned long U32; >> typedef unsigned char BYTE; > >I disagree. > >I did not follow your discussion but how did you come up to such >conclusion? You can never be sure of how many bits are int and >long types without checking it! So what makes you think that >unsigned long would be different case? As far as I know, it is >more likely to be U64 as we use 32-bit compilers where int is >32 bits and long 64 bits. In djgpp (and many other 32 bit compilers) int and long int are exactly the same thing (32 bits). >In fact, even char is not necessary 8 bits even though it is >so almost everywhere. No, but a char is always one byte wide (a byte is not always 8-bit wide, though). > >If you have some reasoning for this, please let me know. > He was just saying that he would use those typedefs (U16, U32, BYTE) in his code and then define them as appropiate for every supported compiler / OS. Regards, GUILLE ---- Guillermo Rodriguez Garcia XXguille AT XXiies DOT XXes (ya sabes :-)