Browse Source

Fixed win32 and win64 iguana and libcrypto777.a builds

release/v0.1
Mayur Nagekar 9 years ago
parent
commit
3ac595ae19
  1. BIN
      agents/win32/iguana.exe
  2. BIN
      agents/win32/libcrypto777.a
  3. BIN
      agents/win64/iguana.exe
  4. BIN
      agents/win64/libcrypto777.a
  5. 11
      crypto777/OS_nonportable.c
  6. 2
      crypto777/OS_portable.c
  7. 10
      crypto777/OS_portable.h
  8. 4
      crypto777/OS_time.c
  9. 10
      crypto777/bitcoind_RPC.c
  10. 5
      crypto777/cJSON.c
  11. 10
      crypto777/inet.c
  12. 3
      crypto777/m_win64
  13. 6
      crypto777/mingw
  14. 4
      crypto777/mingw64
  15. 6
      crypto777/mingw64_inc
  16. 7
      iguana/SuperNET.c
  17. 10
      iguana/SuperNET_category.c
  18. 9
      iguana/SuperNET_keys.c
  19. 2
      iguana/exchanges777.h
  20. 2
      iguana/m_win64
  21. 79
      iguana/main.c
  22. 4
      iguana/mingw
  23. 2
      iguana/mingw32
  24. 4
      iguana/mingw64
  25. 6
      iguana/mingw64_inc
  26. 20
      includes/openssl/asn1.h
  27. 6
      includes/openssl/curl.h
  28. 6
      includes/openssl/curlbuild.h
  29. 4
      mingw.path64
  30. BIN
      win/libsecp256k1.a
  31. 31
      win/mingw.h
  32. 1368
      win/pthread.h

BIN
agents/win32/iguana.exe

Binary file not shown.

BIN
agents/win32/libcrypto777.a

Binary file not shown.

BIN
agents/win64/iguana.exe

Binary file not shown.

BIN
agents/win64/libcrypto777.a

Binary file not shown.

11
crypto777/OS_nonportable.c

