On Thu, Aug 27, 2009 at 8:13 AM, Ben Laurie<[email protected]> wrote: > On Thu, Aug 27, 2009 at 3:56 PM, Evan Martin<[email protected]> wrote: >> On Thu, Aug 27, 2009 at 2:57 AM, Ben Laurie<[email protected]> wrote: >>> Added USE_GDK, set when either TOOLKIT_GTK or TOOLKIT_VIEWS is set but >>> not OS_WIN. >> >> I believe VIEWS still uses GTK (for bits like the omnibox). > > So this should be USE_GTK?
I'm not sure, just pointing out the problem. :\ TOOLKIT_FOO vs USE_FOO is a bit confusing but documentation could fix that. >>> All of the above cause slightly odd formulations like: >>> >>> #if defined(OS_WIN) >>> ... >>> #elif defined(USE_BASE_DATA_PACK) >>> ... >>> #endif >> >> My only concern with these is that if some platform happens to get >> excluded in one of those chained statements, we'll have functions >> silently skipping code that's important. (This was a real problem in >> bringing up the ports -- people would occasionally do "#ifdef OS_WIN >> important_code() #endif", and finding out why some variable isn't >> getting set sometimes isn't obvious.) >> >> It seems some sort of "#else #error need code here" pattern would be >> nice to define and use. > > Can do. Obviously this problem already existed, I haven't introduced it. Yes. I think it was simpler when there were just three targets (I wouldn't be surprised if there are places where the "else" is just "the platform I haven't yet mentioned"). I think with these more-complicated overlapping feature-level defines it'll be very easy to accidentally drop a platform. --~--~---------~--~----~------------~-------~--~----~ Chromium Developers mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-dev -~----------~----~----~----~------~----~------~--~---
