module maintencance RELEASE_0_1_2
authorMichael Wallner <mike@php.net>
Mon, 12 Dec 2011 17:46:20 +0000 (18:46 +0100)
committerMichael Wallner <mike@php.net>
Mon, 12 Dec 2011 17:46:20 +0000 (18:46 +0100)
config.m4
package.xml
php_ircclient.c
php_ircclient.h

index e102e14348f6ea2e855ee99a1308ee52e0ae240b..f39ea427bbb564bb480badd220106c4f372615fe 100644 (file)
--- a/config.m4
+++ b/config.m4
@@ -2,6 +2,9 @@ PHP_ARG_WITH(ircclient, for ircclient support,
        [  --with-ircclient[=LIBIRCCLIENTDIR]   Include ircclient support])
 
 if test "$PHP_IRCCLIENT" != "no"; then
+       AC_PROG_EGREP
+       AC_PROG_SED
+       
        AC_MSG_CHECKING([for libircclient/libircclient.h])
        for d in $PHP_IRCCLIENT /usr /usr/local /opt; do
                if test -f $d/include/libircclient/libircclient.h; then
@@ -13,6 +16,10 @@ if test "$PHP_IRCCLIENT" != "no"; then
        if test "x$IRCCLIENT_DIR" = "x"; then
                AC_MSG_ERROR([not found])
        fi
+       PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH=`$EGREP "define LIBIRC_VERSION_HIGH" $IRCCLIENT_DIR/include/libircclient/libirc_params.h | $SED -e 's/[[^0-9\x]]//g'`
+       PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW=`$EGREP "define LIBIRC_VERSION_LOW" $IRCCLIENT_DIR/include/libircclient/libirc_params.h | $SED -e 's/[[^0-9\x]]//g'`
+       AC_DEFINE_UNQUOTED([PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH], [$PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH], [ ])
+       AC_DEFINE_UNQUOTED([PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW], [$PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW], [ ])
        
        PHP_ADD_INCLUDE($IRCCLIENT_DIR/include)
        PHP_CHECK_LIBRARY(ircclient, irc_create_session,
index 67640ec8dfec8226740ca8aeb47d2063238c86cf..95f90d397557231d9f920ef6d362112c9aeb2db7 100644 (file)
@@ -21,9 +21,9 @@
   <email>mike@php.net</email>
   <active>yes</active>
  </lead>
- <date>2011-12-06</date>
+ <date>2011-12-12</date>
  <version>
-  <release>0.1.1</release>
+  <release>0.1.2</release>
   <api>0.1.0</api>
  </version>
  <stability>
@@ -32,7 +32,7 @@
  </stability>
  <license>BSD, revised</license>
  <notes><![CDATA[
-Fixed PHP-5.3 build
+Added Session::doRaw(string msg)
 ]]></notes>
  <contents>
   <dir name="/">
index 2ffa331e25ca8f272e8aed67c6406ff9bbdebbca..e68df2ec0e2be10e49b7f334c9c4e1569940cb18 100644 (file)
@@ -1,15 +1,29 @@
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: ircclient                                                  |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2011, Michael Wallner <mike@php.net>                 |
+    +--------------------------------------------------------------------+
+*/
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
-#include "php.h"
-#include "php_ini.h"
-#include "php_network.h"
-#include "ext/standard/php_string.h"
-#include "ext/standard/info.h"
+#include <main/php.h>
+#include <main/php_config.h>
+#include <main/php_ini.h>
+#include <main/php_network.h>
+#include <ext/standard/php_string.h>
+#include <ext/standard/info.h>
 
-#include "zend_interfaces.h"
+#include <Zend/zend.h>
+#include <Zend/zend_constants.h>
+#include <Zend/zend_interfaces.h>
 
 #include "php_ircclient.h"
 
@@ -63,16 +77,19 @@ const zend_function_entry php_ircclient_function_entry[] = {
        {0}
 };
 
+PHP_MINIT_FUNCTION(ircclient);
+PHP_MINFO_FUNCTION(ircclient);
+
 zend_module_entry ircclient_module_entry = {
        STANDARD_MODULE_HEADER,
        "ircclient",
        php_ircclient_function_entry,
        PHP_MINIT(ircclient),
-       PHP_MSHUTDOWN(ircclient),
-       PHP_RINIT(ircclient),   
-       PHP_RSHUTDOWN(ircclient),
+       NULL,
+       NULL,
+       NULL,
        PHP_MINFO(ircclient),
-       "0.1.0",
+       PHP_IRCCLIENT_VERSION,
        STANDARD_MODULE_PROPERTIES
 };
 
@@ -1082,33 +1099,31 @@ PHP_MINIT_FUNCTION(ircclient)
        return SUCCESS;
 }
 
