[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/se3-unattended/var/se3/unattended/install/linuxaux/opt/perl/lib/site_perl/5.10.0/i586-linux-thread-multi/auto/DBI/ -> dbivport.h (source)

   1  /* dbivport.h
   2  
   3      Provides macros that enable greater portability between DBI versions.
   4  
   5      This file should be *copied* and included in driver distributions
   6      and #included into the source, after #include DBIXS.h
   7  
   8      New driver releases should include an updated copy of dbivport.h
   9      from the most recent DBI release.
  10  */
  11  
  12  #ifndef DBI_VPORT_H
  13  #define DBI_VPORT_H
  14  
  15  #ifndef DBIh_SET_ERR_CHAR
  16  /* Emulate DBIh_SET_ERR_CHAR
  17      Only uses the err_i, errstr and state parameters.
  18  */
  19  #define DBIh_SET_ERR_CHAR(h, imp_xxh, err_c, err_i, errstr, state, method) \
  20          sv_setiv(DBIc_ERR(imp_xxh), err_i); \
  21          (state) ? (void)sv_setpv(DBIc_STATE(imp_xxh), state) : (void)SvOK_off(DBIc_STATE(imp_xxh)); \
  22          sv_setpv(DBIc_ERRSTR(imp_xxh), errstr)
  23  #endif
  24  
  25  #ifndef DBIcf_Executed
  26  #define DBIcf_Executed    0x080000
  27  #endif
  28  
  29  #ifndef DBIc_TRACE_LEVEL_MASK
  30  #define DBIc_TRACE_LEVEL_MASK   0x0000000F
  31  #define DBIc_TRACE_FLAGS_MASK   0xFFFFFF00
  32  #define DBIc_TRACE_SETTINGS(imp) (DBIc_DBISTATE(imp)->debug)
  33  #define DBIc_TRACE_LEVEL(imp)   (DBIc_TRACE_SETTINGS(imp) & DBIc_TRACE_LEVEL_MASK)
  34  #define DBIc_TRACE_FLAGS(imp)   (DBIc_TRACE_SETTINGS(imp) & DBIc_TRACE_FLAGS_MASK)
  35  /* DBIc_TRACE_MATCHES - true if s1 'matches' s2  (c.f. trace_msg())
  36     DBIc_TRACE_MATCHES(foo, DBIc_TRACE_SETTINGS(imp))
  37  */
  38  #define DBIc_TRACE_MATCHES(s1, s2)      \
  39          (  ((s1 & DBIc_TRACE_LEVEL_MASK) >= (s2 & DBIc_TRACE_LEVEL_MASK)) \
  40          || ((s1 & DBIc_TRACE_FLAGS_MASK)  & (s2 & DBIc_TRACE_FLAGS_MASK)) )
  41  /* DBIc_TRACE - true if flags match & DBI level>=flaglevel, or if DBI level>level
  42     DBIc_TRACE(imp,         0, 0, 4) = if level >= 4
  43     DBIc_TRACE(imp, DBDtf_FOO, 2, 4) = if tracing DBDtf_FOO & level>=2 or level>=4
  44     DBIc_TRACE(imp, DBDtf_FOO, 2, 0) = as above but never trace just due to level
  45  */
  46  #define DBIc_TRACE(imp, flags, flaglevel, level)        \
  47          (  (flags && (DBIc_TRACE_FLAGS(imp) & flags) && (DBIc_TRACE_LEVEL(imp) >= flaglevel)) \
  48          || (level && DBIc_TRACE_LEVEL(imp) >= level) )
  49  #endif
  50  
  51  
  52  #endif /* !DBI_VPORT_H */


Generated: Tue Mar 17 22:47:18 2015 Cross-referenced by PHPXref 0.7.1