]> code.delx.au - pulseaudio/commitdiff
libpulse: introduce PA_CHECK_VERSION macro
authorLennart Poettering <lennart@poettering.net>
Tue, 26 May 2009 20:31:05 +0000 (22:31 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 May 2009 20:31:05 +0000 (22:31 +0200)
src/pulse/version.h.in

index 566dd55e6cc2e228f8dbfb2b52d0a1651e85991a..3143e98ec046be2ca3a159bbc327e53c2a5d3846 100644 (file)
@@ -60,6 +60,13 @@ const char* pa_get_library_version(void);
 /** The micro version of PA. \since 0.9.15 */
 #define PA_MICRO @PA_MICRO@
 
+/** Evaluates to TRUE if the PulseAudio library version is equal or
+ * newer than the specified. \since 0.9.16 */
+#define PA_CHECK_VERSION(major,minor,micro)                             \
+    ((PA_MAJOR > (major)) ||                                            \
+     (PA_MAJOR == (major) && CA_MINOR > (minor)) ||                     \
+     (PA_MAJOR == (major) && CA_MINOR == (minor) && CA_MICRO >= (micro)))
+
 PA_C_DECL_END
 
 #endif