-
-PHP_MSHUTDOWN_FUNCTION(ircclient)
-{
-       return SUCCESS;
-}
-
-
-
-PHP_RINIT_FUNCTION(ircclient)
+PHP_MINFO_FUNCTION(ircclient)
 {
-       return SUCCESS;
-}
-
-
+       unsigned int high, low;
+       char *version[2];
 
-PHP_RSHUTDOWN_FUNCTION(ircclient)
-{
-       return SUCCESS;
-}
+       irc_get_version(&high, &low);
+       spprintf(&version[1], 0, "%u.%u", high, low);
+       spprintf(&version[0], 0, "%u.%u", PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_HIGH, PHP_IRCCLIENT_LIBIRCCLIENT_VERSION_LOW);
 
+       php_info_print_table_start();
+       php_info_print_table_header(2, "IRC client support", "enabled");
+       php_info_print_table_row(2, "Version", PHP_IRCCLIENT_VERSION);
+       php_info_print_table_end();
 
-PHP_MINFO_FUNCTION(ircclient)
-{
        php_info_print_table_start();
-       php_info_print_table_header(2, "ircclient support", "enabled");
+       php_info_print_table_header(3, "Used Library", "compiled", "linked");
+       php_info_print_table_row(3,
+               "libircclient",
+               version[0],
+               version[1]
+       );
        php_info_print_table_end();
 
+       efree(version[0]);
+       efree(version[1]);
 }
 
 
index b7c665ee1f01b66747769c0f33c0405bb47dc5b7..a74d6f89580e529baa56315b693eec7cc55c1320 100644 (file)
@@ -1,37 +1,23 @@
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: ircclient                                                  |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2011, Michael Wallner <mike@php.net>                 |
+    +--------------------------------------------------------------------+
+*/
 
 #ifndef PHP_IRCCLIENT_H
 #define PHP_IRCCLIENT_H
 
+#define PHP_IRCCLIENT_VERSION "0.1.2"
+
 extern zend_module_entry ircclient_module_entry;
 #define phpext_ircclient_ptr &ircclient_module_entry
 
-#ifdef PHP_WIN32
-#      define PHP_IRCCLIENT_API __declspec(dllexport)
-#elif defined(__GNUC__) && __GNUC__ >= 4
-#      define PHP_IRCCLIENT_API __attribute__ ((visibility("default")))
-#else
-#      define PHP_IRCCLIENT_API
-#endif
-
-#ifdef ZTS
-#include "TSRM.h"
-#endif
-
-PHP_MINIT_FUNCTION(ircclient);
-PHP_MSHUTDOWN_FUNCTION(ircclient);
-PHP_RINIT_FUNCTION(ircclient);
-PHP_RSHUTDOWN_FUNCTION(ircclient);
-PHP_MINFO_FUNCTION(ircclient);
-
-
-
-
-#ifdef ZTS
-#define IRCCLIENT_G(v) TSRMG(ircclient_globals_id, zend_ircclient_globals *, v)
-#else
-#define IRCCLIENT_G(v) (ircclient_globals.v)
-#endif
-
 #endif