[llvm-bugs] [Bug 35849] strtoll undefined

via llvm-bugs llvm-bugs at lists.llvm.org
Sun Jan 7 11:11:49 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=35849

Dimitry Andric <dimitry at andric.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |WONTFIX
                 CC|                            |dimitry at andric.com

--- Comment #1 from Dimitry Andric <dimitry at andric.com> ---
First, please note that FreeBSD 8.4 is end-of-life, and unsupported.  Same for
LLVM 3.5.0.

That said, https://svnweb.freebsd.org/base?view=revision&revision=297212, which
exposes a number of long long types and functions (among which strtoll), has
never been merged to stable/8.  So indeed, under C++ mode, there is no strtoll
in stdlib.h.

As a workaround, you can manually merge this into your stdlib.h:

--- head/include/stdlib.h       2016/03/23 18:21:26     297211
+++ head/include/stdlib.h       2016/03/23 19:17:12     297212
@@ -125,7 +125,7 @@
  *
  * (The only other extension made by C99 in thie header is _Exit().)
  */
-#if __ISO_C_VISIBLE >= 1999
+#if __ISO_C_VISIBLE >= 1999 || defined(__cplusplus)
 #ifdef __LONG_LONG_SUPPORTED
 /* LONGLONG */
 typedef struct {

Note that CMake is able to find strtoll, because it compiles a small C test
program, and for C strtoll is defined.

In any case, this will not be fixed anymore, either in FreeBSD or LLVM.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180107/d608b2ce/attachment.html>


More information about the llvm-bugs mailing list