@ -16,6 +16,7 @@
#include "OS_portable.h"
#ifdef __PNACL
int32_t OS_nonportable_syncmap(struct OS_mappedptr *mp,long len)
{
@ -34,11 +35,10 @@ void *OS_nonportable_tmpalloc(char *dirname,char *name,struct OS_memspace *mem,l
#include <share.h>
#include <errno.h>
#include <string.h>
#include <windows.h>
//#include <windows.h>
#include <inttypes.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <errno.h>
//#include <winsock2.h>
//#include <ws2tcpip.h>
#include <fcntl.h> /* _O_BINARY */
#include <stdlib.h>
#include <wincrypt.h>
@ -47,9 +47,6 @@ void *OS_nonportable_tmpalloc(char *dirname,char *name,struct OS_memspace *mem,l
#include <tlhelp32.h>
#include <time.h>
#include <windows.h>
#include <errno.h>
#include <io.h>
#include "../win/mman.h"

2
crypto777/OS_portable.c

@ -14,7 +14,7 @@
******************************************************************************/
#include "OS_portable.h"
#include <sys/stat.h>
//#include <sys/stat.h>
#ifndef MAP_FILE
#define MAP_FILE 0
#endif

10
crypto777/OS_portable.h

@ -27,22 +27,24 @@
#include <errno.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <sys/time.h>
#include <time.h>
#ifdef __MINGW
#define sleep(x) Sleep(1000*(x))
#include "../win/mingw.h"
#include "../win/mman.h"
#define EADDRINUSE WSAEADDRINUSE
//#define EADDRINUSE WSAEADDRINUSE
#else
#include <poll.h>
#include <sys/poll.h>
#include <netdb.h>
#include <pthread.h>
#include <netinet/in.h>
//#include <netinet/in.h>
//#include "in.h"
#include <sys/mman.h>
#include <sys/socket.h>
//#include <winsock2.h>
#define closesocket close
#endif
#ifndef MIN

4
crypto777/OS_time.c

@ -31,6 +31,8 @@ uint32_t First_utc;
int32_t UTC_ADJUST;
#ifdef _WIN32
struct tm *gmtime_r(const time_t *timep,struct tm *result)
{
struct tm *p = gmtime(timep);
@ -47,7 +49,7 @@ struct tm *_gmtime32(const time_t *timep,struct tm *result) { return(gmtime_r(ti
time_t _time32(struct tm *tm) { return(time(NULL)); }
time_t _localtime32(struct tm *tm) { return(time(NULL)); }
#include <Windows.h>
#include <windows.h>
#include <stdint.h> // portable: uint64_t MSVC: __int64
// MSVC defines this in winsock2.h!?

10
crypto777/bitcoind_RPC.c

@ -14,12 +14,16 @@
******************************************************************************/
#include "OS_portable.h"
#include "../includes/cJSON.h"
//#include "../includes/cJSON.h"
#include <curl/curl.h>
#include <curl/easy.h>
#include <curl.h>
#include <easy.h>
// return data from the server
#define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL|CURL_GLOBAL_WIN32)
#define CURL_GLOBAL_SSL (1<<0)
#define CURL_GLOBAL_WIN32 (1<<1)
struct return_string {
char *ptr;
size_t len;

5
crypto777/cJSON.c

@ -29,6 +29,7 @@
//#define DEFINES_ONLY
//#include "../common/system777.c"
//#undef DEFINES_ONLY
#define DBL_EPSILON 2.2204460492503131E-16
static const char *ep;
@ -129,8 +130,8 @@ static char *print_number(cJSON *item)
{
char *str;
double d = item->valuedouble;
if ( fabs(((double)item->valueint) - d) <= DBL_EPSILON && d >= (1. - DBL_EPSILON) && d < (1LL << 62) )//d <= INT_MAX && d >= INT_MIN )
{
if ( fabs(((double)item->valueint) - d) <= DBL_EPSILON && d >= (1. - DBL_EPSILON) && d < (1LL << 62) )//d <= INT_MAX && d >= INT_MIN )
{
str = (char *)cJSON_malloc(24); /* 2^64+1 can be represented in 21 chars + sign. */
if ( str != 0 )
sprintf(str,"%lld",(long long)item->valueint);

10
crypto777/inet.c

@ -19,12 +19,12 @@
#ifndef crypto777_inet_h
#define crypto777_inet_h
#include "OS_portable.h"
#include <netinet/in.h>
//#include <in.h>
#ifdef _WIN32
#include <windows.h>
#include <io.h>
#include <winsock2.h>
//#include <windows.h>
//#include <io.h>
//#include <winsock2.h>
#define in6_addr sockaddr
#define in_addr_t struct sockaddr_storage
#define EAFNOSUPPORT WSAEAFNOSUPPORT
@ -37,7 +37,7 @@ struct sockaddr_in6 {
u_long sin6_scope_id;
};
#endif
#define AF_INET6 23
static int inet_ntop4(unsigned char *src, char *dst, size_t size);
static int inet_ntop6(unsigned char *src, char *dst, size_t size);
static int inet_pton4(char *src, unsigned char *dst);

3
crypto777/m_win64

@ -1,2 +1 @@
echo do equivalent of: gcc -c -O2 *.c jpeg/*.c jpeg/win/*.c
echo do equivalent of: rm ../agents/libcrypto777.a; ar rcu ../agents/libcrypto777.a *.o
make -f mingw64

6
crypto777/mingw

@ -1,6 +1,6 @@
include crypto777.sources
all:
$(TOOL_DIR)/$(MINGW)-gcc -D __MINGW -c $(CRYPTO777_SRCS)
$(TOOL_DIR)/$(MINGW)-ar rcu *.o ../agents/libcrypto777.a
$(TOOL_DIR)/$(MINGW)-gcc -w -D __MINGW -c $(CRYPTO777_SRCS) -I/usr/mingw32/include -I/usr/mingw32/include/sys -I/home/user/SuperNET/includes/openssl -I/home/user/SuperNET/crypto777
$(TOOL_DIR)/$(MINGW)-ar rcu ../agents/win32/libcrypto777.a *.o
rm *.o

4
crypto777/mingw64

@ -1,3 +1,3 @@
include ../mingw.path
include mingw
include ../mingw.path64
include mingw64_inc

6
crypto777/mingw64_inc

@ -0,0 +1,6 @@
include crypto777.sources
all:
$(TOOL_DIR)/$(MINGW)-gcc -w -D __MINGW -c $(CRYPTO777_SRCS) -I/usr/share/mingw-w64/include -I /usr/share/mingw-w64/include/sys -I/home/user/SuperNET/includes/openssl
$(TOOL_DIR)/$(MINGW)-ar rcu ../agents/win64/libcrypto777.a *.o
rm *.o

7
iguana/SuperNET.c

@ -15,6 +15,13 @@
#include "iguana777.h"
#include "../includes/tweetnacl.h"
#include "../crypto777/OS_portable.h"
#include "../includes/libgfshare.h"
#include "../includes/utlist.h"
#include "../includes/uthash.h"
#include "../includes/curve25519.h"
#include "../includes/cJSON.h"
cJSON *SuperNET_argjson(cJSON *json)
{

10
iguana/SuperNET_category.c

@ -15,6 +15,16 @@
#include "iguana777.h"
#include "../includes/tweetnacl.h"
#include "../crypto777/OS_portable.h"
#include "../includes/libgfshare.h"
#include "../includes/utlist.h"
#include "../includes/uthash.h"
#include "../includes/curve25519.h"
#include "../includes/cJSON.h"
bits256 calc_categoryhashes(bits256 *subhashp,char *category,char *subcategory)
{
bits256 categoryhash;

9
iguana/SuperNET_keys.c

@ -14,6 +14,15 @@
******************************************************************************/
#include "iguana777.h"
#include "../includes/tweetnacl.h"
#include "../crypto777/OS_portable.h"
#include "../includes/libgfshare.h"
#include "../includes/utlist.h"
#include "../includes/uthash.h"
#include "../includes/curve25519.h"
#include "../includes/cJSON.h"
bits256 SuperNET_wallet2shared(bits256 wallethash,bits256 wallet2priv)
{

2
iguana/exchanges777.h

@ -25,7 +25,7 @@
#define EXCHANGES777_MINPOLLGAP 1
#define EXCHANGES777_MAXDEPTH 200
#define EXCHANGES777_DEFAULT_TIMEOUT 30
typedef void CURL;
struct exchange_info;
struct exchange_funcs

2
iguana/m_win64

@ -1 +1 @@
echo do equivalent of: gcc -o ../agents/iguana -O2 *.c ../agents/libcrypto777.a -lssl -lcrypto -lpthread -lm
make -f mingw64

79
iguana/main.c

@ -23,7 +23,7 @@
#include "../pnacl_main.h"
#include "iguana777.h"
#include "SuperNET.h"
#include <stdio.h>
// ALL globals must be here!
char *Iguana_validcommands[] =
{
@ -527,15 +527,10 @@ extern gfshare_rand_func_t gfshare_fill_rand;
/* ------------------------------------------------------[ Preparation ]---- */
/* Initialise a gfshare context for producing shares */
gfshare_ctx* gfshare_ctx_init_enc(uint8_t* /* sharenrs */,
unsigned int /* sharecount */,
uint8_t /* threshold */,
unsigned int /* size */);
gfshare_ctx* gfshare_ctx_init_enc(uint8_t* /* sharenrs */,unsigned int /* sharecount */, uint8_t /* threshold */,unsigned int /* size */);
/* Initialise a gfshare context for recombining shares */
gfshare_ctx* gfshare_ctx_init_dec(uint8_t* /* sharenrs */,
unsigned int /* sharecount */,
unsigned int /* size */);
gfshare_ctx* gfshare_ctx_init_dec(uint8_t* /* sharenrs */,unsigned int /* sharecount */,unsigned int /* size */);
/* Free a share context's memory. */
void gfshare_ctx_free(gfshare_ctx* /* ctx */);
@ -543,35 +538,28 @@ void gfshare_ctx_free(gfshare_ctx* /* ctx */);
/* --------------------------------------------------------[ Splitting ]---- */
/* Provide a secret to the encoder. (this re-scrambles the coefficients) */
void gfshare_ctx_enc_setsecret(gfshare_ctx* /* ctx */,
uint8_t* /* secret */);
void gfshare_ctx_enc_setsecret(gfshare_ctx* /* ctx */,uint8_t* /* secret */);
/* Extract a share from the context.
* 'share' must be preallocated and at least 'size' bytes long.
* 'sharenr' is the index into the 'sharenrs' array of the share you want.
*/
void gfshare_ctx_enc_getshare(gfshare_ctx* /* ctx */,
uint8_t /* sharenr */,
uint8_t* /* share */);
void gfshare_ctx_enc_getshare(gfshare_ctx* /* ctx */,uint8_t /* sharenr */,uint8_t* /* share */);
/* ----------------------------------------------------[ Recombination ]---- */
/* Inform a recombination context of a change in share indexes */
void gfshare_ctx_dec_newshares(gfshare_ctx* /* ctx */,
uint8_t* /* sharenrs */);
void gfshare_ctx_dec_newshares(gfshare_ctx* /* ctx */, uint8_t* /* sharenrs */);
/* Provide a share context with one of the shares.
* The 'sharenr' is the index into the 'sharenrs' array
*/
void gfshare_ctx_dec_giveshare(gfshare_ctx* /* ctx */,
uint8_t /* sharenr */,
uint8_t* /* share */);
void gfshare_ctx_dec_giveshare(gfshare_ctx* /* ctx */,uint8_t /* sharenr */,uint8_t* /* share */);
/* Extract the secret by interpolation of the shares.
* secretbuf must be allocated and at least 'size' bytes long
*/
void gfshare_ctx_dec_extract(gfshare_ctx* /* ctx */,
uint8_t* /* secretbuf */);
void gfshare_ctx_dec_extract(gfshare_ctx* /* ctx */,uint8_t* /* secretbuf */);
#endif /* LIBGFSHARE_H */
@ -592,9 +580,7 @@ struct _gfshare_ctx {
unsigned int buffersize;
};
static void
_gfshare_fill_rand_using_random( uint8_t* buffer,
unsigned int count )
static void _gfshare_fill_rand_using_random( uint8_t* buffer,unsigned int count )
{
OS_randombytes(buffer,count);
/*unsigned int i;
@ -609,11 +595,7 @@ gfshare_rand_func_t gfshare_fill_rand = NULL;
/* ------------------------------------------------------[ Preparation ]---- */
static gfshare_ctx *
_gfshare_ctx_init_core( uint8_t *sharenrs,
unsigned int sharecount,
uint8_t threshold,
unsigned int size )
static gfshare_ctx * _gfshare_ctx_init_core( uint8_t *sharenrs,unsigned int sharecount,uint8_t threshold,unsigned int size )
{
gfshare_ctx *ctx;
@ -649,11 +631,7 @@ _gfshare_ctx_init_core( uint8_t *sharenrs,
}
/* Initialise a gfshare context for producing shares */
gfshare_ctx *
gfshare_ctx_init_enc( uint8_t* sharenrs,
unsigned int sharecount,
uint8_t threshold,
unsigned int size )
gfshare_ctx * gfshare_ctx_init_enc( uint8_t* sharenrs,unsigned int sharecount,uint8_t threshold,unsigned int size )
{
unsigned int i;
@ -671,10 +649,7 @@ gfshare_ctx_init_enc( uint8_t* sharenrs,
}
/* Initialise a gfshare context for recombining shares */
gfshare_ctx*
gfshare_ctx_init_dec( uint8_t* sharenrs,
unsigned int sharecount,
unsigned int size )
gfshare_ctx* gfshare_ctx_init_dec( uint8_t* sharenrs,unsigned int sharecount,unsigned int size )
{
gfshare_ctx *ctx = _gfshare_ctx_init_core( sharenrs, sharecount, sharecount, size );
@ -685,8 +660,7 @@ gfshare_ctx_init_dec( uint8_t* sharenrs,
}
/* Free a share context's memory. */
void
gfshare_ctx_free( gfshare_ctx* ctx )
void gfshare_ctx_free( gfshare_ctx* ctx )
{
gfshare_fill_rand( ctx->buffer, ctx->buffersize );
gfshare_fill_rand( ctx->sharenrs, ctx->sharecount );
@ -699,9 +673,7 @@ gfshare_ctx_free( gfshare_ctx* ctx )
/* --------------------------------------------------------[ Splitting ]---- */
/* Provide a secret to the encoder. (this re-scrambles the coefficients) */
void
gfshare_ctx_enc_setsecret( gfshare_ctx* ctx,
uint8_t* secret)
void gfshare_ctx_enc_setsecret( gfshare_ctx* ctx,uint8_t* secret)
{
memcpy( ctx->buffer + ((ctx->threshold-1) * ctx->size),
secret,
@ -713,10 +685,7 @@ gfshare_ctx_enc_setsecret( gfshare_ctx* ctx,
* 'share' must be preallocated and at least 'size' bytes long.
* 'sharenr' is the index into the 'sharenrs' array of the share you want.
*/
void
gfshare_ctx_enc_getshare( gfshare_ctx* ctx,
uint8_t sharenr,
uint8_t* share)
void gfshare_ctx_enc_getshare( gfshare_ctx* ctx,uint8_t sharenr,uint8_t* share)
{
unsigned int pos, coefficient;
unsigned int ilog = logs[ctx->sharenrs[sharenr]];
@ -738,9 +707,7 @@ gfshare_ctx_enc_getshare( gfshare_ctx* ctx,
/* ----------------------------------------------------[ Recombination ]---- */
/* Inform a recombination context of a change in share indexes */
void
gfshare_ctx_dec_newshares( gfshare_ctx* ctx,
uint8_t* sharenrs)
void gfshare_ctx_dec_newshares( gfshare_ctx* ctx,uint8_t* sharenrs)
{
memcpy( ctx->sharenrs, sharenrs, ctx->sharecount );
}
@ -748,10 +715,7 @@ gfshare_ctx_dec_newshares( gfshare_ctx* ctx,
/* Provide a share context with one of the shares.
* The 'sharenr' is the index into the 'sharenrs' array
*/
void
gfshare_ctx_dec_giveshare( gfshare_ctx* ctx,
uint8_t sharenr,
uint8_t* share )
void gfshare_ctx_dec_giveshare( gfshare_ctx* ctx,uint8_t sharenr,uint8_t* share )
{
memcpy( ctx->buffer + (sharenr * ctx->size), share, ctx->size );
}
@ -759,9 +723,7 @@ gfshare_ctx_dec_giveshare( gfshare_ctx* ctx,
/* Extract the secret by interpolation of the shares.
* secretbuf must be allocated and at least 'size' bytes long
*/
void
gfshare_ctx_dec_extract( gfshare_ctx* ctx,
uint8_t* secretbuf )
void gfshare_ctx_dec_extract( gfshare_ctx* ctx,uint8_t* secretbuf )
{
unsigned int i, j;
uint8_t *secret_ptr, *share_ptr, sharei,sharej;
@ -839,7 +801,7 @@ void calc_shares(uint8_t *shares,uint8_t *secret,int32_t size,int32_t width,int3
free(buffer);
}
#include <stdio.h>
//#include <stdio.h>
int32_t test(int32_t M,int32_t N,int32_t datasize)
{
@ -967,8 +929,7 @@ int32_t init_sharenrs(uint8_t sharenrs[255],uint8_t *orig,int32_t m,int32_t n)
/* Construct and write out the tables for the gfshare code */
int
maingen(int argc, char** argv)
int maingen(int argc, char** argv)
{
uint8_t logs[256];
uint8_t exps[255];

4
iguana/mingw

@ -1,6 +1,6 @@
include iguana.sources
all:
$(TOOL_DIR)/$(MINGW)-gcc -o ../agents/iguana.exe -D __MINGW $(SOURCES) $(LIBS)
$(TOOL_DIR)/$(MINGW)-strip --strip-all ../agents/iguana.exe
$(TOOL_DIR)/$(MINGW)-gcc -w -o ../agents/win32/iguana.exe -D __MINGW -D __CURL_CURLBUILD_H -D __CURL_CURL_H -D __CURL_EASY_H $(SOURCES) $(LIBS)
$(TOOL_DIR)/$(MINGW)-strip --strip-all ../agents/win32/iguana.exe

2
iguana/mingw32

@ -1,4 +1,4 @@
include ../mingw.path
LIBS := ../win/libcrypto.a ../win/libssl.a ../win/libpthreadGC2.a -lws2_32 -lgdi32
LIBS := ../win/libsecp256k1.a ../win/libcrypto.a ../win/libssl.a /usr/share/mingw-w64/lib/libpthread.a ../agents/win32/libcrypto777.a ../win/libcurldll.a /usr/i586-mingw32msvc/lib/libws2_32.a /usr/i586-mingw32msvc/lib/libgdi32.a -I/usr/mingw32/include -I/usr/i386/include/curl -I/home/user/SuperNET/iguana -I/home/user/SuperNET/includes -I/home/user/SuperNET/crypto777
include mingw

4
iguana/mingw64

@ -1,3 +1,3 @@
include ../mingw.path64
LIBS := ../win/libcrypto.a ../win/libs/libssl.a ../win/libpthreadGC2_64.a -lws2_64 -lgdi64
include mingw
LIBS := ../win/libsecp256k1.a ../win/libcrypto.a ../win/libssl.a ../win/libpthreadGC2_64.a ../agents/win64/libcrypto777.a ../win/libcurldll.a /usr/share/mingw-w64/lib/libws2_32.a /usr/share/mingw-w64/lib/libgdi32.a -I/usr/share/mingw-w64/include -I/usr/i386/include -I/usr/i386/include/curl -I/home/user/SuperNET/iguana -I/home/user/SuperNET/includes -I/home/user/SuperNET/crypto777
include mingw64_inc

6
iguana/mingw64_inc

@ -0,0 +1,6 @@
include iguana.sources
all:
$(TOOL_DIR)/$(MINGW)-gcc -w -o ../agents/win64/iguana.exe -D __MINGW -D __CURL_CURLBUILD_H -D __CURL_CURL_H -D __CURL_EASY_H $(SOURCES) $(LIBS)
$(TOOL_DIR)/$(MINGW)-strip --strip-all ../agents/win64/iguana.exe

20
includes/openssl/asn1.h

@ -840,19 +840,19 @@ int ASN1_INTEGER_cmp(const ASN1_INTEGER *x, const ASN1_INTEGER *y);
DECLARE_ASN1_FUNCTIONS(ASN1_ENUMERATED)
int ASN1_UTCTIME_check(ASN1_UTCTIME *a);
ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
int offset_day, long offset_sec);
//ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s,time_t t);
//ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
// int offset_day, long offset_sec);
int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
//int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
#if 0
time_t ASN1_UTCTIME_get(const ASN1_UTCTIME *s);
#endif
int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a);
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
time_t t, int offset_day, long offset_sec);
//ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,time_t t);
//ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_adj(ASN1_GENERALIZEDTIME *s,
// time_t t, int offset_day, long offset_sec);
int ASN1_GENERALIZEDTIME_set_string(ASN1_GENERALIZEDTIME *s, const char *str);
DECLARE_ASN1_FUNCTIONS(ASN1_OCTET_STRING)
@ -883,9 +883,9 @@ DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s,time_t t,
int offset_day, long offset_sec);
//ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s,time_t t);
//ASN1_TIME *ASN1_TIME_adj(ASN1_TIME *s,time_t t,
// int offset_day, long offset_sec);
int ASN1_TIME_check(ASN1_TIME *t);
ASN1_GENERALIZEDTIME *ASN1_TIME_to_generalizedtime(ASN1_TIME *t, ASN1_GENERALIZEDTIME **out);
int ASN1_TIME_set_string(ASN1_TIME *s, const char *str);

6
includes/openssl/curl.h

@ -74,9 +74,9 @@
#include <sys/select.h>
#endif
#if !defined(WIN32) && !defined(_WIN32_WCE)
#include <sys/socket.h>
#endif
//#if !defined(WIN32) && !defined(_WIN32_WCE)
//#include <sys/socket.h>
//#endif
#if !defined(WIN32) && !defined(__WATCOMC__) && !defined(__VXWORKS__)
#include <sys/time.h>

6
includes/openssl/curlbuild.h

@ -148,9 +148,9 @@
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/socket.h must be included by the external interface. */
#define CURL_PULL_SYS_SOCKET_H 1
#ifdef CURL_PULL_SYS_SOCKET_H
# include <sys/socket.h>
#endif
//#ifdef CURL_PULL_SYS_SOCKET_H
//# include <sys/socket.h>
//#endif
/* Configure process defines this to 1 when it finds out that system */
/* header file sys/poll.h must be included by the external interface. */

4
mingw.path64

@ -1,2 +1,2 @@
TOOL_DIR := /usr/local/gcc-4.8.0-qt-4.8.4-for-mingw64/win64-gcc/bin
MINGW := i686-mingw64
TOOL_DIR := /usr/bin
MINGW := i686-w64-mingw32

BIN
win/libsecp256k1.a

Binary file not shown.

31
win/mingw.h

@ -5,8 +5,8 @@
#define _USE_W32_SOCKETS 1
#include <windows.h>
#include "pthread.h"
#include <pthread.h>
/*
#define ENOTCONN WSAENOTCONN
#define EWOULDBLOCK WSAEWOULDBLOCK
#define ENOBUFS WSAENOBUFS
@ -18,6 +18,7 @@
#define EISCONN WSAEISCONN
#define ECONNREFUSED WSAECONNREFUSED
#define EHOSTUNREACH WSAEHOSTUNREACH
*/
/* winsock doesn't feature poll(), so there is a version implemented
* in terms of select() in mingw.c. The following definitions
@ -43,25 +44,25 @@ struct pollfd {
* outside of this file "shouldn't" have to worry about winsock specific error
* handling.
*/
#define socket(x, y, z) win32_socket(x, y, z)
#define connect(x, y, z) win32_connect(x, y, z)
#define accept(x, y, z) win32_accept(x, y, z)
#define shutdown(x, y) win32_shutdown(x, y)
#define read(x, y, z) win32_read_socket(x, y, z)
#define write(x, y, z) win32_write_socket(x, y, z)
//#define socket(x, y, z) win32_socket(x, y, z)
//#define connect(x, y, z) win32_connect(x, y, z)
//#define accept(x, y, z) win32_accept(x, y, z)
//#define shutdown(x, y) win32_shutdown(x, y)
//#define read(x, y, z) win32_read_socket(x, y, z)
//#define write(x, y, z) win32_write_socket(x, y, z)
/* Winsock uses int instead of the usual socklen_t */
typedef int socklen_t;
int win32_poll(struct pollfd *, unsigned int, int);
SOCKET win32_socket(int, int, int);
int win32_connect(SOCKET, struct sockaddr*, socklen_t);
SOCKET win32_accept(SOCKET, struct sockaddr*, socklen_t *);
int win32_shutdown(SOCKET, int);
int win32_close_socket(SOCKET fd);
//SOCKET win32_socket(int, int, int);
//int win32_connect(SOCKET, struct sockaddr*, socklen_t);
//SOCKET win32_accept(SOCKET, struct sockaddr*, socklen_t *);
//int win32_shutdown(SOCKET, int);
//int win32_close_socket(SOCKET fd);
#define strtok_r(x, y, z) win32_strtok_r(x, y, z)
#define strsep(x,y) win32_strsep(x,y)
//#define strtok_r(x, y, z) win32_strtok_r(x, y, z)
//#define strsep(x,y) win32_strsep(x,y)
char *win32_strtok_r(char *s, const char *delim, char **lasts);
char *win32_strsep(char **stringp, const char *delim);

1368
win/pthread.h

File diff suppressed because it is too large
Loading…
Cancel
Save