Thibaut Paumard <thibaut.paum...@obspm.fr> writes: > Unconditionally, this will not work, at least the way Property is > supposed to work: on 64-bit arches, the compiler will not be able to > distinguish the two distinct constructors for unsigned long and size_t > because it really is the same. Besides, I'd rather not break the ABI > already.
Good point; I'd somehow overlooked the constructors. Your solution should work in practice as long as the type sizes match, which holds for all Debian platforms but not 64-bit Windows, FWIW. Since Gyoto already uses Autoconf, another option would be to take advantage of its ability to check type sizes: * Somewhere in configure.ac, call AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) * Run autoreconf to update configure and config.h.in. * In GyotoProperty.h, conditionalize explicit size_t handling on SIZEOF_INT == SIZEOF_LONG. Technically, the best approach would be to implement a custom configure(.ac) test that explicitly checks whether the compiler considers size_t and unsigned long to be distinct or equivalent (by determining whether a small code sample compiles without errors), but I think checking sizes should suffice on all systems I know. At any rate, thanks for the quick response! -- Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org) http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org