I've made two small changes in this library.
1) The functions ngettext and dngettext would not work for large integers that do not fit unsigned long type. Here is what Gettext manual says about this:
"About larger integer types, such as ‘uintmax_t’ or ‘unsigned long long’: they can be handled by reducing the value to a range that fits in an ‘unsigned long’. Simply casting the value to ‘unsigned long’ would not do the right thing, since it would treat ULONG_MAX + 1 like zero, ULONG_MAX + 2 like singular, and the like. Here you can exploit the fact that all mentioned plural form formulas eventually become periodic, with a period that is a divisor of 100 (or 1000 or 1000000). So, when you reduce a large value to another one in the range [1000000, 1999999] that ends in the same 6 decimal digits, you can assume that it will lead to the same plural form selection."
2) I created better support for non-GNU systems.
Fixed ngettext for large numbers that don't fit an unsigned long
Added better support for non-GNU systems.
Fixed dngettext as well.
Thank you for the fixes, sir. Merged.