- Moved ingres_ii to PECL

This commit is contained in:
foobar 2005-05-24 08:40:59 +00:00
parent 7b442413d7
commit e4c6d7708e
10 changed files with 1 additions and 1926 deletions

1
NEWS
View File

@ -8,6 +8,7 @@ PHP NEWS
. ext/cpdf (Tony, Derick)
. ext/dio (Jani, Derick)
. ext/fam (Jani, Derick)
. ext/ingres_ii (Jani, Derick)
. ext/mnogosearch (Jani, Derick)
. ext/w32api (Jani, Derick)
. ext/yp (Jani, Derick)

View File

@ -1,2 +0,0 @@
Ingres II
David Hénot

View File

@ -1,5 +0,0 @@
this extension is experimental,
its functions may change their names
or move to extension all together
so do not rely to much on them
you have been warned!

View File

@ -1,13 +0,0 @@
Ingres II extension for PHP
===========================
This extension provides access to Ingres II servers from PHP 4.0.
It is still in development and has been only quickly tested on
Linux (Mandrake 5.3 for Intel), so you should avoid using it with
critical data.
To enable the extension just add --with-ingres to your ./configure
line. If the Ingres files are not found, use --with-ingres=DIR instead
to specify your Ingres installation directory.
Please report suggestions to henot@php.net.

View File

