mirror of
https://github.com/hashcat/hashcat.git
synced 2025-01-09 15:20:59 +00:00
add workaround for zlib with cygwin build (v2)
This commit is contained in:
parent
9673dedebf
commit
e86cbf426a
@ -62,6 +62,10 @@ bool hc_string_is_digit (const char *s);
|
|||||||
void hc_string_trim_trailing (char *s);
|
void hc_string_trim_trailing (char *s);
|
||||||
void hc_string_trim_leading (char *s);
|
void hc_string_trim_leading (char *s);
|
||||||
|
|
||||||
|
#if defined (__CYGWIN__)
|
||||||
|
int _wopen(const char *path, int oflag, ...);
|
||||||
|
#endif
|
||||||
|
|
||||||
bool hc_fopen (HCFILE *fp, const char *path, char *mode);
|
bool hc_fopen (HCFILE *fp, const char *path, char *mode);
|
||||||
int hc_fscanf (HCFILE *fp, const char *format, void *ptr);
|
int hc_fscanf (HCFILE *fp, const char *format, void *ptr);
|
||||||
int hc_fprintf (HCFILE *fp, const char *format, ...);
|
int hc_fprintf (HCFILE *fp, const char *format, ...);
|
||||||
|
@ -178,12 +178,8 @@ endif
|
|||||||
|
|
||||||
## because ZLIB
|
## because ZLIB
|
||||||
ifeq ($(USE_SYSTEM_ZLIB),0)
|
ifeq ($(USE_SYSTEM_ZLIB),0)
|
||||||
ifeq ($(UNAME),CYGWIN)
|
|
||||||
CFLAGS_ZLIB += -Wno-implicit-fallthrough -UWIDECHAR
|
|
||||||
else
|
|
||||||
CFLAGS_ZLIB += -Wno-implicit-fallthrough
|
CFLAGS_ZLIB += -Wno-implicit-fallthrough
|
||||||
endif
|
endif
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($(DEBUG),0)
|
ifeq ($(DEBUG),0)
|
||||||
CFLAGS += -O2
|
CFLAGS += -O2
|
||||||
|
12
src/shared.c
12
src/shared.c
@ -602,6 +602,18 @@ void hc_string_trim_trailing (char *s)
|
|||||||
s[new_len] = 0;
|
s[new_len] = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined (__CYGWIN__)
|
||||||
|
// workaround for zlib with cygwin build
|
||||||
|
int _wopen(const char *path, int oflag, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start (ap, oflag);
|
||||||
|
int r = open (path, oflag, ap);
|
||||||
|
va_end (ap);
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool hc_fopen (HCFILE *fp, const char *path, char *mode)
|
bool hc_fopen (HCFILE *fp, const char *path, char *mode)
|
||||||
{
|
{
|
||||||
unsigned char check[3] = { 0 };
|
unsigned char check[3] = { 0 };
|
||||||
|
Loading…
Reference in New Issue
Block a user