From: John L. <mov...@us...> - 2006-12-06 10:48:50
|
Update of /cvsroot/oprofile/oprofile/libopt++ In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv6300/libopt++ Modified Files: popt_options.cpp Log Message: Further static initializer fix for ARM. Index: popt_options.cpp =================================================================== RCS file: /cvsroot/oprofile/oprofile/libopt++/popt_options.cpp,v retrieving revision 1.22 retrieving revision 1.23 diff -u -p -d -r1.22 -r1.23 --- popt_options.cpp 26 Sep 2006 01:43:15 -0000 1.22 +++ popt_options.cpp 6 Dec 2006 10:48:47 -0000 1.23 @@ -61,7 +61,12 @@ static vector<poptOption> & popt_options return *x; } -static vector<option_base *> options_list; +static vector<option_base *> & options_list(void) +{ + static vector<option_base *> *x = new(vector<option_base *>); + return *x; +} + static int showvers; static struct poptOption appended_options[] = { @@ -94,8 +99,8 @@ static poptContext do_parse_options(int while ((file = poptGetArg(con)) != 0) additional_params.push_back(file); - for (size_t i = 0 ; i < options_list.size() ; ++i) - options_list[i]->post_process(); + for (size_t i = 0 ; i < options_list().size() ; ++i) + options_list()[i]->post_process(); return con; } @@ -251,7 +256,7 @@ option_base::option_base(char const * na popt_options().push_back(opt); - options_list.push_back(this); + options_list().push_back(this); } |