@ -1,37 +0,0 @@
dnl
dnl $Id$
dnl
PHP_ARG_WITH(ingres, for Ingres II support,
[ --with-ingres[=DIR] Include Ingres II support. DIR is the Ingres
base directory (default $II_SYSTEM/ingres)])
if test "$PHP_INGRES" != "no"; then
AC_DEFINE(HAVE_II, 1, [Whether you have Ingres II])
PHP_NEW_EXTENSION(ingres_ii, ii.c, $ext_shared)
PHP_SUBST(II_SHARED_LIBADD)
if test "$PHP_INGRES" = "yes"; then
II_DIR=$II_SYSTEM/ingres
else
II_DIR=$PHP_INGRES
fi
if test -r $II_DIR/files/iiapi.h; then
II_INC_DIR=$II_DIR/files
else
AC_MSG_ERROR(Cannot find iiapi.h under $II_DIR/files)
fi
if test -r $II_DIR/lib/libiiapi.a; then
II_LIB_DIR=$II_DIR/lib
else
AC_MSG_ERROR(Cannot find libiiapi.a under $II_DIR/lib)
fi
PHP_ADD_LIBRARY_WITH_PATH(iiapi.1, $II_LIB_DIR, II_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(q.1, $II_LIB_DIR, II_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(frame.1, $II_LIB_DIR, II_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(compat.1, $II_LIB_DIR, II_SHARED_LIBADD)
PHP_ADD_INCLUDE($II_INC_DIR)
fi

View File

@ -1,36 +0,0 @@
// $Id$
// vim:ft=javascript ts=4 sw=4
ARG_WITH("ingres", "Ingres support", "no");
if (PHP_INGRES != "no") {
if (PHP_INGRES == "yes") {
// no path was supplied to --with-ingres
// Find Ingres header files and libaries through %II_SYSTEM%
var ii_system=WshShell.Environment("Process").Item("II_SYSTEM");
if (ii_system != "") {
if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", "CFLAGS_INGRES", ii_system + "\\ingres\\files;" + PHP_INGRES) &&
CHECK_LIB("iilibapi.lib", "ingres", ii_system + "\\ingres\\lib;" + PHP_INGRES)) {
AC_DEFINE('HAVE_II', 1);
EXTENSION("ingres","ii.c");
} else {
// ingres is missing files
WARNING("Ingres not enabled; libraries and headers not found in " + ii_system);
}
} else {
// %II_SYSTEM% is not set
WARNING("Ingres not enabled; %II_SYSTEM% has not been defined");
}
} else {
// path supplied to --with-ingres
if (CHECK_HEADER_ADD_INCLUDE("iiapi.h", "CFLAGS_INGRES", PHP_INGRES + "\\ingres\\files;") &&
CHECK_LIB("iilibapi.lib", "ingres", PHP_INGRES + "\\ingres\\lib;")) {
AC_DEFINE('HAVE_II', 1);
EXTENSION("ingres","ii.c");
} else {
// cannot find files in supplied path
WARNING("Ingres not enabled; libraries and headers not found");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1,65 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.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. |
+----------------------------------------------------------------------+
| Contributed by ECL IP'S Software & Services |
| http://www.eclips-software.com |
| mailto://idev@eclips-software.com |
| Author: David Hénot <henot@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef II_H
#define II_H
#if HAVE_II
#include "php_ii.h"
#include "iiapi.h"
typedef struct _II_LINK {
int autocommit;
II_PTR connHandle;
II_PTR tranHandle;
II_PTR stmtHandle;
II_LONG fieldCount;
IIAPI_DESCRIPTOR *descriptor;
} II_LINK;
static int ii_sync(IIAPI_GENPARM *genParm);
static int ii_success(IIAPI_GENPARM *genParm);
#define II_FAIL 0
#define II_OK 1
#define II_NO_DATA 2
static int _close_statement(II_LINK *link);
static int _rollback_transaction(II_LINK *link TSRMLS_DC);
static void _close_ii_link(II_LINK *link TSRMLS_DC);
static void _close_ii_plink(zend_rsrc_list_entry *link TSRMLS_DC);
static int php_ii_get_default_link(INTERNAL_FUNCTION_PARAMETERS);
static void php_ii_set_default_link(int id TSRMLS_DC);
static void php_ii_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent);
static char *php_ii_field_name(II_LINK *ii_link, int index TSRMLS_DC);
static void php_ii_field_info(INTERNAL_FUNCTION_PARAMETERS, int info_type);
static void php_ii_fetch(INTERNAL_FUNCTION_PARAMETERS, II_LINK *ii_link, int result_type);
#endif /* HAVE_II */
#endif /* II_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/

View File

@ -1,111 +0,0 @@
# Microsoft Developer Studio Project File - Name="ingres" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=ingres - Win32 Debug_TS
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "ingres.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "ingres.mak" CFG="ingres - Win32 Debug_TS"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "ingres - Win32 Release_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "ingres - Win32 Debug_TS" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "ingres - Win32 Release_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release_TS"
# PROP BASE Intermediate_Dir "Release_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release_TS"
# PROP Intermediate_Dir "Release_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "INGRES_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=0 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "COMPILE_DL_INGRES_II" /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_II=1 /D ZTS=1 /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "NDEBUG"
# ADD RSC /l 0x407 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 php5ts.lib oiapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"..\..\Release_TS/php_ingres.dll" /libpath:"..\..\Release_TS" /libpath:"..\..\Release_TS_Inline"
!ELSEIF "$(CFG)" == "ingres - Win32 Debug_TS"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug_TS"
# PROP BASE Intermediate_Dir "Debug_TS"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug_TS"
# PROP Intermediate_Dir "Debug_TS"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "INGRES_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "..\.." /I "..\..\main" /I "..\..\Zend" /I "..\..\TSRM" /D ZEND_DEBUG=1 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "PHP_EXPORTS" /D "COMPILE_DL_INGRES_II" /D ZTS=1 /D "ZEND_WIN32" /D "PHP_WIN32" /D HAVE_II=1 /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x407 /d "_DEBUG"
# ADD RSC /l 0x407 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 php5ts_debug.lib oiapi.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"..\..\Debug_TS/php_ingres.dll" /pdbtype:sept /libpath:"..\..\Debug_TS"
!ENDIF
# Begin Target
# Name "ingres - Win32 Release_TS"
# Name "ingres - Win32 Debug_TS"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\ii.c
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\ii.h
# End Source File
# Begin Source File
SOURCE=.\php_ii.h
# End Source File
# End Group
# End Target
# End Project

View File

@ -1,112 +0,0 @@
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2004 The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.0 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.php.net/license/3_0.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. |
+----------------------------------------------------------------------+
| Contributed by ECL IP'S Software & Services |
| http://www.eclips-software.com |
| mailto://idev@eclips-software.com |
| Computer Associates, http://ingres.ca.com |
| Authors: David Hénot |
| Grant Croker |
+----------------------------------------------------------------------+
| Authors: David Hénot <henot@php.net> |
| Grant Croker <grantc@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
#ifndef PHP_II_H
#define PHP_II_H
#if HAVE_II
extern zend_module_entry ingres_module_entry;
#define phpext_ingres_ptr &ingres_module_entry
/*
Since the buildconf/configure process difers in behaviour between
Linux/UNIX and Windows, the following line allows us to build on
both setups. It's not a perfect solution.
*/
#define phpext_ingres_ii_ptr &ingres_module_entry
#ifdef PHP_WIN32
#define PHP_II_API __declspec(dllexport)
#else
#define PHP_II_API
#endif
PHP_MINIT_FUNCTION(ii);
PHP_MSHUTDOWN_FUNCTION(ii);
PHP_RINIT_FUNCTION(ii);
PHP_RSHUTDOWN_FUNCTION(ii);
PHP_MINFO_FUNCTION(ii);
PHP_FUNCTION(ingres_connect);
PHP_FUNCTION(ingres_pconnect);
PHP_FUNCTION(ingres_close);
PHP_FUNCTION(ingres_query);
PHP_FUNCTION(ingres_num_rows);
PHP_FUNCTION(ingres_num_fields);
PHP_FUNCTION(ingres_field_name);
PHP_FUNCTION(ingres_field_type);
PHP_FUNCTION(ingres_field_nullable);
PHP_FUNCTION(ingres_field_length);
PHP_FUNCTION(ingres_field_precision);
PHP_FUNCTION(ingres_field_scale);
PHP_FUNCTION(ingres_fetch_array);
PHP_FUNCTION(ingres_fetch_row);
PHP_FUNCTION(ingres_fetch_object);
PHP_FUNCTION(ingres_rollback);
PHP_FUNCTION(ingres_commit);
PHP_FUNCTION(ingres_autocommit);
ZEND_BEGIN_MODULE_GLOBALS(ii)
long allow_persistent;
long max_persistent;
long max_links;
char *default_database;
char *default_user;
char *default_password;
long num_persistent;
long num_links;
long default_link;
ZEND_END_MODULE_GLOBALS(ii)
#define II_ASSOC (1<<0)
#define II_NUM (1<<1)
#define II_BOTH (II_ASSOC|II_NUM)
#ifdef ZTS
#define IIG(v) TSRMG(ii_globals_id, zend_ii_globals *, v)
#else
#define IIG(v) (ii_globals.v)
#endif
#else
#define phpext_ingres_ptr NULL
#endif
#endif /* PHP_II_H */
/*
* Local variables:
* tab-width: 4
* c-basic-offset: 4
* End:
*/