changeset 21797:14061bc22cb3

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)
author gpoirier
date Thu, 04 Jan 2007 16:00:27 +0000
parents 3eec8eba4906
children 31404b462bd5
files libmenu/menu.c
diffstat 1 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libmenu/menu.c	Thu Jan 04 09:02:22 2007 +0000
+++ b/libmenu/menu.c	Thu Jan 04 16:00:27 2007 +0000
@@ -53,7 +53,7 @@
 } 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 @@
     }
     // 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 @@
     if(menu_list[i].args) free(menu_list[i].args);
   }
   free(menu_list);
-  mcount = 0;
+  menu_count = 0;
 }
 
 /// Default read_key function