codegooglecom / libproxy

Automatically exported from code.google.com/p/libproxy
GNU Lesser General Public License v2.1
0 stars 0 forks source link

get more porting way replacing gcc specific macro _PRETTY_FUNCTION_ #169

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

_PRETTY_FUNCTION_  is gcc specific macro. We try to compile it using latest 
Oracle c/c++ studio and couldn't find proper macro to replace it.

What is the expected output? What do you see instead?

May can consider another suitable way to make this part porting easy.

What version of the product are you using? On what operating system?

Solaris 11 

Please provide any additional information below.

I try to do following change in libmodman/module.hpp:

static const char * base_type() { return _PRETTY_FUNCTION_ ;}

to

static const char * base_type() { return _FILE_ ;}

This changed cause different extensions be added into list. 

Network extension and all of other extensions
will get same value by _FILE_, which will cause code(58th line in 
module_manager.hpp) try to cast to
one specific extension failed.

Original issue reported on code.google.com by leon....@gmail.com on 2 Dec 2011 at 9:35

GoogleCodeExporter commented 9 years ago
All that is needed is a macro to a string that is unique to the class of the 
function. I'm willing to bet your compiler has something similar.

Original comment by nathan...@themccallums.org on 2 Dec 2011 at 2:15

GoogleCodeExporter commented 9 years ago
I already check solaris CC for c++ code help, no similiar macro for this. But 
it's supported by Solaris on cc only for c code.

Original comment by leon....@gmail.com on 6 Dec 2011 at 4:51

GoogleCodeExporter commented 9 years ago
Maybe we could make the base_type explicit through the module structure ? (that 
mean breaking modman module ABI again though)

Original comment by nicolas.dufresne@gmail.com on 5 Jul 2012 at 7:26