xref: /PHP-7.1/ext/odbc/php_odbc.h (revision ccd4716e)
1 /*
2    +----------------------------------------------------------------------+
3    | PHP Version 7                                                        |
4    +----------------------------------------------------------------------+
5    | Copyright (c) 1997-2018 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> (Birdstep)      |
18    +----------------------------------------------------------------------+
19 */
20 
21 /* $Id$ */
22 
23 #ifndef PHP_ODBC_H
24 #define PHP_ODBC_H
25 
26 #if HAVE_UODBC
27 
28 #ifdef ZTS
29 #include "TSRM.h"
30 #endif
31 
32 extern zend_module_entry odbc_module_entry;
33 #define odbc_module_ptr &odbc_module_entry
34 
35 #include "php_version.h"
36 #define PHP_ODBC_VERSION PHP_VERSION
37 
38 #if defined(HAVE_DBMAKER) || defined(PHP_WIN32) || defined(HAVE_IBMDB2) || defined(HAVE_UNIXODBC) || defined(HAVE_BIRDSTEP) || defined(HAVE_IODBC)
39 # define PHP_ODBC_HAVE_FETCH_HASH 1
40 #endif
41 
42 /* user functions */
43 PHP_MINIT_FUNCTION(odbc);
44 PHP_MSHUTDOWN_FUNCTION(odbc);
45 PHP_RINIT_FUNCTION(odbc);
46 PHP_RSHUTDOWN_FUNCTION(odbc);
47 PHP_MINFO_FUNCTION(odbc);
48 
49 PHP_FUNCTION(odbc_error);
50 PHP_FUNCTION(odbc_errormsg);
51 PHP_FUNCTION(odbc_setoption);
52 PHP_FUNCTION(odbc_autocommit);
53 PHP_FUNCTION(odbc_close);
54 PHP_FUNCTION(odbc_close_all);
55 PHP_FUNCTION(odbc_commit);
56 PHP_FUNCTION(odbc_connect);
57 PHP_FUNCTION(odbc_pconnect);
58 PHP_FUNCTION(odbc_cursor);
59 #ifdef HAVE_SQLDATASOURCES
60 PHP_FUNCTION(odbc_data_source);
61 #endif
62 PHP_FUNCTION(odbc_do);
63 PHP_FUNCTION(odbc_exec);
64 PHP_FUNCTION(odbc_execute);
65 #ifdef PHP_ODBC_HAVE_FETCH_HASH
66 PHP_FUNCTION(odbc_fetch_array);
67 PHP_FUNCTION(odbc_fetch_object);
68 #endif
69 PHP_FUNCTION(odbc_fetch_into);
70 PHP_FUNCTION(odbc_fetch_row);
71 PHP_FUNCTION(odbc_field_len);
72 PHP_FUNCTION(odbc_field_scale);
73 PHP_FUNCTION(odbc_field_name);
74 PHP_FUNCTION(odbc_field_type);
75 PHP_FUNCTION(odbc_field_num);
76 PHP_FUNCTION(odbc_free_result);
77 #if !defined(HAVE_SOLID) && !defined(HAVE_SOLID_30)
78 PHP_FUNCTION(odbc_next_result);
79 #endif
80 PHP_FUNCTION(odbc_num_fields);
81 PHP_FUNCTION(odbc_num_rows);
82 PHP_FUNCTION(odbc_prepare);
83 PHP_FUNCTION(odbc_result);
84 PHP_FUNCTION(odbc_result_all);
85 PHP_FUNCTION(odbc_rollback);
86 PHP_FUNCTION(odbc_binmode);
87 PHP_FUNCTION(odbc_longreadlen);
88 PHP_FUNCTION(odbc_tables);
89 PHP_FUNCTION(odbc_columns);
90 #if !defined(HAVE_DBMAKER) && !defined(HAVE_SOLID) && !defined(HAVE_SOLID_35)    /* not supported now */
91 PHP_FUNCTION(odbc_columnprivileges);
92 PHP_FUNCTION(odbc_tableprivileges);
93 #endif
94 #if !defined(HAVE_SOLID) || !defined(HAVE_SOLID_35)    /* not supported */
95 PHP_FUNCTION(odbc_foreignkeys);
96 PHP_FUNCTION(odbc_procedures);
97 PHP_FUNCTION(odbc_procedurecolumns);
98 #endif
99 PHP_FUNCTION(odbc_gettypeinfo);
100 PHP_FUNCTION(odbc_primarykeys);
101 PHP_FUNCTION(odbc_specialcolumns);
102 PHP_FUNCTION(odbc_statistics);
103 
104 #ifdef PHP_WIN32
105 # define PHP_ODBC_API __declspec(dllexport)
106 #elif defined(__GNUC__) && __GNUC__ >= 4
107 # define PHP_ODBC_API __attribute__ ((visibility("default")))
108 #else
109 # define PHP_ODBC_API
110 #endif
111 
112 #else
113 
114 #define odbc_module_ptr NULL
115 
116 #endif /* HAVE_UODBC */
117 
118 #define phpext_odbc_ptr odbc_module_ptr
119 
120 #endif /* PHP_ODBC_H */
121 
122 /*
123  * Local variables:
124  * tab-width: 4
125  * c-basic-offset: 4
126  * End:
127  */
128