1 /* 2 +----------------------------------------------------------------------+ 3 | PHP Version 7 | 4 +----------------------------------------------------------------------+ 5 | Copyright (c) The PHP Group | 6 +----------------------------------------------------------------------+ 7 | This source file is subject to version 3.01 of the PHP license, | 8 | that is bundled with this package in the file LICENSE, and is | 9 | available through the world-wide-web at the following url: | 10 | http://www.php.net/license/3_01.txt | 11 | If you did not receive a copy of the PHP license and are unable to | 12 | obtain it through the world-wide-web, please send a note to | 13 | license@php.net so we can mail you a copy immediately. | 14 +----------------------------------------------------------------------+ 15 | Authors: Stig Sæther Bakken <ssb@php.net> | 16 | Andreas Karajannis <Andreas.Karajannis@gmd.de> | 17 | Kevin N. Shallow <kshallow@tampabay.rr.com> | 18 +----------------------------------------------------------------------+ 19 */ 20 21 #ifndef PHP_ODBC_H 22 #define PHP_ODBC_H 23 24 #if HAVE_UODBC 25 26 #ifdef ZTS 27 #include "TSRM.h" 28 #endif 29 30 extern zend_module_entry odbc_module_entry; 31 #define odbc_module_ptr &odbc_module_entry 32 33 #include "php_version.h" 34 #define PHP_ODBC_VERSION PHP_VERSION 35 36 #if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || defined(HAVE_UNIXODBC) || defined(HAVE_IODBC) 37 # define PHP_ODBC_HAVE_FETCH_HASH 1 38 #endif 39 40 /* user functions */ 41 PHP_MINIT_FUNCTION(odbc); 42 PHP_MSHUTDOWN_FUNCTION(odbc); 43 PHP_RINIT_FUNCTION(odbc); 44 PHP_RSHUTDOWN_FUNCTION(odbc); 45 PHP_MINFO_FUNCTION(odbc); 46 47 PHP_FUNCTION(odbc_error); 48 PHP_FUNCTION(odbc_errormsg); 49 PHP_FUNCTION(odbc_setoption); 50 PHP_FUNCTION(odbc_autocommit); 51 PHP_FUNCTION(odbc_close); 52 PHP_FUNCTION(odbc_close_all); 53 PHP_FUNCTION(odbc_commit); 54 PHP_FUNCTION(odbc_connect); 55 PHP_FUNCTION(odbc_pconnect); 56 PHP_FUNCTION(odbc_cursor); 57 #ifdef HAVE_SQLDATASOURCES 58 PHP_FUNCTION(odbc_data_source); 59 #endif 60 PHP_FUNCTION(odbc_do); 61 PHP_FUNCTION(odbc_exec); 62 PHP_FUNCTION(odbc_execute); 63 #ifdef PHP_ODBC_HAVE_FETCH_HASH 64 PHP_FUNCTION(odbc_fetch_array); 65 PHP_FUNCTION(odbc_fetch_object); 66 #endif 67 PHP_FUNCTION(odbc_fetch_into); 68 PHP_FUNCTION(odbc_fetch_row); 69 PHP_FUNCTION(odbc_field_len); 70 PHP_FUNCTION(odbc_field_scale); 71 PHP_FUNCTION(odbc_field_name); 72 PHP_FUNCTION(odbc_field_type); 73 PHP_FUNCTION(odbc_field_num); 74 PHP_FUNCTION(odbc_free_result); 75 #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30) 76 PHP_FUNCTION(odbc_next_result); 77 #endif 78 PHP_FUNCTION(odbc_num_fields); 79 PHP_FUNCTION(odbc_num_rows); 80 PHP_FUNCTION(odbc_prepare); 81 PHP_FUNCTION(odbc_result); 82 PHP_FUNCTION(odbc_result_all); 83 PHP_FUNCTION(odbc_rollback); 84 PHP_FUNCTION(odbc_binmode); 85 PHP_FUNCTION(odbc_longreadlen); 86 PHP_FUNCTION(odbc_tables); 87 PHP_FUNCTION(odbc_columns); 88 #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_35) /* not supported now */ 89 PHP_FUNCTION(odbc_columnprivileges); 90 PHP_FUNCTION(odbc_tableprivileges); 91 #endif 92 #if !defined(HAVE_SOLID) || !defined(HAVE_SOLID_35) /* not supported */ 93 PHP_FUNCTION(odbc_foreignkeys); 94 PHP_FUNCTION(odbc_procedures); 95 PHP_FUNCTION(odbc_procedurecolumns); 96 #endif 97 PHP_FUNCTION(odbc_gettypeinfo); 98 PHP_FUNCTION(odbc_primarykeys); 99 PHP_FUNCTION(odbc_specialcolumns); 100 PHP_FUNCTION(odbc_statistics); 101 102 #ifdef PHP_WIN32 103 # define PHP_ODBC_API __declspec(dllexport) 104 #elif defined(__GNUC__) && __GNUC__ >= 4 105 # define PHP_ODBC_API __attribute__ ((visibility("default"))) 106 #else 107 # define PHP_ODBC_API 108 #endif 109 110 #else 111 112 #define odbc_module_ptr NULL 113 114 #endif /* HAVE_UODBC */ 115 116 #define phpext_odbc_ptr odbc_module_ptr 117 118 #endif /* PHP_ODBC_H */ 119