Back to index

php5  5.3.10
Defines | Typedefs
mysqlnd_portability.h File Reference
#include <ext/mysqlnd/php_mysqlnd_config.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define STRUCT_OFFSET(t, f)   ((size_t)(char *)&((t *)0)->f)
#define __attribute(A)
#define atoll   atol
#define MYSQLND_SZ_T_SPEC   "%zd"
#define L64(x)   x##LL
#define int1store(T, A)   do { *((int8_t*) (T)) = (A); } while(0)
#define uint1korr(A)   (*(((uint8_t*)(A))))
#define bit_uint2korr(A)
#define bit_uint3korr(A)
#define bit_uint4korr(A)
#define bit_uint5korr(A)
#define bit_uint6korr(A)
#define bit_uint7korr(A)
#define bit_uint8korr(A)
#define sint2korr(A)
#define sint3korr(A)
#define sint4korr(A)
#define sint8korr(A)   (int64_t) uint8korr(A)
#define uint2korr(A)
#define uint3korr(A)
#define uint4korr(A)
#define uint8korr(A)
#define int2store(T, A)
#define int3store(T, A)
#define int4store(T, A)
#define int5store(T, A)
#define int6store(T, A)
#define int8store(T, A)
#define float4get(V, M)   memcpy((char*) &(V),(char*) (M),sizeof(float))
#define float8get(V, M)   memcpy((char*) &(V),(char*) (M),sizeof(double))
#define float8store(T, V)   memcpy((char*) (T),(char*) &(V),sizeof(double))

Typedefs

typedef signed char int8_t
typedef unsigned char uint8_t
typedef signed short int16_t
typedef unsigned short uint16_t

Define Documentation

#define __attribute (   A)

Definition at line 22 of file mysqlnd_portability.h.

#define atoll   atol

Definition at line 45 of file mysqlnd_portability.h.

#define bit_uint2korr (   A)
Value:
((uint16_t) (((uint16_t) (((unsigned char*) (A))[1])) +\
                                   ((uint16_t) (((unsigned char*) (A))[0]) << 8)))

Definition at line 246 of file mysqlnd_portability.h.

#define bit_uint3korr (   A)
Value:
((uint32_t) (((uint32_t) (((unsigned char*) (A))[2])) +\
                                   (((uint32_t) (((unsigned char*) (A))[1])) << 8) +\
                                   (((uint32_t) (((unsigned char*) (A))[0])) << 16)))

Definition at line 248 of file mysqlnd_portability.h.

#define bit_uint4korr (   A)
Value:
((uint32_t) (((uint32_t) (((unsigned char*) (A))[3])) +\
                                   (((uint32_t) (((unsigned char*) (A))[2])) << 8) +\
                                   (((uint32_t) (((unsigned char*) (A))[1])) << 16) +\
                                   (((uint32_t) (((unsigned char*) (A))[0])) << 24)))

Definition at line 251 of file mysqlnd_portability.h.

#define bit_uint5korr (   A)
Value:
((uint64_t)(((uint32_t) (((unsigned char*) (A))[4])) +\
                                    (((uint32_t) (((unsigned char*) (A))[3])) << 8) +\
                                    (((uint32_t) (((unsigned char*) (A))[2])) << 16) +\
                                   (((uint32_t) (((unsigned char*) (A))[1])) << 24)) +\
                                    (((uint64_t) (((unsigned char*) (A))[0])) << 32))

Definition at line 255 of file mysqlnd_portability.h.

#define bit_uint6korr (   A)
Value:
((uint64_t)(((uint32_t) (((unsigned char*) (A))[5])) +\
                                    (((uint32_t) (((unsigned char*) (A))[4])) << 8) +\
                                    (((uint32_t) (((unsigned char*) (A))[3])) << 16) +\
                                    (((uint32_t) (((unsigned char*) (A))[2])) << 24)) +\
                        (((uint64_t) (((uint32_t) (((unsigned char*) (A))[1])) +\
                                    (((uint32_t) (((unsigned char*) (A))[0]) << 8)))) <<\
                                     32))

Definition at line 260 of file mysqlnd_portability.h.

