From b73fcb78ed766b4fefe02dfbcc03030ecc7f58fd Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 8 Jun 2026 16:11:31 +0200 Subject: [PATCH 1/3] Add missing includes for windows --- src/base/main/mainUtils.c | 1 + src/sat/kissat/colors.c | 1 + src/sat/kissat/file.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/src/base/main/mainUtils.c b/src/base/main/mainUtils.c index 5db012cfe..018914f9c 100644 --- a/src/base/main/mainUtils.c +++ b/src/base/main/mainUtils.c @@ -20,6 +20,7 @@ #ifdef WIN32 #include +#include #else #include #endif diff --git a/src/sat/kissat/colors.c b/src/sat/kissat/colors.c index c6141b749..7c41fba61 100644 --- a/src/sat/kissat/colors.c +++ b/src/sat/kissat/colors.c @@ -1,6 +1,7 @@ #include "colors.h" #if defined(WIN32) && !defined(__MINGW32__) +#include #define isatty _isatty #else #include diff --git a/src/sat/kissat/file.c b/src/sat/kissat/file.c index e4486783d..c0d14c6cc 100644 --- a/src/sat/kissat/file.c +++ b/src/sat/kissat/file.c @@ -9,10 +9,12 @@ #include #ifdef WIN32 +#include #define unlink _unlink #define access _access #define R_OK 4 #define W_OK 2 +#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) #else #include #endif From d3d218eee2b2c78a624f4e6c4e166d8930603397 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Mon, 8 Jun 2026 16:11:48 +0200 Subject: [PATCH 2/3] Cleanup --- src/base/abci/abcNpn.c | 9 --------- src/opt/dau/dau.h | 1 + src/opt/dau/dauNpn.c | 1 - 3 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/base/abci/abcNpn.c b/src/base/abci/abcNpn.c index 92b47c177..ab8a7a685 100644 --- a/src/base/abci/abcNpn.c +++ b/src/base/abci/abcNpn.c @@ -319,10 +319,6 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose ) } else if ( NpnType == 8 ) { -// typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag); - unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag); - unsigned Abc_TtCanonicizeAda(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres); - int fHigh = 1, iEnumThres = 25; Abc_TtHieMan_t * pMan = Abc_TtHieManStart(p->nVars, 5); for ( i = 0; i < p->nFuncs; i++ ) @@ -337,11 +333,6 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose ) } else if ( NpnType == 9 || NpnType == 10 || NpnType == 11 ) { -// typedef unsigned(*TtCanonicizeFunc)(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag); - unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag); - unsigned Abc_TtCanonicizeAda(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres); - unsigned Abc_TtCanonicizeCA(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres); - Abc_TtHieMan_t * pMan = Abc_TtHieManStart(p->nVars, 5); for ( i = 0; i < p->nFuncs; i++ ) { diff --git a/src/opt/dau/dau.h b/src/opt/dau/dau.h index 82e9b83b2..37d24aa5a 100644 --- a/src/opt/dau/dau.h +++ b/src/opt/dau/dau.h @@ -86,6 +86,7 @@ extern Abc_TtHieMan_t * Abc_TtHieManStart( int nVars, int nLevels ); extern void Abc_TtHieManStop(Abc_TtHieMan_t * p ); extern unsigned Abc_TtCanonicizeWrap(TtCanonicizeFunc func, Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int flag); extern unsigned Abc_TtCanonicizeAda(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres); +extern unsigned Abc_TtCanonicizeCA(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int fCA); extern unsigned Abc_TtCanonicizeHie(Abc_TtHieMan_t * p, word * pTruthInit, int nVars, char * pCanonPerm, int fExact); /*=== dauCount.c ==========================================================*/ extern int Abc_TtCountOnesInCofsQuick( word * pTruth, int nVars, int * pStore ); diff --git a/src/opt/dau/dauNpn.c b/src/opt/dau/dauNpn.c index f4a4bb531..be9aae3ef 100644 --- a/src/opt/dau/dauNpn.c +++ b/src/opt/dau/dauNpn.c @@ -1082,7 +1082,6 @@ Vec_Mem_t * Dau_CollectNpnFunctionsArray( Vec_Wrd_t * vFuncs, int nVars, Vec_Int void Dau_CanonicizeArray( Vec_Wrd_t * vFuncs, int nVars, int fVerbose ) { abctime clkStart = Abc_Clock(); - extern unsigned Abc_TtCanonicizeCA(Abc_TtHieMan_t * p, word * pTruth, int nVars, char * pCanonPerm, int iThres); if ( fVerbose ) printf( "Functions: %d (original) ", Vec_WrdSize(vFuncs) ); unsigned uCanonPhase; char pCanonPerm[16]; word Func; int i; Vec_WrdUniqify( vFuncs ); From 1e130338f049899938b37fba43efd506d687773e Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 9 Jun 2026 08:20:13 +0200 Subject: [PATCH 3/3] Make sure we detect these errors in future --- .github/scripts/abcexe.vcxproj | 1 + .github/scripts/abclib.vcxproj.template | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/scripts/abcexe.vcxproj b/.github/scripts/abcexe.vcxproj index 817e0809e..950021017 100644 --- a/.github/scripts/abcexe.vcxproj +++ b/.github/scripts/abcexe.vcxproj @@ -33,6 +33,7 @@ Level3 4146;4334;4996;4703;%(DisableSpecificWarnings) + 4013 true true true diff --git a/.github/scripts/abclib.vcxproj.template b/.github/scripts/abclib.vcxproj.template index 77498528d..9b21d325f 100644 --- a/.github/scripts/abclib.vcxproj.template +++ b/.github/scripts/abclib.vcxproj.template @@ -32,6 +32,7 @@ Level3 4146;4334;4996;4703;%(DisableSpecificWarnings) + 4013 true true true