mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-21 21:20:04 +00:00
Make the bcrypt.c changes portable
This commit is contained in:
parent
eb72dc5f2e
commit
630e7a69b1
5
vendor/bcrypt/bcrypt.c
vendored
5
vendor/bcrypt/bcrypt.c
vendored
@ -24,7 +24,6 @@
|
|||||||
|
|
||||||
#ifdef _WIN32 || _WIN64
|
#ifdef _WIN32 || _WIN64
|
||||||
// On windows we need to generate random bytes differently.
|
// On windows we need to generate random bytes differently.
|
||||||
//typedef __int64 ssize_t;
|
|
||||||
#define BCRYPT_HASHSIZE 60
|
#define BCRYPT_HASHSIZE 60
|
||||||
|
|
||||||
#include "bcrypt.h"
|
#include "bcrypt.h"
|
||||||
@ -51,10 +50,11 @@ static int try_close(int fd)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef _WIN32
|
||||||
static int try_read(int fd, char *out, size_t count)
|
static int try_read(int fd, char *out, size_t count)
|
||||||
{
|
{
|
||||||
size_t total;
|
size_t total;
|
||||||
__int64 partial;
|
ssize_t partial;
|
||||||
|
|
||||||
total = 0;
|
total = 0;
|
||||||
while (total < count)
|
while (total < count)
|
||||||
@ -75,6 +75,7 @@ static int try_read(int fd, char *out, size_t count)
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is a best effort implementation. Nothing prevents a compiler from
|
* This is a best effort implementation. Nothing prevents a compiler from
|
||||||
|
Loading…
Reference in New Issue
Block a user