diff options
author | Xan Lopez <xan@gnome.org> | 2007-07-31 05:50:44 +0800 |
---|---|---|
committer | Xan Lopez <xan@src.gnome.org> | 2007-07-31 05:50:44 +0800 |
commit | 135ff4cef6e8a9ae834b9e461ea13e11710409f0 (patch) | |
tree | a73f923bd4cdb537a50bbd7c149631efa67cbe21 /embed | |
parent | 7de8aaac02cd46f58fc28df90460d7db7a558d5f (diff) | |
download | gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.tar gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.tar.gz gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.tar.bz2 gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.tar.lz gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.tar.xz gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.tar.zst gsoc2013-epiphany-135ff4cef6e8a9ae834b9e461ea13e11710409f0.zip |
Do not use #ifdef inside macros, ancient compilers don't like it
2007-07-31 Xan Lopez <xan@gnome.org>
* embed/mozilla/mozilla-embed-single.cpp:
* embed/webkit/webkit-embed-single.cpp:
Do not use #ifdef inside macros, ancient compilers
don't like it
svn path=/trunk/; revision=7225
Diffstat (limited to 'embed')
-rw-r--r-- | embed/mozilla/mozilla-embed-single.cpp | 17 | ||||
-rw-r--r-- | embed/webkit/webkit-embed-single.cpp | 16 |
2 files changed, 29 insertions, 4 deletions
diff --git a/embed/mozilla/mozilla-embed-single.cpp b/embed/mozilla/mozilla-embed-single.cpp index 8930e1e9d..77a982007 100644 --- a/embed/mozilla/mozilla-embed-single.cpp +++ b/embed/mozilla/mozilla-embed-single.cpp @@ -137,6 +137,10 @@ static void mozilla_embed_single_init (MozillaEmbedSingle *ges); static void ephy_certificate_manager_iface_init (EphyCertificateManagerIface *iface); #endif +/* Some compilers (like gcc 2.95) don't support preprocessor directives inside macros, + so we have to duplicate the whole thing */ + +#ifdef ENABLE_CERTIFICATE_MANAGER G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE, ephy_embed_single_iface_init) @@ -144,12 +148,21 @@ G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT ephy_cookie_manager_iface_init) G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER, ephy_password_manager_iface_init) -#ifdef ENABLE_CERTIFICATE_MANAGER G_IMPLEMENT_INTERFACE (EPHY_TYPE_CERTIFICATE_MANAGER, ephy_certificate_manager_iface_init) -#endif G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER, ephy_permission_manager_iface_init)) +#else +G_DEFINE_TYPE_WITH_CODE (MozillaEmbedSingle, mozilla_embed_single, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE, + ephy_embed_single_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER, + ephy_cookie_manager_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER, + ephy_password_manager_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER, + ephy_permission_manager_iface_init)) +#endif static gboolean mozilla_set_default_prefs (MozillaEmbedSingle *mes) diff --git a/embed/webkit/webkit-embed-single.cpp b/embed/webkit/webkit-embed-single.cpp index 476aecc11..0946472d3 100644 --- a/embed/webkit/webkit-embed-single.cpp +++ b/embed/webkit/webkit-embed-single.cpp @@ -56,7 +56,10 @@ static void ephy_permission_manager_iface_init (EphyPermissionManagerIface *ifac static void ephy_certificate_manager_iface_init (EphyCertificateManagerIface *iface); #endif +/* Some compilers (like gcc 2.95) don't support preprocessor directives inside macros, + so we have to duplicate the whole thing */ +#ifdef ENABLE_CERTIFICATE_MANAGER G_DEFINE_TYPE_WITH_CODE (WebKitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE, ephy_embed_single_iface_init) @@ -64,12 +67,21 @@ G_DEFINE_TYPE_WITH_CODE (WebKitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT, ephy_cookie_manager_iface_init) G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER, ephy_password_manager_iface_init) -#ifdef ENABLE_CERTIFICATE_MANAGER G_IMPLEMENT_INTERFACE (EPHY_TYPE_CERTIFICATE_MANAGER, ephy_certificate_manager_iface_init) -#endif G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER, ephy_permission_manager_iface_init)) +#else +G_DEFINE_TYPE_WITH_CODE (WebKitEmbedSingle, webkit_embed_single, G_TYPE_OBJECT, + G_IMPLEMENT_INTERFACE (EPHY_TYPE_EMBED_SINGLE, + ephy_embed_single_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_COOKIE_MANAGER, + ephy_cookie_manager_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PASSWORD_MANAGER, + ephy_password_manager_iface_init) + G_IMPLEMENT_INTERFACE (EPHY_TYPE_PERMISSION_MANAGER, + ephy_permission_manager_iface_init)) +#endif static void |