From 10cf7f1f387227e777637d1c01fe90c735fd4bda Mon Sep 17 00:00:00 2001 From: "joerg@mysql.com" <> Date: Thu, 26 Aug 2004 17:30:53 +0200 Subject: If the system has 64 bit "long", then "long long" does not add new functionality. The existing code takes advantage of this when "typedef"ing 'longlong' in 'my_global.h'. This holds for Alpha CPUs. If the compiler then has prototypes for C99 functions 'strtoll()' and 'strtoull()' but no implementation, the existing code in 'strtoull.c' collides with that prototype. These collisions are avoided now. --- strings/strtoull.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'strings/strtoull.c') diff --git a/strings/strtoull.c b/strings/strtoull.c index f4f3ce19bf7..0c2788bc188 100644 --- a/strings/strtoull.c +++ b/strings/strtoull.c @@ -14,9 +14,20 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* This is defines strtoull() */ +/* This implements strtoull() if needed */ + +/* + These includes are mandatory because they check for type sizes and + functions, especially they handle tricks for Tru64 where 'long' is + 64 bit already and our 'longlong' is just a 'long'. + This solves a problem on Tru64 where the C99 compiler has a prototype + for 'strtoull()' but no implementation, see "6.1 New C99 library functions" + in file '/usr/share/doclib/cc.dtk/release_notes.txt'. + */ #include +#include + #if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG) #define USE_UNSIGNED #define USE_LONGLONG -- cgit v1.2.1