Message-ID: <373B5C01.9E56DE9C@unb.ca> Date: Thu, 13 May 1999 19:10:57 -0400 From: Endlisnis X-Mailer: Mozilla 4.51 [en] (Win95; U) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp To: djgpp AT delorie DOT com Subject: Re: Portability and size_t type related question References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Info: BrunNet, Inc. 888-278-6638 Reply-To: djgpp AT delorie DOT com > Another solution for making system-independent definition > for U32, for example, would be: > > #include > #if (INT_MAX == 2147483647) > typedef int int32; > #elif (LONG_MAX == 2147483647) > typedef long int32; > #elif (SHRT_MAX == 2147483647) > typedef short int32; > #else > #error "No 32-bit type!" > #endif > > Not very nice but should work in most cases. That will not work on systems with a byte size other than 8. -- (\/) Endlisnis (\/) s257m AT unb DOT ca Endlisnis AT HotMail DOT com ICQ: 32959047