[LLVMbugs] [Bug 10478] New: undefined functions asprintf_l, snprintf_l
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jul 25 01:53:06 PDT 2011
http://llvm.org/bugs/show_bug.cgi?id=10478
Summary: undefined functions asprintf_l, snprintf_l
Product: libc++
Version: unspecified
Platform: Macintosh
OS/Version: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
AssignedTo: hhinnant at apple.com
ReportedBy: llvm at niebuhrt.de
CC: llvmbugs at cs.uiuc.edu
When compiling the following code, I get these errors.
(ucontext is deprecated, but these functions should still redefined)
clang++ -o main uclib.cpp -std=c++0x -U__STRICT_ANSI__ -stdlib=libc++
----- uclib.cpp--------
#define _XOPEN_SOURCE 520
#include <ucontext.h>
#include <iostream>
int main() {
std::cout << "Hello World!"<<std::endl;
}
-----------------
/usr/include/c++/v1/locale:1736:16: error: use of undeclared identifier
'snprintf_l'
__nc = snprintf_l(__nb, __nbuf, 0, __fmt,
^
/usr/include/c++/v1/locale:1744:16: error: use of undeclared identifier
'snprintf_l'
__nc = snprintf_l(__nb, __nbuf, 0, __fmt, __v);
^
/usr/include/c++/v1/locale:1753:20: error: use of undeclared identifier
'asprintf_l'
__nc = asprintf_l(&__nb, 0, __fmt, (int)__iob.precision(), __v);
^
/usr/include/c++/v1/locale:1760:20: error: use of undeclared identifier
'asprintf_l'
__nc = asprintf_l(&__nb, 0, __fmt, __v);
^
/usr/include/c++/v1/locale:1805:16: error: use of undeclared identifier
'snprintf_l'
__nc = snprintf_l(__nb, __nbuf, 0, __fmt,
^
/usr/include/c++/v1/locale:1813:16: error: use of undeclared identifier
'snprintf_l'
__nc = snprintf_l(__nb, __nbuf, 0, __fmt, __v);
^
/usr/include/c++/v1/locale:1822:20: error: use of undeclared identifier
'asprintf_l'
__nc = asprintf_l(&__nb, 0, __fmt, (int)__iob.precision(), __v);
^
/usr/include/c++/v1/locale:1829:20: error: use of undeclared identifier
'asprintf_l'
__nc = asprintf_l(&__nb, 0, __fmt, __v);
^
/usr/include/c++/v1/locale:3557:15: error: use of undeclared identifier
'asprintf_l'
__n = asprintf_l(&__bb, 0, "%.0Lf", __units);
^
9 errors generated.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list