> > Please show some concrete (minimal) example... I have a hard time to > understand *exactly* what you mean. > > There must be some better way around this than adding 2000 ifdefs all > around the code, which frankly doesn't sound acceptable to me. Sure, > some ifdefs can be added, but in as few places as possible. Some > clever use of the C preprocessor defining names of global variables > as function calls retuning a pointer to function-local static data > instead, or some clever preprocessing script used for Symbian > compilations, or whatever. > > --tml
We are doing what you have mentioned above, i.e. defining name of global variables as function calls returning a pointer. For example, in gdate.c, static gboolean using_twodigit_years = FALSE; would become #if defined(__SYMBIAN32__) && defined(EMULATOR) PLS(using_twodigit_years,gdate, gboolean) #define using_twodigit_years (*FUNCTION_NAME(using_twodigit_years ,gdate)() #else static gboolean using_twodigit_years = FALSE; #endif where the PLS() macro will add the specified variable to the Process Local Storage, and the define will map it to a function pointer. This is repeated for all write-able static data (WSD).
_______________________________________________ gtk-devel-list mailing list gtk-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-devel-list