1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 08:12:21 +01:00
Files
archived-php-src/ext/odbc/php_odbc.h
Calvin Buckley cebe50a1af Remove driver specific support from ODBC (#15727)
* Purge most special cases for building ODBC with specific drivers

PDO_ODBC doesn't do this, and most of these drivers are not in use with
PHP, at least like this. Chances are these expose an ODBC driver you can
use with a normal driver manager like unixODBC or iODBC. If not, it can
be specified as a custom driver, though it does not include any
workarounds.

There might be some redundant definitions now as a result.

IBM Db2 is kept as a special case due to it also being in PDO_ODBC,
though I wonder how good of an idea this is.

See GH-15630

* Remove never used include

This would only be used on 68k classic Mac OS. Did PHP ever run there?

* Fold HAVE_SQL_EXTENDED_FETCH

All supported driver managers can do extended fetches.

* Ope, accidentally deleted this in a refactor

* All driver managers support SQLDataSources now too

So we don't need the define?

* Remove undef CHAR

There's no justification behind as to why this should be.

* Don't special case SQL_TIMESTAMP

The default handling for turning into SQL_C_CHAR is fine, and the
special case for Adabas is no longer needed.

* Assume fetch_hash is always possible

The driver managers and even Db2 support this.

This would also allow simplifying the fetch code to merge fetch_into and
fetch_array into a single implementation perhaps.

* Update UPGRADING for driver specific removal

* Update NEWS for driver specific removal
2025-09-09 00:07:15 -03:00

58 lines
1.8 KiB
C

/*
+----------------------------------------------------------------------+
| Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 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: |
| https://www.php.net/license/3_01.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: Stig Sæther Bakken <ssb@php.net> |
| Andreas Karajannis <Andreas.Karajannis@gmd.de> |
| Kevin N. Shallow <kshallow@tampabay.rr.com> |
+----------------------------------------------------------------------+
*/
#ifndef PHP_ODBC_H
#define PHP_ODBC_H
#ifdef HAVE_UODBC
#ifdef ZTS
#include "TSRM.h"
#endif
extern zend_module_entry odbc_module_entry;
#define odbc_module_ptr &odbc_module_entry
#include "php_version.h"
#define PHP_ODBC_VERSION PHP_VERSION
/* user functions */
PHP_MINIT_FUNCTION(odbc);
PHP_MSHUTDOWN_FUNCTION(odbc);
PHP_RINIT_FUNCTION(odbc);
PHP_RSHUTDOWN_FUNCTION(odbc);
PHP_MINFO_FUNCTION(odbc);
#ifdef PHP_WIN32
# define PHP_ODBC_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
# define PHP_ODBC_API __attribute__ ((visibility("default")))
#else
# define PHP_ODBC_API
#endif
#else
#define odbc_module_ptr NULL
#endif /* HAVE_UODBC */
#define phpext_odbc_ptr odbc_module_ptr
#endif /* PHP_ODBC_H */