summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2013-11-18 14:32:13 +0100
committerSebastien Helleu <flashcode@flashtux.org>2013-11-18 14:32:13 +0100
commit717eaae4962c9d65ed205e099dc850818fb7f8e4 (patch)
tree1ee1f6af8066b898151439a7c63c841b9601c342 /src
parentfba983958728c11a05fe125ff5d337c663076a24 (diff)
downloadweechat-717eaae4962c9d65ed205e099dc850818fb7f8e4.zip
scripts: use #ifdef to check if versions are defined in signal "debug_libs"
Diffstat (limited to 'src')
-rw-r--r--src/plugins/guile/weechat-guile.c4
-rw-r--r--src/plugins/lua/weechat-lua.c4
-rw-r--r--src/plugins/perl/weechat-perl.c4
-rw-r--r--src/plugins/python/weechat-python.c4
-rw-r--r--src/plugins/ruby/weechat-ruby.c8
-rw-r--r--src/plugins/tcl/weechat-tcl.c4
6 files changed, 27 insertions, 1 deletions
diff --git a/src/plugins/guile/weechat-guile.c b/src/plugins/guile/weechat-guile.c
index 91d95cb0c..a8efec6e4 100644
--- a/src/plugins/guile/weechat-guile.c
+++ b/src/plugins/guile/weechat-guile.c
@@ -788,11 +788,15 @@ weechat_guile_signal_debug_libs_cb (void *data, const char *signal,
(void) type_data;
(void) signal_data;
+#if defined(SCM_MAJOR_VERSION) && defined(SCM_MINOR_VERSION) && defined(SCM_MICRO_VERSION)
weechat_printf (NULL, " %s: %d.%d.%d",
GUILE_PLUGIN_NAME,
SCM_MAJOR_VERSION,
SCM_MINOR_VERSION,
SCM_MICRO_VERSION);
+#else
+ weechat_printf (NULL, " %s: (?)", GUILE_PLUGIN_NAME);
+#endif
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/lua/weechat-lua.c b/src/plugins/lua/weechat-lua.c
index bddcff600..106422992 100644
--- a/src/plugins/lua/weechat-lua.c
+++ b/src/plugins/lua/weechat-lua.c
@@ -796,7 +796,11 @@ weechat_lua_signal_debug_libs_cb (void *data, const char *signal,
(void) type_data;
(void) signal_data;
+#ifdef LUA_VERSION
weechat_printf (NULL, " %s: %s", LUA_PLUGIN_NAME, LUA_VERSION);
+#else
+ weechat_printf (NULL, " %s: (?)", LUA_PLUGIN_NAME);
+#endif
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/perl/weechat-perl.c b/src/plugins/perl/weechat-perl.c
index 325f68068..be870395e 100644
--- a/src/plugins/perl/weechat-perl.c
+++ b/src/plugins/perl/weechat-perl.c
@@ -824,7 +824,11 @@ weechat_perl_signal_debug_libs_cb (void *data, const char *signal,
(void) type_data;
(void) signal_data;
+#ifdef PERL_VERSION_STRING
weechat_printf (NULL, " %s: %s", PERL_PLUGIN_NAME, PERL_VERSION_STRING);
+#else
+ weechat_printf (NULL, " %s: (?)", PERL_PLUGIN_NAME);
+#endif
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/python/weechat-python.c b/src/plugins/python/weechat-python.c
index 7bbb9c9e4..e74f9be0a 100644
--- a/src/plugins/python/weechat-python.c
+++ b/src/plugins/python/weechat-python.c
@@ -1140,7 +1140,11 @@ weechat_python_signal_debug_libs_cb (void *data, const char *signal,
(void) type_data;
(void) signal_data;
+#ifdef PY_VERSION
weechat_printf (NULL, " %s: %s", PYTHON_PLUGIN_NAME, PY_VERSION);
+#else
+ weechat_printf (NULL, " %s: (?)", PYTHON_PLUGIN_NAME);
+#endif
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/ruby/weechat-ruby.c b/src/plugins/ruby/weechat-ruby.c
index beed41391..f97cf7991 100644
--- a/src/plugins/ruby/weechat-ruby.c
+++ b/src/plugins/ruby/weechat-ruby.c
@@ -23,10 +23,12 @@
#undef _
#include <ruby.h>
-#include <ruby/version.h>
#if defined(RUBY_VERSION) && RUBY_VERSION >=19
#include <ruby/encoding.h>
#endif
+#ifdef HAVE_RUBY_VERSION_H
+#include <ruby/version.h>
+#endif
#include <stdarg.h>
#include <sys/types.h>
@@ -962,7 +964,11 @@ weechat_ruby_signal_debug_libs_cb (void *data, const char *signal,
(void) type_data;
(void) signal_data;
+#ifdef HAVE_RUBY_VERSION_H
weechat_printf (NULL, " %s: %s", RUBY_PLUGIN_NAME, ruby_version);
+#else
+ weechat_printf (NULL, " %s: (?)", RUBY_PLUGIN_NAME);
+#endif
return WEECHAT_RC_OK;
}
diff --git a/src/plugins/tcl/weechat-tcl.c b/src/plugins/tcl/weechat-tcl.c
index c5773b5d9..a79434868 100644
--- a/src/plugins/tcl/weechat-tcl.c
+++ b/src/plugins/tcl/weechat-tcl.c
@@ -702,7 +702,11 @@ weechat_tcl_signal_debug_libs_cb (void *data, const char *signal,
(void) type_data;
(void) signal_data;
+#ifdef TCL_VERSION
weechat_printf (NULL, " %s: %s", TCL_PLUGIN_NAME, TCL_VERSION);
+#else
+ weechat_printf (NULL, " %s: (?)", TCL_PLUGIN_NAME);
+#endif
return WEECHAT_RC_OK;
}