Browse Source

Fix Win32 nmake build, increase warning level, resolve warnings

master
samr7 13 years ago
parent
commit
e9d063f70b
  1. 8
      Makefile.Win32
  2. 2
      vanitygen.c
  3. 2
      winglue.c

8
Makefile.Win32

@ -3,14 +3,16 @@ OPENSSL_DIR = C:\OpenSSL-Win32 @@ -3,14 +3,16 @@ OPENSSL_DIR = C:\OpenSSL-Win32
PTHREADS_DIR = C:\pthreads-w32
PCRE_DIR = C:\pcre-7.9-src
CFLAGS = /D_WIN32 /DPTW32_STATIC_LIB /DPCRE_STATIC /I$(OPENSSL_DIR)\include /I$(PTHREADS_DIR) /I$(PCRE_DIR)
LIBS = $(OPENSSL_DIR)\lib\libeay32.dll $(PTHREADS_DIR)\pthread.lib $(PCRE_DIR)\pcre.lib ws2_32.lib
LIBS = $(OPENSSL_DIR)\lib\libeay32.lib $(PTHREADS_DIR)\pthread.lib $(PCRE_DIR)\pcre.lib ws2_32.lib
OBJS = vanitygen.obj
all: vanitygen.exe
link /nologo /out:vanitygen.exe $(LIBS)
vanitygen.exe: $(OBJS)
link /nologo /out:vanitygen.exe $(OBJS) $(LIBS)
.c.obj:
$(CC) $(CFLAGS) /Tp$< /Fo$@
$(CC) $(CFLAGS) /c /Tp$< /Fo$@
clean:
del vanitygen.exe

2
vanitygen.c

@ -71,7 +71,7 @@ encode_b58_check(void *buf, size_t len, char *result) @@ -71,7 +71,7 @@ encode_b58_check(void *buf, size_t len, char *result)
bndiv = &bnb;
brlen = (2 * len) + 4;
binres = malloc(brlen);
binres = (unsigned char*) malloc(brlen);
memcpy(binres, buf, len);
SHA256(binres, len, hash1);

2
winglue.c

@ -133,7 +133,7 @@ int getopt(int argc, TCHAR *argv[], TCHAR *optstring) @@ -133,7 +133,7 @@ int getopt(int argc, TCHAR *argv[], TCHAR *optstring)
int __cdecl __initptw32(void);
#define _CRTALLOC(x) __declspec(allocate(x))
_CRTALLOC(".CRT$XIC")
static pinit = __initptw32;
static int (*pinit)(void) = __initptw32;
int __cdecl
__initptw32(void)
{

Loading…
Cancel
Save