aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2004-06-07 01:55:48 +0800
committerChristian Persch <chpe@src.gnome.org>2004-06-07 01:55:48 +0800
commitebe58319e56ea4e3573fd27a76d815ec387e08e6 (patch)
tree2ee983f2d6c5b16abef4a5b710d7ee04af934adf /embed/mozilla
parentb53dc99d7e27881a721b22904526abcb43d001ec (diff)
downloadgsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.tar
gsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.tar.gz
gsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.tar.bz2
gsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.tar.lz
gsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.tar.xz
gsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.tar.zst
gsoc2013-epiphany-ebe58319e56ea4e3573fd27a76d815ec387e08e6.zip
Simplified mozilla version checks with new MOZILLA_IS_VERSION4 macro.
2004-06-06 Christian Persch <chpe@cvs.gnome.org> * embed/mozilla/GtkNSSKeyPairDialogs.cpp: * embed/mozilla/mozilla-version.h: Simplified mozilla version checks with new MOZILLA_IS_VERSION4 macro.
Diffstat (limited to 'embed/mozilla')
-rw-r--r--embed/mozilla/GtkNSSKeyPairDialogs.cpp6
-rw-r--r--embed/mozilla/mozilla-version.h4
2 files changed, 7 insertions, 3 deletions
diff --git a/embed/mozilla/GtkNSSKeyPairDialogs.cpp b/embed/mozilla/GtkNSSKeyPairDialogs.cpp
index 2b1b0e113..95af550d3 100644
--- a/embed/mozilla/GtkNSSKeyPairDialogs.cpp
+++ b/embed/mozilla/GtkNSSKeyPairDialogs.cpp
@@ -93,7 +93,7 @@ public:
NS_DECL_ISUPPORTS
NS_DECL_NSIDOMWINDOWINTERNAL
NS_DECL_NSIDOMWINDOW
-#if (MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RC, 3) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 1)) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 2)
+#if MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RC, 3) && !MOZILLA_IS_VERSION4 (1, 8, MOZILLA_ALPHA, 1)
NS_DECL_NSIDOMWINDOW2
#endif
@@ -103,7 +103,7 @@ public:
gboolean close_called;
};
-#if (MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RC, 3) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 1)) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 2)
+#if MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RC, 3) && !MOZILLA_IS_VERSION4 (1, 8, MOZILLA_ALPHA, 1)
NS_IMPL_ISUPPORTS3(KeyPairHelperWindow, nsIDOMWindowInternal, nsIDOMWindow, nsIDOMWindow2)
#else
NS_IMPL_ISUPPORTS2(KeyPairHelperWindow, nsIDOMWindowInternal, nsIDOMWindow)
@@ -714,7 +714,7 @@ NS_IMETHODIMP KeyPairHelperWindow::SizeToContent()
MOZ_NOT_IMPLEMENTED
}
-#if (MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RC, 3) && !MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 1)) || MOZILLA_CHECK_VERSION4 (1, 8, MOZILLA_ALPHA, 2)
+#if MOZILLA_CHECK_VERSION4 (1, 7, MOZILLA_RC, 3) && !MOZILLA_IS_VERSION4 (1, 8, MOZILLA_ALPHA, 1)
NS_IMETHODIMP KeyPairHelperWindow::GetWindowRoot(nsIDOMEventTarget * *aWindowRoot)
{
diff --git a/embed/mozilla/mozilla-version.h b/embed/mozilla/mozilla-version.h
index d59f5e493..072c70b5c 100644
--- a/embed/mozilla/mozilla-version.h
+++ b/embed/mozilla/mozilla-version.h
@@ -41,6 +41,10 @@
#define MOZILLA_CHECK_VERSION3(a,b,c) MOZILLA_CHECK_VERSION4(a,b,MOZILLA_RELEASE,c)
#define MOZILLA_CHECK_VERSION2(a,b) MOZILLA_CHECK_VERSION3(a,b,0)
+#define MOZILLA_IS_VERSION4(major, minor, type, micro) \
+ (VERSION4(MOZILLA_MAJOR, MOZILLA_MINOR, MOZILLA_TYPE, MOZILLA_MICRO) == \
+ VERSION4(major, minor, type, micro))
+
/* Use the following:
*
* 1.4.1 -> MOZILLA_CHECK_VERSION3 (1,4,1)