This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with malloc_alloc_template



Hello, 

We have some code that has been running on an old version of Linux for several years. 

Recently, we've purchased a new server, installed the latest Fedora core, and want to move the code onto the new server. 

When compiling the code, we get some strange errors about '__malloc_alloc_template' 

I'm really not an expert with the STL, but my guess is that the function name must have changed in the newer versions of gcc and libstdc++ 

The specific error looks like this: 
------------------------------------------------ 
../common/progs.c:69: error: '__malloc_alloc_template' was not declared in this scope 
../common/progs.c:69: error: template argument 4 is invalid 
../common/progs.c:69: error: expected ',' or '...' before '>' token 
../common/progs.c: In member function 'int URLExtractor::extractURLs(DataBlock&, int)': 
---------------------------------------------------- 

The code from line 69 is: 
------------------------------------------------ 
int extractURLs( DataBlock &content, map<void *, void *, less<void *>, __malloc_alloc_template<0> > &urls ){ 
------------------------------------------------- 

Additionally, we get similar errors from another piece of our code that look related to the same issue: 
---------------------------------------------- 
std::set< HASH64, less<HASH64>, __malloc_alloc_template<0> > *startURLs; 
----------------------------------------------- 


Can anybody offer some suggestions on how to fix this. (I imagine it's probably something simple like including an extra header or perhaps renaming the malloc call. But I'm not sure.) 

Thanks!! 

-N 




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]