From daf2e8ab5eb324b0a0447e87a92afb6788a722a7 Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Wed, 20 Feb 2013 22:43:42 +0100 Subject: [PATCH] maintenance --- TODO | 1 - config.m4 | 12 ++++---- package.xml | 18 ++++++++---- src/php_pq.c => php_pq.c | 0 php_pq.h | 59 +++++++++++++++++++++++++++++++++++++++- src/php_pq.h | 58 --------------------------------------- 6 files changed, 76 insertions(+), 72 deletions(-) rename src/php_pq.c => php_pq.c (100%) mode change 120000 => 100644 php_pq.h delete mode 100644 src/php_pq.h diff --git a/TODO b/TODO index 6c64a62..97766e3 100644 --- a/TODO +++ b/TODO @@ -3,7 +3,6 @@ * pq\Exception * pq\Event\Result\Destroy, * pq\Event\Connection\Destroy -* spprintf -> smartstr * fetchInto/fetchCtor? * unlisten? * LOB stream wrapper diff --git a/config.m4 b/config.m4 index 18ee250..8301db0 100644 --- a/config.m4 +++ b/config.m4 @@ -1,5 +1,5 @@ -PHP_ARG_WITH(pq, for pq support, -[ --with-pq Include pq support]) +PHP_ARG_WITH(pq, [whether to enable libpq (PostgreSQL) support], +[ --with-pq Include libpq support]) if test "$PHP_PQ" != "no"; then SEARCH_PATH="/usr/local /usr /opt" @@ -17,7 +17,7 @@ if test "$PHP_PQ" != "no"; then done if test -z "$PQ_DIR"; then - AC_MSG_FAILURE(could not find include/libpq-events.h) + AC_MSG_ERROR(could not find include/libpq-events.h) fi PHP_ADD_INCLUDE($PQ_DIR/include) @@ -30,11 +30,9 @@ if test "$PHP_PQ" != "no"; then ],[ -L$PQ_DIR/$PHP_LIBDIR ]) - PHP_CHECK_LIBRARY(pq, PQlibVersion, AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion)) + PHP_CHECK_LIBRARY(pq, PQlibVersion, [AC_DEFINE(HAVE_PQLIBVERSION, 1, Have PQlibVersion)]) - PQ_SRC="src/php_pq.c" - PHP_NEW_EXTENSION(pq, $PQ_SRC, $ext_shared) - PHP_ADD_BUILD_DIR($ext_builddir/src, 1) + PHP_NEW_EXTENSION(pq, php_pq.c, $ext_shared) PHP_ADD_EXTENSION_DEP(pq, raphf) fi diff --git a/package.xml b/package.xml index dce9319..98375fc 100644 --- a/package.xml +++ b/package.xml @@ -38,10 +38,8 @@ http://pear.php.net/dtd/package-2.0.xsd"> - - - - + + @@ -51,15 +49,25 @@ http://pear.php.net/dtd/package-2.0.xsd"> + + + + + + + + + + @@ -76,7 +84,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> raphf pecl.php.net - 1.0.0 + 0.1.0 raphf diff --git a/src/php_pq.c b/php_pq.c similarity index 100% rename from src/php_pq.c rename to php_pq.c diff --git a/php_pq.h b/php_pq.h deleted file mode 120000 index 6b88c69..0000000 --- a/php_pq.h +++ /dev/null @@ -1 +0,0 @@ -src/php_pq.h \ No newline at end of file diff --git a/php_pq.h b/php_pq.h new file mode 100644 index 0000000..fc67bf0 --- /dev/null +++ b/php_pq.h @@ -0,0 +1,58 @@ +/* + +--------------------------------------------------------------------+ + | PECL :: pq | + +--------------------------------------------------------------------+ + | 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) 2013, Michael Wallner | + +--------------------------------------------------------------------+ +*/ + + +#ifndef PHP_PQ_H +#define PHP_PQ_H + +#define PHP_PQ_EXT_VERSION "1.0.0dev" + +int pq_module_number; +zend_module_entry pq_module_entry; +#define phpext_pq_ptr &pq_module_entry + +#ifdef PHP_WIN32 +# define PHP_PQ_API __declspec(dllexport) +#elif defined(__GNUC__) && __GNUC__ >= 4 +# define PHP_PQ_API __attribute__ ((visibility("default"))) +#else +# define PHP_PQ_API +#endif + +#ifdef ZTS +# include "TSRM.h" +#endif + +/* +ZEND_BEGIN_MODULE_GLOBALS(pq) + long global_value; + char *global_string; +ZEND_END_MODULE_GLOBALS(pq) + +#ifdef ZTS +#define PQ_G(v) TSRMG(pq_globals_id, zend_pq_globals *, v) +#else +#define PQ_G(v) (pq_globals.v) +#endif +*/ + +#endif /* PHP_PQ_H */ + + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */ diff --git a/src/php_pq.h b/src/php_pq.h deleted file mode 100644 index fc67bf0..0000000 --- a/src/php_pq.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - +--------------------------------------------------------------------+ - | PECL :: pq | - +--------------------------------------------------------------------+ - | 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) 2013, Michael Wallner | - +--------------------------------------------------------------------+ -*/ - - -#ifndef PHP_PQ_H -#define PHP_PQ_H - -#define PHP_PQ_EXT_VERSION "1.0.0dev" - -int pq_module_number; -zend_module_entry pq_module_entry; -#define phpext_pq_ptr &pq_module_entry - -#ifdef PHP_WIN32 -# define PHP_PQ_API __declspec(dllexport) -#elif defined(__GNUC__) && __GNUC__ >= 4 -# define PHP_PQ_API __attribute__ ((visibility("default"))) -#else -# define PHP_PQ_API -#endif - -#ifdef ZTS -# include "TSRM.h" -#endif - -/* -ZEND_BEGIN_MODULE_GLOBALS(pq) - long global_value; - char *global_string; -ZEND_END_MODULE_GLOBALS(pq) - -#ifdef ZTS -#define PQ_G(v) TSRMG(pq_globals_id, zend_pq_globals *, v) -#else -#define PQ_G(v) (pq_globals.v) -#endif -*/ - -#endif /* PHP_PQ_H */ - - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ -- 2.30.2