mirror of
https://github.com/cesanta/mongoose.git
synced 2025-06-12 12:42:50 +08:00
A little bit more warnings suppresed
This commit is contained in:
parent
4b539d4b95
commit
dd49c0791f
13
mongoose.c
13
mongoose.c
@ -67,6 +67,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
#if defined(_WIN32) && !defined(__SYMBIAN32__) // Windows specific
|
#if defined(_WIN32) && !defined(__SYMBIAN32__) // Windows specific
|
||||||
|
#undef _WIN32_WINNT
|
||||||
#define _WIN32_WINNT 0x0400 // To make it link in VS2005
|
#define _WIN32_WINNT 0x0400 // To make it link in VS2005
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
@ -127,8 +128,12 @@ typedef long off_t;
|
|||||||
#define mg_sleep(x) Sleep(x)
|
#define mg_sleep(x) Sleep(x)
|
||||||
|
|
||||||
#define pipe(x) _pipe(x, MG_BUF_LEN, _O_BINARY)
|
#define pipe(x) _pipe(x, MG_BUF_LEN, _O_BINARY)
|
||||||
|
#ifndef popen
|
||||||
#define popen(x, y) _popen(x, y)
|
#define popen(x, y) _popen(x, y)
|
||||||
|
#endif
|
||||||
|
#ifndef pclose
|
||||||
#define pclose(x) _pclose(x)
|
#define pclose(x) _pclose(x)
|
||||||
|
#endif
|
||||||
#define close(x) _close(x)
|
#define close(x) _close(x)
|
||||||
#define dlsym(x,y) GetProcAddress((HINSTANCE) (x), (y))
|
#define dlsym(x,y) GetProcAddress((HINSTANCE) (x), (y))
|
||||||
#define RTLD_LAZY 0
|
#define RTLD_LAZY 0
|
||||||
@ -191,7 +196,9 @@ struct pollfd {
|
|||||||
|
|
||||||
|
|
||||||
// Mark required libraries
|
// Mark required libraries
|
||||||
|
#ifdef _MSC_VER
|
||||||
#pragma comment(lib, "Ws2_32.lib")
|
#pragma comment(lib, "Ws2_32.lib")
|
||||||
|
#endif
|
||||||
|
|
||||||
#else // UNIX specific
|
#else // UNIX specific
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
@ -2142,6 +2149,7 @@ static void MD5Update(MD5_CTX *ctx, unsigned char const *buf, unsigned len) {
|
|||||||
static void MD5Final(unsigned char digest[16], MD5_CTX *ctx) {
|
static void MD5Final(unsigned char digest[16], MD5_CTX *ctx) {
|
||||||
unsigned count;
|
unsigned count;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
|
uint32_t *a;
|
||||||
|
|
||||||
count = (ctx->bits[0] >> 3) & 0x3F;
|
count = (ctx->bits[0] >> 3) & 0x3F;
|
||||||
|
|
||||||
@ -2158,8 +2166,9 @@ static void MD5Final(unsigned char digest[16], MD5_CTX *ctx) {
|
|||||||
}
|
}
|
||||||
byteReverse(ctx->in, 14);
|
byteReverse(ctx->in, 14);
|
||||||
|
|
||||||
((uint32_t *) ctx->in)[14] = ctx->bits[0];
|
a = (uint32_t *)ctx->in;
|
||||||
((uint32_t *) ctx->in)[15] = ctx->bits[1];
|
a[14] = ctx->bits[0];
|
||||||
|
a[15] = ctx->bits[1];
|
||||||
|
|
||||||
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
MD5Transform(ctx->buf, (uint32_t *) ctx->in);
|
||||||
byteReverse((unsigned char *) ctx->buf, 4);
|
byteReverse((unsigned char *) ctx->buf, 4);
|
||||||
|
Loading…
Reference in New Issue
Block a user