view src/mysql/ngx_mysql.h @ 647:95d7da23ea53 release-0.3.45

nginx-0.3.45-RELEASE import *) Feature: the "ssl_verify_client", "ssl_verify_depth", and "ssl_client_certificate" directives. *) Change: the $request_method variable now returns the main request method. *) Change: the ° symbol codes were changed in koi-win conversion table. *) Feature: the euro and N symbols were added to koi-win conversion table. *) Bugfix: if nginx distributed the requests among several backends and some backend failed, then requests intended for this backend was directed to one live backend only instead of being distributed among the rest.
author Igor Sysoev <igor@sysoev.ru>
date Sat, 06 May 2006 16:28:56 +0000
parents 4946078f0a79
children 7cbef16c71a1
line wrap: on
line source


/*
 * Copyright (C) Igor Sysoev
 */


#ifndef _NGX_MYSQL_H_INCLUDED_
#define _NGX_MYSQL_H_INCLUDED_


#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>


typedef struct {
    ngx_peer_connection_t   peer;
} ngx_mysql_t;


#if (NGX_HAVE_LITTLE_ENDIAN && NGX_HAVE_NONALIGNED && 0)

#define ngx_m16toh(n)   (*(uint32_t *) n & 0x0000ffff)
#define ngx_m24toh(n)   (*(uint32_t *) n & 0x00ffffff)
#define ngx_m32toh(n)   *(uint32_t *) n

#else

#define ngx_m16toh(n)   (n[0] | n[1] << 8)
#define ngx_m24toh(n)   (n[0] | n[1] << 8 | n[2] << 16)
#define ngx_m32toh(n)   (n[0] | n[1] << 8 | n[2] << 16 | n[3] << 24)

#endif


#endif /* _NGX_MYSQL_H_INCLUDED_ */