1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-25 08:12:17 +00:00

fix gprof support (aka work around gprof's brain dead design)

as stated here: http://sourceware.org/binutils/docs-2.17/gprof/Implementation.html
mcount() is a symbol reserved by gprof to perform instrumentation, so we shouldn't declare a symbol that has this name
Fixes issue discussed here:
date: Jan 3, 2007 3:17 PM
subject: [MPlayer-advusers] gcc, mplayer and profile (mcount)


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@21815 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
gpoirier 2007-01-04 16:00:27 +00:00
parent 86654adfe5
commit 1c88c0fce4

View File

@ -53,7 +53,7 @@ typedef struct menu_def_st {
} menu_def_t;
static menu_def_t* menu_list = NULL;
static int mcount = 0;
static int menu_count = 0;
static int menu_parse_config(char* buffer) {
@ -91,20 +91,20 @@ static int menu_parse_config(char* buffer) {
}
// Got it : add this to our list
if(minfo) {
menu_list = realloc(menu_list,(mcount+2)*sizeof(menu_def_t));
menu_list[mcount].name = name;
menu_list[mcount].type = minfo;
menu_list[mcount].cfg = m_struct_alloc(&minfo->priv_st);
menu_list[mcount].args = body;
menu_list = realloc(menu_list,(menu_count+2)*sizeof(menu_def_t));
menu_list[menu_count].name = name;
menu_list[menu_count].type = minfo;
menu_list[menu_count].cfg = m_struct_alloc(&minfo->priv_st);
menu_list[menu_count].args = body;
// Setup the attribs
for(i = 0 ; attribs[2*i] ; i++) {
if(strcasecmp(attribs[2*i],"name") == 0) continue;
if(!m_struct_set(&minfo->priv_st,menu_list[mcount].cfg,attribs[2*i], attribs[2*i+1]))
if(!m_struct_set(&minfo->priv_st,menu_list[menu_count].cfg,attribs[2*i], attribs[2*i+1]))
mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_BadAttrib,attribs[2*i],attribs[2*i+1],
name,parser->line);
}
mcount++;
memset(&menu_list[mcount],0,sizeof(menu_def_t));
menu_count++;
memset(&menu_list[menu_count],0,sizeof(menu_def_t));
} else {
mp_msg(MSGT_GLOBAL,MSGL_WARN,MSGTR_LIBMENU_UnknownMenuType,element,parser->line);
free(name);
@ -174,7 +174,7 @@ void menu_unint(void) {
if(menu_list[i].args) free(menu_list[i].args);
}
free(menu_list);
mcount = 0;
menu_count = 0;
}
/// Default read_key function