Win changes

This commit is contained in:
Luca Deri
2021-06-08 18:15:46 +02:00
parent d3aa3df975
commit 177f9456bd
3 changed files with 7 additions and 6 deletions
-4
View File
@@ -184,10 +184,6 @@ typedef struct ac_node
AC_ALPHABET_t *a_ptr;
} AC_NODE_t;
#ifndef __SIZEOF_POINTER__
#error SIZEOF_POINTER not defined!
#endif
struct edge {
unsigned short degree; /* Number of outgoing edges */
unsigned short max; /* Max capacity of allocated memory for outgoing */
+5 -1
View File
@@ -24,7 +24,11 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifndef WIN32
#include <unistd.h>
#else
#define __SIZEOF_LONG__ 4
#endif
#include <stdint.h>
#include <sys/types.h>
#else
@@ -756,7 +760,7 @@ static inline size_t bsf(uint32_t bits)
#else
size_t i=0;
if(!bits) return i;
if((bits & 0xffff)bits == 0) { i+=16; bits >>=16; }
if((bits & 0xffff) == 0) { i+=16; bits >>=16; }
if((bits & 0xff) == 0) i+=8;
return i;
#endif