php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
config-win.h
Go to the documentation of this file.
1
/* Copyright Abandoned 1996 TCX DataKonsult AB & Monty Program KB & Detron HB
2
This file is public domain and comes with NO WARRANTY of any kind */
3
4
/* Defines for Win32 to make it compatible for MySQL */
5
6
#ifndef _MYSQLND_CONFIG_WIN_H
7
#define _MYSQLND_CONFIG_WIN_H
8
9
#include <sys/locking.h>
10
#include <windows.h>
11
#include <math.h>
/* Because of rint() */
12
#include <fcntl.h>
13
#include <io.h>
14
#include <malloc.h>
15
16
#include <stdint.h>
17
18
#ifndef _WIN64
19
#ifndef _WIN32
20
#define _WIN32
/* Compatible with old source */
21
#endif
22
#ifndef __WIN32__
23
#define __WIN32__
24
#endif
25
#endif
/* _WIN64 */
26
#ifndef __WIN__
27
#define __WIN__
/* To make it easier in VC++ */
28
#endif
29
30
/* Type information */
31
32
#define SIZEOF_LONG 4
33
#define SIZEOF_LONG_LONG 8
34
35
36
#ifndef _WIN64
37
/* Optimized store functions for Intel x86 */
38
39
#define sint2korr(A) (*((int16_t *) (A)))
40
#define sint3korr(A) ((int32_t) ((((zend_uchar) (A)[2]) & 128) ? \
41
(((uint32_t) 255L << 24) | \
42
(((uint32_t) (zend_uchar) (A)[2]) << 16) |\
43
(((uint32_t) (zend_uchar) (A)[1]) << 8) | \
44
((uint32_t) (zend_uchar) (A)[0])) : \
45
(((uint32_t) (zend_uchar) (A)[2]) << 16) |\
46
(((uint32_t) (zend_uchar) (A)[1]) << 8) | \
47
((uint32_t) (zend_uchar) (A)[0])))
48
#define sint4korr(A) (*((int32_t *) (A)))
49
#define uint2korr(A) (*((uint16_t *) (A)))
50
#define uint3korr(A) (int32_t) (*((uint32_t *) (A)) & 0xFFFFFF)
51
#define uint4korr(A) (*((uint32_t *) (A)))
52
#define uint5korr(A) ((uint64_t)(((uint32_t) ((zend_uchar) (A)[0])) +\
53
(((uint32_t) ((zend_uchar) (A)[1])) << 8) +\
54
(((uint32_t) ((zend_uchar) (A)[2])) << 16) +\
55
(((uint32_t) ((zend_uchar) (A)[3])) << 24)) +\
56
(((uint64_t) ((zend_uchar) (A)[4])) << 32))
57
#define uint8korr(A) (*((uint64_t *) (A)))
58
#define sint8korr(A) (*((int64_t *) (A)))
59
#define int2store(T,A) *((uint16_t*) (T))= (uint16_t) (A)
60
#define int3store(T,A) { *(T)= (zend_uchar) ((A));\
61
*(T+1)=(zend_uchar) (((uint32_t) (A) >> 8));\
62
*(T+2)=(zend_uchar) (((A) >> 16)); }
63
#define int4store(T,A) *((int32_t *) (T))= (int32_t) (A)
64
#define int5store(T,A) { *(T)= (zend_uchar)((A));\
65
*((T)+1)=(zend_uchar) (((A) >> 8));\
66
*((T)+2)=(zend_uchar) (((A) >> 16));\
67
*((T)+3)=(zend_uchar) (((A) >> 24)); \
68
*((T)+4)=(zend_uchar) (((A) >> 32)); }
69
#define int8store(T,A) *((uint64_t *) (T))= (uint64_t) (A)
70
71
#define float8get(V,M) { *((int32_t *) &V) = *((int32_t*) M); \
72
*(((int32_t *) &V)+1) = *(((int32_t*) M)+1); }
73
#define float8store(T,V) { *((int32_t *) T) = *((int32_t*) &V); \
74
*(((int32_t *) T)+1) = *(((int32_t*) &V)+1); }
75
#define float4get(V,M) { *((int32_t *) &(V)) = *((int32_t*) (M)); }
76
77
#endif
/* _WIN64 */
78
79
#endif
/* _MYSQLND_CONFIG_WIN_H */
ext
mysqlnd
config-win.h
Generated on Sat Aug 23 2025 01:46:09 for php-internal-docs by
1.13.2