C:/Users/vincent/Data/Perso/dev/ocilib/ocilib/src/oci_types.h

00001 /*
00002    +----------------------------------------------------------------------+   
00003    |                                                                      |
00004    |                     OCILIB - C Driver for Oracle                     |
00005    |                                                                      |
00006    |                      (C Wrapper for Oracle OCI)                      |
00007    |                                                                      |
00008    +----------------------------------------------------------------------+
00009    |                      Website : http://www.ocilib.net                 |
00010    +----------------------------------------------------------------------+
00011    |               Copyright (c) 2007-2009 Vincent ROGIER                 |
00012    +----------------------------------------------------------------------+
00013    | This library is free software; you can redistribute it and/or        |
00014    | modify it under the terms of the GNU Lesser General Public           |
00015    | License as published by the Free Software Foundation; either         |
00016    | version 2 of the License, or (at your option) any later version.     |
00017    |                                                                      |
00018    | This library is distributed in the hope that it will be useful,      |
00019    | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
00020    | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU    |
00021    | Lesser General Public License for more details.                      |
00022    |                                                                      |
00023    | You should have received a copy of the GNU Lesser General Public     |
00024    | License along with this library; if not, write to the Free           |
00025    | Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.   |
00026    +----------------------------------------------------------------------+
00027    |          Author: Vincent ROGIER <vince.rogier@gmail.com>             |
00028    +----------------------------------------------------------------------+ 
00029 
00030    +----------------------------------------------------------------------+   
00031    |                          IMPORTANT NOTICE                            |
00032    +----------------------------------------------------------------------+
00033    |                                                                      |
00034    | THIS FILE CONTAINS CONSTANTS AND STRUCTURES DECLARATIONS THAT WERE   |
00035    | PICKED UP FROM ORACLE PUBLIC HEADER FILES 'OCI.H' AND 'OCIDFN.H'.    |
00036    |                                                                      |
00037    | SO THE CONTENT OF THIS FILE IS UNDER ORACLE COPYRIGHT AND THE        |
00038    | DECLARATIONS REPRODUCED HERE ARE ORIGINALLY WRITTEN BY ORACLE        | 
00039    | CORPORATION.                                                         |
00040    |                                                                      |
00041    | THE AUTHOR OF OCILIB LIBRARY HAS NOT WRITTEN THE CONTENT OF THIS     |
00042    | FILE AND HAS PARTIALLY INTEGRATED SOME ORACLE OCI DEFINITONS TO      |
00043    | ALLOW COMPILATION OF THIS OPEN SOURCE LIBRARY WITHOUT HAVING         |
00044    | ORACLE PRODUCTS INSTALLED ON DEVELOPMENT ENVIRONMENTS                |
00045    |                                                                      |
00046    +----------------------------------------------------------------------+
00047 */
00048 
00049 /* ------------------------------------------------------------------------ *
00050  * $Id: oci_types.h, v 3.4.0 2009-07-30 17:40 Vince $
00051  * ------------------------------------------------------------------------ */
00052 
00053 #ifndef OCILIB_OCI_TYPES_H_INCLUDED 
00054 #define OCILIB_OCI_TYPES_H_INCLUDED 
00055 
00056 # define ORATYPES
00057 # define SX_ORACLE
00058 # define SX3_ORACLE 
00059 
00060 #ifndef ORASTDDEF
00061 # include <stddef.h>
00062 # define ORASTDDEF
00063 #endif
00064 
00065 #ifndef ORALIMITS
00066 # include <limits.h>
00067 # define ORALIMITS
00068 #endif
00069 
00070 #ifndef TRUE
00071 # define TRUE  1
00072 # define FALSE 0
00073 #endif
00074 
00075 #ifndef lint 
00076 typedef unsigned char  ub1;                   
00077 typedef   signed char  sb1;                  
00078 #else 
00079 #define ub1 unsigned char 
00080 #define sb1 signed char 
00081 #endif 
00082  
00083 #define UB1MAXVAL ((ub1)UCHAR_MAX) 
00084 #define UB1MINVAL ((ub1)        0) 
00085 #define SB1MAXVAL ((sb1)SCHAR_MAX) 
00086 #define SB1MINVAL ((sb1)SCHAR_MIN) 
00087 #define MINUB1MAXVAL ((ub1)  255) 
00088 #define MAXUB1MINVAL ((ub1)    0) 
00089 #define MINSB1MAXVAL ((sb1)  127) 
00090 #define MAXSB1MINVAL ((sb1) -127) 
00091    
00092 #ifndef lint 
00093 typedef unsigned short    ub2;                
00094 typedef   signed short    sb2;               
00095 #else 
00096 #define ub2  unsigned short 
00097 #define sb2  signed short 
00098 #endif
00099 
00100 #define UB2MAXVAL ((ub2)USHRT_MAX) 
00101 #define UB2MINVAL ((ub2)        0) 
00102 #define SB2MAXVAL ((sb2) SHRT_MAX) 
00103 #define SB2MINVAL ((sb2) SHRT_MIN) 
00104 #define MINUB2MAXVAL ((ub2) 65535) 
00105 #define MAXUB2MINVAL ((ub2)     0) 
00106 #define MINSB2MAXVAL ((sb2) 32767) 
00107 #define MAXSB2MINVAL ((sb2)-32767) 
00108   
00109 #ifndef lint 
00110 typedef unsigned int  ub4;                   
00111 typedef   signed int  sb4;                   
00112 #else 
00113 #define eb4 int 
00114 #define ub4 unsigned int 
00115 #define sb4 signed int 
00116 #endif 
00117  
00118 #define UB4MAXVAL ((ub4)UINT_MAX) 
00119 #define UB4MINVAL ((ub4)        0) 
00120 #define SB4MAXVAL ((sb4) INT_MAX) 
00121 #define SB4MINVAL ((sb4) INT_MIN) 
00122 #define MINUB4MAXVAL ((ub4) 4294967295) 
00123 #define MAXUB4MINVAL ((ub4)          0) 
00124 #define MINSB4MAXVAL ((sb4) 2147483647) 
00125 #define MAXSB4MINVAL ((sb4)-2147483647) 
00126 
00127 #define ORAXB8_DEFINED
00128 #ifndef lint
00129 #ifndef __GNUC__
00130  typedef unsigned _int64 oraub8;
00131  typedef signed _int64 orasb8;
00132 #else
00133  typedef unsigned long long oraub8;
00134  typedef signed long long orasb8;
00135 #endif
00136  typedef oraub8 ub8;
00137  typedef orasb8 sb8;
00138 #else
00139 # define ub8 oraub8
00140 # define sb8 orasb8
00141 # define oraub8 unsigned _int64
00142 # define orasb8 signed _int64
00143 #endif /* !lint */
00144 
00145 #define ORAUB8MINVAL    ((oraub8)0)
00146 #define ORAUB8MAXVAL    ((oraub8)18446744073709551615)
00147 #define ORASB8MINVAL    ((orasb8)-9223372036854775808)
00148 #define ORASB8MAXVAL    ((orasb8) 9223372036854775807)
00149 
00150 #define MAXORAUB8MINVAL ((oraub8)0)
00151 #define MINORAUB8MAXVAL ((oraub8)18446744073709551615)
00152 #define MAXORASB8MINVAL ((orasb8)-9223372036854775807)
00153 #define MINORASB8MAXVAL ((orasb8) 9223372036854775807)
00154 
00155 #define UB1BITS          CHAR_BIT
00156 #define UB1MASK          ((1 << ((uword)CHAR_BIT)) - 1)
00157 
00158 #ifdef lint
00159 # define oratext unsigned char
00160 #else
00161   typedef  unsigned char oratext;
00162 #endif
00163 
00164 #ifndef lint 
00165 typedef          char     eb1;
00166 typedef          short    eb2;               
00167 typedef          int      eb4;               
00168 #else
00169 # define         eb1      char
00170 # define         eb2      short
00171 # define         eb4      int
00172 #endif
00173 
00174 #define EB1MAXVAL      ((eb1)SCHAR_MAX) 
00175 #define EB1MINVAL      ((eb1)        0) 
00176 #define MINEB1MAXVAL   ((eb1)  127) 
00177 #define MAXEB1MINVAL   ((eb1)    0) 
00178 #define EB2MAXVAL      ((eb2) SHRT_MAX) 
00179 #define EB2MINVAL      ((eb2)        0) 
00180 #define MINEB2MAXVAL   ((eb2) 32767) 
00181 #define MAXEB2MINVAL   ((eb2)     0) 
00182 #define EB4MAXVAL      ((eb4) INT_MAX) 
00183 #define EB4MINVAL      ((eb4)        0) 
00184 #define MINEB4MAXVAL   ((eb4) 2147483647) 
00185 #define MAXEB4MINVAL   ((eb4)          0) 
00186 
00187 #ifndef lint 
00188 typedef         sb1  b1;                   
00189 #else 
00190 #define         b1 sb1 
00191 #endif  
00192 #define  B1MAXVAL  SB1MAXVAL 
00193 #define  B1MINVAL  SB1MINVAL 
00194  
00195 #ifndef lint 
00196 typedef         sb2      b2;              
00197 #else 
00198 #define         b2 sb2 
00199 #endif  
00200 #define  B2MAXVAL  SB2MAXVAL 
00201 #define  B2MINVAL  SB2MINVAL 
00202  
00203 #ifndef lint 
00204 typedef         sb4    b4;                
00205 #else 
00206 #define         b4 sb4 
00207 #endif  
00208 # define  B4MAXVAL  SB4MAXVAL 
00209 # define  B4MINVAL  SB4MINVAL 
00210  
00211 #if !defined(LUSEMFC)
00212 # ifdef lint
00213 #  define text unsigned char
00214 # else
00215    typedef oratext text;
00216 # endif
00217 #endif
00218 
00219 #ifdef lint
00220 # define OraText unsigned char
00221 #else
00222   typedef oratext OraText;
00223 #endif
00224 
00225 #ifndef lint
00226 typedef          int eword;                  
00227 typedef unsigned int uword;                  
00228 typedef   signed int sword;                  
00229 #else
00230 #define eword int
00231 #define uword unsigned int
00232 #define sword signed int
00233 #endif 
00234 
00235 #define  EWORDMAXVAL  ((eword) INT_MAX)
00236 #define  EWORDMINVAL  ((eword)       0)
00237 #define  UWORDMAXVAL  ((uword)UINT_MAX)
00238 #define  UWORDMINVAL  ((uword)       0)
00239 #define  SWORDMAXVAL  ((sword) INT_MAX)
00240 #define  SWORDMINVAL  ((sword) INT_MIN)
00241 #define  MINEWORDMAXVAL  ((eword)  2147483647)
00242 #define  MAXEWORDMINVAL  ((eword)      0)
00243 #define  MINUWORDMAXVAL  ((uword)  4294967295)
00244 #define  MAXUWORDMINVAL  ((uword)           0)
00245 #define  MINSWORDMAXVAL  ((sword)  2147483647)
00246 #define  MAXSWORDMINVAL  ((sword) -2147483647)
00247  
00248 #ifdef _WIN64
00249 
00250 #ifndef lint
00251 typedef unsigned _int64 ubig_ora;     
00252 typedef   signed _int64 sbig_ora;     
00253 #else
00254 #define ubig_ora unsigned _int64
00255 #define sbig_ora signed _int64
00256 #endif 
00257 
00258 #define UBIG_ORAMAXVAL ((ubig_ora)_UI64_MAX)
00259 #define UBIG_ORAMINVAL ((ubig_ora)        0)
00260 #define SBIG_ORAMAXVAL ((sbig_ora) _I64_MAX)
00261 #define SBIG_ORAMINVAL ((sbig_ora) _I64_MIN)
00262 #define MINUBIG_ORAMAXVAL ((ubig_ora) 4294967295)
00263 #define MAXUBIG_ORAMINVAL ((ubig_ora)          0)
00264 #define MINSBIG_ORAMAXVAL ((sbig_ora) 2147483647)
00265 #define MAXSBIG_ORAMINVAL ((sbig_ora)-2147483647)
00266 
00267 #else
00268 
00269 #ifndef lint
00270 typedef unsigned long  ubig_ora;             
00271 typedef   signed long  sbig_ora;             
00272 #else
00273 #define ubig_ora unsigned long
00274 #define sbig_ora signed long
00275 #endif 
00276 
00277 #define UBIG_ORAMAXVAL ((ubig_ora)ULONG_MAX)
00278 #define UBIG_ORAMINVAL ((ubig_ora)        0)
00279 #define SBIG_ORAMAXVAL ((sbig_ora) LONG_MAX)
00280 #define SBIG_ORAMINVAL ((sbig_ora) LONG_MIN)
00281 #define MINUBIG_ORAMAXVAL ((ubig_ora) 4294967295)
00282 #define MAXUBIG_ORAMINVAL ((ubig_ora)          0)
00283 #define MINSBIG_ORAMAXVAL ((sbig_ora) 2147483647)
00284 #define MAXSBIG_ORAMINVAL ((sbig_ora)-2147483647)
00285 
00286 #endif  /* _WIN64 */
00287 
00288 #define UBIGORABITS      (UB1BITS * sizeof(ubig_ora))
00289 
00290 #undef CONST
00291 #define CONST const
00292 
00293 #define dvoid void
00294 
00295 typedef void (*lgenfp_t)( void );
00296 
00297 #ifndef ORASYS_TYPES
00298 # include <sys/types.h>
00299 # define ORASYS_TYPES
00300 #endif 
00301 
00302 #ifndef boolean
00303 # define boolean int
00304 #endif 
00305 
00306 #ifdef sparc
00307 # define SIZE_TMAXVAL SB4MAXVAL               
00308 #else
00309 # define SIZE_TMAXVAL UB4MAXVAL              
00310 #endif 
00311 
00312 #define MINSIZE_TMAXVAL (size_t)4294967295
00313 
00314 #if !defined(MOTIF) && !defined(LISPL)  && !defined(__cplusplus) && !defined(LUSEMFC)
00315 typedef  oratext *string;        
00316 #endif 
00317 
00318 #ifndef lint
00319 typedef unsigned short  utext;
00320 #else
00321 #define utext  unsigned short
00322 #endif
00323 
00324 #endif /* OCILIB_OCI_TYPES_H_INCLUDED */
00325 

Generated on Thu Jul 30 17:41:53 2009 for OCILIB (C Driver for Oracle) by  doxygen 1.5.4