#define bit_uint7korr (   A)
Value:
((uint64_t)(((uint32_t) (((unsigned char*) (A))[6])) +\
                                    (((uint32_t) (((unsigned char*) (A))[5])) << 8) +\
                                    (((uint32_t) (((unsigned char*) (A))[4])) << 16) +\
                                   (((uint32_t) (((unsigned char*) (A))[3])) << 24)) +\
                        (((uint64_t) (((uint32_t) (((unsigned char*) (A))[2])) +\
                                    (((uint32_t) (((unsigned char*) (A))[1])) << 8) +\
                                    (((uint32_t) (((unsigned char*) (A))[0])) << 16))) <<\
                                     32))

Definition at line 267 of file mysqlnd_portability.h.

#define bit_uint8korr (   A)
Value:
((uint64_t)(((uint32_t) (((unsigned char*) (A))[7])) +\
                                    (((uint32_t) (((unsigned char*) (A))[6])) << 8) +\
                                    (((uint32_t) (((unsigned char*) (A))[5])) << 16) +\
                                    (((uint32_t) (((unsigned char*) (A))[4])) << 24)) +\
                        (((uint64_t) (((uint32_t) (((unsigned char*) (A))[3])) +\
                                    (((uint32_t) (((unsigned char*) (A))[2])) << 8) +\
                                    (((uint32_t) (((unsigned char*) (A))[1])) << 16) +\
                                    (((uint32_t) (((unsigned char*) (A))[0])) << 24))) <<\
                                    32))

Definition at line 275 of file mysqlnd_portability.h.

#define float4get (   V,
  M 
)    memcpy((char*) &(V),(char*) (M),sizeof(float))

Definition at line 450 of file mysqlnd_portability.h.

#define float8get (   V,
  M 
)    memcpy((char*) &(V),(char*) (M),sizeof(double))

Definition at line 490 of file mysqlnd_portability.h.

#define float8store (   T,
 
)    memcpy((char*) (T),(char*) &(V),sizeof(double))

Definition at line 491 of file mysqlnd_portability.h.

#define int1store (   T,
  A 
)    do { *((int8_t*) (T)) = (A); } while(0)

Definition at line 242 of file mysqlnd_portability.h.

#define int2store (   T,
  A 
)
Value:
do { uint32_t def_temp= (uint32_t) (A) ;\
                  *((zend_uchar*) (T))  =  (zend_uchar)(def_temp); \
                  *((zend_uchar*) (T+1)) = (zend_uchar)((def_temp >> 8)); } while (0)

Definition at line 390 of file mysqlnd_portability.h.

#define int3store (   T,
  A 
)
Value:
do { /*lint -save -e734 */\
                  *(((char *)(T)))   = (char) ((A));\
                  *(((char *)(T))+1) = (char) (((A) >> 8));\
                  *(((char *)(T))+2) = (char) (((A) >> 16)); \
                  /*lint -restore */} while (0)

Definition at line 393 of file mysqlnd_portability.h.

#define int4store (   T,
  A 
)
Value:
do { \
                  *(((char *)(T)))   = (char) ((A));\
                  *(((char *)(T))+1) = (char) (((A) >> 8));\
                  *(((char *)(T))+2) = (char) (((A) >> 16));\
                  *(((char *)(T))+3) = (char) (((A) >> 24)); } while (0)

Definition at line 398 of file mysqlnd_portability.h.

#define int5store (   T,
  A 
)
Value:
do { \
                  *(((char *)(T)))   = (char)((A));\
                  *(((char *)(T))+1) = (char)(((A) >> 8));\
                  *(((char *)(T))+2) = (char)(((A) >> 16));\
                  *(((char *)(T))+3) = (char)(((A) >> 24)); \
                  *(((char *)(T))+4) = (char)(((A) >> 32)); } while (0)

Definition at line 403 of file mysqlnd_portability.h.

#define int6store (   T,
  A 
)
Value:
do { \
                  *(((char *)(T)))   = (char)((A));\
                  *(((char *)(T))+1) = (char)(((A) >> 8));\
                  *(((char *)(T))+2) = (char)(((A) >> 16));\
                  *(((char *)(T))+3) = (char)(((A) >> 24)); \
                  *(((char *)(T))+4) = (char)(((A) >> 32)); \
                  *(((char *)(T))+5) = (char)(((A) >> 40)); } while (0)

Definition at line 410 of file mysqlnd_portability.h.

#define int8store (   T,
  A 
)
Value:
{ uint32_t def_temp= (uint32_t) (A), def_temp2= (uint32_t) ((A) >> 32); \
                  int4store((T),def_temp); \
                  int4store((T+4),def_temp2); \
                }

