bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

error: '::calloc' has not been declared


From: Simon Josefsson
Subject: error: '::calloc' has not been declared
Date: Mon, 26 Apr 2010 09:26:29 +0200
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1 (gnu/linux)

Note: this is another low-priority issue that doesn't cause any
immediate real problem except that it breaks snapshot building.

There is an error building test-stdlib-c++2 on Mac OS X 10.4.11:

http://autobuild.josefsson.org/gnulib/log-201004250950930690000.txt

depbase=`echo test-stdlib-c++2.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
g++ -DHAVE_CONFIG_H -I.  -DGNULIB_STRICT_CHECKING=1 -I. -I. -I.. -I./.. 
-I../gllib -I./../gllib -I/opt/local/include  -D_APPLE_C_SOURCE -MT 
test-stdlib-c++2.o -MD -MP -MF $depbase.Tpo -c -o test-stdlib-c++2.o 
test-stdlib-c++2.cc &&\
mv -f $depbase.Tpo $depbase.Po
/usr/include/c++/4.0.0/cstdlib:103: error: '::calloc' has not been declared
make[4]: *** [test-stdlib-c++2.o] Error 1

That system header contains:

,----
| #if _GLIBCXX_HOSTED
| /* The C standard does not require a freestanding implementation to
|    provide <stdlib.h>.  However, the C++ standard does still require
|    <cstdlib> -- but only the functionality mentioned in
|    [lib.support.start.term].  */
| #include <stdlib.h>
| #endif
| 
| // Get rid of those macros defined in <stdlib.h> in lieu of real functions.
...
| #undef calloc
...
| namespace std
| {
| #if _GLIBCXX_HOSTED
|   using ::div_t;
|   using ::ldiv_t;
...
>   using ::calloc;
|   using ::div;
...
`----

I wonder if this can be fixed easily...

/Simon




reply via email to

[Prev in Thread] Current Thread [Next in Thread]