Re: [AD] PATCH: updated mprotect patch for allegro-4.2.1 which also work on Linux |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
Robert Jr Ohannessian wrote:
Hans de Goede wrote:What the !@#$% MS idiots what were they thinking everyone uses long == 64 bits on 64 bit archs, so hey lets be microsoft lets do it different.Technically, Microsoft's implementation is full C standard compliant. All you know about 'long' is that:1) sizeof(long long) >= sizeof(long) >= sizeof(int) 2) LONG_MIN -2147483647 // -(^231 - 1) (maximum value) LONG_MAX +2147483647 // 2^31 - 1 (minimum value)Any other assumptions you make is at your own risk. C does not even guarentee 2's complement representation.
Normal conventions say that sizeof(long) is the largest integer an arch can represent unless sizeof(int) is larger then that in which case sizeof(long) == sizeof(int)
See the C standard, second 5.2.4.2.1, 6.2.5 and 6.3.1.1.'long long' is the only C basic type that requires at least 64-bit of storage (but not strictly so).
long long is not a C basis type. Regards, Hans
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |