From owner-freebsd-questions@freebsd.org Thu Jul 5 06:41:20 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CCF03102A129 for ; Thu, 5 Jul 2018 06:41:20 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8008B855 for ; Thu, 5 Jul 2018 06:41:19 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ppp118-210-121-146.bras2.adl4.internode.on.net (HELO leader.local) ([118.210.121.146]) by ipmail06.adl2.internode.on.net with ESMTP; 05 Jul 2018 16:06:09 +0930 Subject: Re: Clang++ stdlib/cstdlib.h workaround To: Antonio Olivares Cc: FreeBSD Questions References: From: Shane Ambler Message-ID: <2b656396-f201-3abe-0bbe-d9a127ae5d39@ShaneWare.Biz> Date: Thu, 5 Jul 2018 16:06:07 +0930 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 06:41:21 -0000 On 04/07/2018 22:00, Antonio Olivares wrote: > About the big number, it would be nice to get it working for bigger > numbers, but I would need to run it on amd64 freebsd machine at work. > Maybe at some other time we can revisit this issue. Thank you for your > assistance. You don't need a 64bit machine to use 64bit ints but you do need to use a recent C/C++ standard, long long was introduced in C99 and C++11. That is, if you have an issue with long long add -std=c++11 to your CXXFLAGS. https://en.wikipedia.org/wiki/Integer_(computer_science)#Long_long There is also a long double https://en.wikipedia.org/wiki/Long_double Try it - #include int main() { printf("sizeof long long - %lu\n",sizeof(long long)); printf("sizeof long double - %lu\n",sizeof(long double)); return 0; } -- FreeBSD - the place to B...Software Developing Shane Ambler