> -----Original Message----- > From: maria-developers- > [email protected] [mailto:maria- > [email protected]] On > Behalf Of Steve Ellcey > Sent: Freitag, 28. Oktober 2011 22:38 > To: [email protected] > Subject: [Maria-developers] Bug in ENUM options handling? > > While working on MariaDB on HP-UX we noticed an inconsistency involving > the type of enum arguments. > > In init_variables and init_one_value (mysys/my_getopt.c), ENUM options > are treated as unsigned longs but the enum arguments are actually > declared as uint instead of ulong. While this doesn't matter in 32 bit > mode when int's and longs's are the same size, it can cause problems in > 64 bit mode when long's are 64 bits and int's 32 bits.
Hi, I would prefer not to use ulong at all. It is not uniformly 64 bit on 64 bit OSes. If one needs unsigned integer that 64 bit on 64 bit OSes, and 32 or 32 bit, size_t seems to be the right choice to me, at least I have not seen exceptions from this rule (but though someone mentioned that on Cray that would not work:). uintptr_t sounds ok too. If nothing else, there would be thousands less warnings on Win64 if people avoided ulong usage. It one does not want to spare bits, ulonglong seems to be right choice. Wlad _______________________________________________ Mailing list: https://launchpad.net/~maria-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~maria-developers More help : https://help.launchpad.net/ListHelp

