summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 13:28:49 +0000
committerflaviojs <flaviojs@54d463be-8e91-2dee-dedb-b68131a5f0ec>2011-07-10 13:28:49 +0000
commitee66778144c8a069a04d5f77ec73dcab973c61d0 (patch)
treeb6a85695656a1916a77e6a387b46920afc67fbc3 /src
parent201d8bb6a488ad6ef7eed4c46ad14228d543b71d (diff)
downloadhercules-ee66778144c8a069a04d5f77ec73dcab973c61d0.tar.gz
hercules-ee66778144c8a069a04d5f77ec73dcab973c61d0.tar.bz2
hercules-ee66778144c8a069a04d5f77ec73dcab973c61d0.tar.xz
hercules-ee66778144c8a069a04d5f77ec73dcab973c61d0.zip
* Temporary fix for bugreport:4961 (unintended conversion from signed to unsigned).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14896 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/common/cbasetypes.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h
index e2fe17555..27420edbf 100644
--- a/src/common/cbasetypes.h
+++ b/src/common/cbasetypes.h
@@ -81,6 +81,16 @@
#include <stdint.h>
#include <limits.h>
+// temporary fix for bugreport:4961 (unintended conversion from signed to unsigned)
+// (-20 >= UCHAR_MAX) returns true
+// (-20 >= USHRT_MAX) returns true
+#if defined(__FreeBSD__) && defined(__x86_64)
+#undef UCHAR_MAX
+#define UCHAR_MAX (unsigned char)0xff
+#undef USHRT_MAX
+#define USHRT_MAX (unsigned short)0xffff
+#endif
+
// ILP64 isn't supported, so always 32 bits?
#ifndef UINT_MAX
#define UINT_MAX 0xffffffff