Definition at line 417 of file mysqlnd_portability.h.

#define L64 (   x)    x##LL

Definition at line 237 of file mysqlnd_portability.h.

#define MYSQLND_SZ_T_SPEC   "%zd"

Definition at line 235 of file mysqlnd_portability.h.

#define sint2korr (   A)
Value:
(int16_t) (((int16_t) ((zend_uchar) (A)[0])) +\
                                 ((int16_t) ((int16_t) (A)[1]) << 8))

Definition at line 354 of file mysqlnd_portability.h.

#define sint3korr (   A)
Value:
((int32_t) ((((zend_uchar) (A)[2]) & 128) ? \
                  (((uint32_t) 255L << 24) | \
                  (((uint32_t) (zend_uchar) (A)[2]) << 16) |\
                  (((uint32_t) (zend_uchar) (A)[1]) << 8) | \
                   ((uint32_t) (zend_uchar) (A)[0])) : \
                  (((uint32_t) (zend_uchar) (A)[2]) << 16) |\
                  (((uint32_t) (zend_uchar) (A)[1]) << 8) | \
                  ((uint32_t) (zend_uchar) (A)[0])))

Definition at line 356 of file mysqlnd_portability.h.

#define sint4korr (   A)
Value:
(int32_t) (((int32_t) ((zend_uchar) (A)[0])) +\
                              (((int32_t) ((zend_uchar) (A)[1]) << 8)) +\
                              (((int32_t) ((zend_uchar) (A)[2]) << 16)) +\
                              (((int32_t) ((int16_t) (A)[3]) << 24)))

Definition at line 364 of file mysqlnd_portability.h.

#define sint8korr (   A)    (int64_t) uint8korr(A)

Definition at line 369 of file mysqlnd_portability.h.

#define STRUCT_OFFSET (   t,
 
)    ((size_t)(char *)&((t *)0)->f)

Definition at line 18 of file mysqlnd_portability.h.

#define uint1korr (   A)    (*(((uint8_t*)(A))))

Definition at line 243 of file mysqlnd_portability.h.

#define uint2korr (   A)
Value:
(uint16_t) (((uint16_t) ((zend_uchar) (A)[0])) +\
                               ((uint16_t) ((zend_uchar) (A)[1]) << 8))

Definition at line 370 of file mysqlnd_portability.h.

#define uint3korr (   A)
Value:
(uint32_t) (((uint32_t) ((zend_uchar) (A)[0])) +\
                               (((uint32_t) ((zend_uchar) (A)[1])) << 8) +\
                               (((uint32_t) ((zend_uchar) (A)[2])) << 16))

Definition at line 372 of file mysqlnd_portability.h.

#define uint4korr (   A)
Value:
(uint32_t) (((uint32_t) ((zend_uchar) (A)[0])) +\
                               (((uint32_t) ((zend_uchar) (A)[1])) << 8) +\
                               (((uint32_t) ((zend_uchar) (A)[2])) << 16) +\
                               (((uint32_t) ((zend_uchar) (A)[3])) << 24))

Definition at line 375 of file mysqlnd_portability.h.

#define uint8korr (   A)
Value:
((uint64_t)(((uint32_t) ((zend_uchar) (A)[0])) +\
                                                               (((uint32_t) ((zend_uchar) (A)[1])) << 8) +\
                                                               (((uint32_t) ((zend_uchar) (A)[2])) << 16) +\
                                                               (((uint32_t) ((zend_uchar) (A)[3])) << 24)) +\
                                                               (((uint64_t) (((uint32_t) ((zend_uchar) (A)[4])) +\
                                                               (((uint32_t) ((zend_uchar) (A)[5])) << 8) +\
                                                               (((uint32_t) ((zend_uchar) (A)[6])) << 16) +\
                                                               (((uint32_t) ((zend_uchar) (A)[7])) << 24))) << 32))

Definition at line 380 of file mysqlnd_portability.h.


Typedef Documentation

typedef signed short int16_t

Definition at line 93 of file mysqlnd_portability.h.

typedef signed char int8_t

Definition at line 77 of file mysqlnd_portability.h.

typedef unsigned short uint16_t

Definition at line 101 of file mysqlnd_portability.h.

typedef unsigned char uint8_t

Definition at line 85 of file mysqlnd_portability.h.