cvs: php4 /ext/informix Makefile.frag config.m4 ifx.ec php_informix.h php_informix_includes.h stub.c
| From: | Jani Taskinen | Date: | Fri, 14 Jun 2002 00:01:47 +0000 |
| Subject: | cvs: php4 /ext/informix Makefile.frag config.m4 ifx.ec php_informix.h php_informix_includes.h stub.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-12356@lists.php.net to get a copy of this message | ||
sniper Thu Jun 13 20:01:47 2002 EDT
Added files:
/php4/ext/informix php_informix_includes.h
Removed files:
/php4/ext/informix stub.c
Modified files:
/php4/ext/informix Makefile.frag config.m4 ifx.ec php_informix.h
Log:
- Fixed bug #15803 (and propably others related too)
. Changed the compile so that it doesn't "pollute" the INCLUDES
anymore and thus cause trouble with other extensions which
might use the same header files. (e.g. ODBC)
. Some fixes for Informix compile problems (with the new build system)
. Removed unnecessary stub.c file.
Index: php4/ext/informix/Makefile.frag
diff -u php4/ext/informix/Makefile.frag:1.1 php4/ext/informix/Makefile.frag:1.2
--- php4/ext/informix/Makefile.frag:1.1 Thu Mar 7 09:18:50 2002
+++ php4/ext/informix/Makefile.frag Thu Jun 13 20:01:41 2002
@@ -1,5 +1,5 @@
-$(builddir)/ifx.c: $(srcdir)/ifx.ec $(builddir)/libphpifx.a
+$(srcdir)/ifx.c: $(srcdir)/ifx.ec $(builddir)/libphpifx.a
(if test -d $(INFORMIXDIR); then \
THREADLIB=POSIX $(INFORMIXDIR)/bin/esql -e $(IFX_ESQL_FLAGS) $(srcdir)/ifx.ec; mv ifx.c $@; \
else \
@@ -7,4 +7,4 @@
fi)
$(builddir)/libphpifx.a:
- $(LINK) $(IFX_LIBOBJS)
+ $(LIBTOOL) --mode=link $(CC) $(IFX_LIBOBJS) -o $@
Index: php4/ext/informix/config.m4
diff -u php4/ext/informix/config.m4:1.26 php4/ext/informix/config.m4:1.27
--- php4/ext/informix/config.m4:1.26 Tue Mar 12 11:21:48 2002
+++ php4/ext/informix/config.m4 Thu Jun 13 20:01:43 2002
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.26 2002/03/12 16:21:48 sas Exp $
+dnl $Id: config.m4,v 1.27 2002/06/14 00:01:43 sniper Exp $
dnl
PHP_ARG_WITH(informix,for Informix support,
@@ -8,23 +8,19 @@
if test "$PHP_INFORMIX" != "no"; then
- PHP_NEW_EXTENSION(informix, ifx.c, $ext_shared)
- PHP_ADD_MAKEFILE_FRAGMENT
- PHP_SUBST(INFORMIX_SHARED_LIBADD)
-
if test "$INFORMIXDIR" = ""; then
AC_MSG_ERROR([INFORMIXDIR environment variable is not set.])
fi
if test "$PHP_INFORMIX" = "yes"; then
- PHP_ADD_INCLUDE($INFORMIXDIR/incl/esql)
+ IFX_INCLUDE=-I$INFORMIXDIR/incl/esql
PHP_ADD_LIBPATH($INFORMIXDIR/lib, INFORMIX_SHARED_LIBADD)
PHP_ADD_LIBPATH($INFORMIXDIR/lib/esql, INFORMIX_SHARED_LIBADD)
else
if test "$PHP_INFORMIX" != "$INFORMIXDIR"; then
AC_MSG_ERROR([Specified Informix base install directory is different than your INFORMIXDIR
environment variable.])
fi
- PHP_ADD_INCLUDE($PHP_INFORMIX/incl/esql)
+ IFX_INCLUDE=-I$PHP_INFORMIX/incl/esql
PHP_ADD_LIBPATH($PHP_INFORMIX/lib, INFORMIX_SHARED_LIBADD)
PHP_ADD_LIBPATH($PHP_INFORMIX/lib/esql, INFORMIX_SHARED_LIBADD)
fi
@@ -58,7 +54,9 @@
else
IFX_ESQL_FLAGS="$IFX_ESQL_FLAGS -EUHAVE_IFX_IUS"
fi
- PHP_SUBST(IFX_ESQL_FLAGS)
+
+ PHP_NEW_EXTENSION(informix, ifx.c, $ext_shared,, $IFX_INCLUDE)
+ PHP_ADD_MAKEFILE_FRAGMENT
for i in $IFX_LIBS; do
case "$i" in
@@ -90,7 +88,9 @@
esac
done
- AC_DEFINE(HAVE_IFX,1,[ ])
+ PHP_SUBST(INFORMIX_SHARED_LIBADD)
PHP_SUBST(INFORMIXDIR)
PHP_SUBST(IFX_LIBOBJS)
+ PHP_SUBST(IFX_ESQL_FLAGS)
+ AC_DEFINE(HAVE_IFX,1,[ ])
fi
Index: php4/ext/informix/ifx.ec
diff -u php4/ext/informix/ifx.ec:1.65 php4/ext/informix/ifx.ec:1.66
--- php4/ext/informix/ifx.ec:1.65 Fri Mar 22 07:15:39 2002
+++ php4/ext/informix/ifx.ec Thu Jun 13 20:01:43 2002
@@ -20,7 +20,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: ifx.ec,v 1.65 2002/03/22 12:15:39 derick Exp $ */
+/* $Id: ifx.ec,v 1.66 2002/06/14 00:01:43 sniper Exp $ */
/* -------------------------------------------------------------------
* if you want a function reference : "grep '^\*\*' ifx.ec" will give
@@ -41,6 +41,7 @@
#include "ext/standard/php_standard.h"
#include "php_open_temporary_file.h"
#include "php_informix.h"
+#include "php_informix_includes.h"
#include "php_globals.h"
#include "php_ini.h"
Index: php4/ext/informix/php_informix.h
diff -u php4/ext/informix/php_informix.h:1.17 php4/ext/informix/php_informix.h:1.18
--- php4/ext/informix/php_informix.h:1.17 Tue Dec 11 10:29:41 2001
+++ php4/ext/informix/php_informix.h Thu Jun 13 20:01:44 2002
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_informix.h,v 1.17 2001/12/11 15:29:41 sebastian Exp $ */
+/* $Id: php_informix.h,v 1.18 2002/06/14 00:01:44 sniper Exp $ */
#ifndef PHP_INFORMIX_H
#define PHP_INFORMIX_H
@@ -43,12 +43,6 @@
extern zend_module_entry ifx_module_entry;
#define ifx_module_ptr &ifx_module_entry
-#undef TYPEMAX
-#undef CHAR
-
-#include "locator.h"
-#include "sqltypes.h"
-
/* user functions */
PHP_MINIT_FUNCTION(ifx);
PHP_RINIT_FUNCTION(ifx);
@@ -121,56 +115,6 @@
# define IFXG(v) TSRMG(ifx_globals_id, zend_ifx_globals *, v)
#else
# define IFXG(v) (ifx_globals.v)
-#endif
-
-#define MAX_RESID 64
-#define BLOBINFILE 0 /* 0=in memory, 1=in file */
-
-/* query result set data */
-typedef struct ifx_res {
- char connecid[16];
- char cursorid[16];
- char descrpid[16];
- char statemid[16];
- int isscroll;
- int ishold;
- int iscursory;
- int paramquery;
- int numcols;
- int rowid;
- int affected_rows;
- long sqlerrd[6];
- int res_id[MAX_RESID];
-} IFX_RES;
-
-typedef struct _IFX_IDRES {
- int type;
- union {
- struct {
- int mode;
- loc_t blob_data;
- } BLOBRES;
-
- struct {
- char *char_data;
- int len;
- } CHARRES;
-
-#if HAVE_IFX_IUS
- struct {
- ifx_lo_t slob_data;
- ifx_lo_create_spec_t *createspec;
- int lofd;
- } SLOBRES;
-#endif
- } DATARES;
-} IFX_IDRES;
-
-#define BLOB DATARES.BLOBRES
-#define CHAR DATARES.CHARRES
-
-#if HAVE_IFX_IUS
-#define SLOB DATARES.SLOBRES
#endif
#else /* not HAVE_IFX */
Index: php4/ext/informix/php_informix_includes.h
+++ php4/ext/informix/php_informix_includes.h
/*
+----------------------------------------------------------------------+
| PHP Version 4 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2002 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 2.02 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available at through the world-wide-web at |
| http://www.php.net/license/2_02.txt.
|
| If you did not receive a copy of the PHP license and are unable to |
| obtain it through the world-wide-web, please send a note to |
| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Danny Heijl <Danny.Heijl@cevi.be>, initial cut (ODS 7) |
| Christian Cartus <chc@idgruppe.de>, blobs, and IUS 9 |
| Jouni Ahto <jouni.ahto@exdec.fi>, configuration stuff |
| based on mysql code by: Zeev Suraski <zeev@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id: php_informix_includes.h,v 1.1 2002/06/14 00:01:45 sniper Exp $ */
#ifndef PHP_INFORMIX_INCLUDES_H
#define PHP_INFORMIX_INCLUDES_H
#if HAVE_IFX /* with Informix */
#undef TYPEMAX
#undef CHAR
#include "locator.h"
#include "sqltypes.h"
#define MAX_RESID 64
#define BLOBINFILE 0 /* 0=in memory, 1=in file */
/* query result set data */
typedef struct ifx_res {
char connecid[16];
char cursorid[16];
char descrpid[16];
char statemid[16];
int isscroll;
int ishold;
int iscursory;
int paramquery;
int numcols;
int rowid;
int affected_rows;
long sqlerrd[6];
int res_id[MAX_RESID];
} IFX_RES;
typedef struct _IFX_IDRES {
int type;
union {
struct {
int mode;
loc_t blob_data;
} BLOBRES;
struct {
char *char_data;
int len;
} CHARRES;
#if HAVE_IFX_IUS
struct {
ifx_lo_t slob_data;
ifx_lo_create_spec_t *createspec;
int lofd;
} SLOBRES;
#endif
} DATARES;
} IFX_IDRES;
#define BLOB DATARES.BLOBRES
#define CHAR DATARES.CHARRES
#if HAVE_IFX_IUS
#define SLOB DATARES.SLOBRES
#endif
#endif /* HAVE_IFX */
#endif /* PHP_INFORMIX_INCLUDES_H */