From 237d81397fcc85dd3894bf1a449d2955cd3df02d Mon Sep 17 00:00:00 2001 From: "William D. Jones" Date: Sat, 27 Apr 2024 19:06:36 -0400 Subject: [PATCH] Modify include guards in cmd.c so that Windows compilers don't compile Unix-only code. --- src/base/cmd/cmd.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/base/cmd/cmd.c b/src/base/cmd/cmd.c index c8dd443259..5b6919f769 100644 --- a/src/base/cmd/cmd.c +++ b/src/base/cmd/cmd.c @@ -51,7 +51,7 @@ static int CmdCommandUnsetVariable ( Abc_Frame_t * pAbc, int argc, char ** argv static int CmdCommandUndo ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int CmdCommandRecall ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int CmdCommandEmpty ( Abc_Frame_t * pAbc, int argc, char ** argv ); -#if defined(WIN32) && !defined(__cplusplus) +#if defined(WIN32) static int CmdCommandScanDir ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int CmdCommandRenameFiles ( Abc_Frame_t * pAbc, int argc, char ** argv ); static int CmdCommandLs ( Abc_Frame_t * pAbc, int argc, char ** argv ); @@ -105,7 +105,7 @@ void Cmd_Init( Abc_Frame_t * pAbc ) Cmd_CommandAdd( pAbc, "Basic", "undo", CmdCommandUndo, 0 ); Cmd_CommandAdd( pAbc, "Basic", "recall", CmdCommandRecall, 0 ); Cmd_CommandAdd( pAbc, "Basic", "empty", CmdCommandEmpty, 0 ); -#if defined(WIN32) && !defined(__cplusplus) +#if defined(WIN32) Cmd_CommandAdd( pAbc, "Basic", "scandir", CmdCommandScanDir, 0 ); Cmd_CommandAdd( pAbc, "Basic", "renamefiles", CmdCommandRenameFiles, 0 ); Cmd_CommandAdd( pAbc, "Basic", "ls", CmdCommandLs, 0 ); @@ -1209,7 +1209,7 @@ int CmdCommandUndo( Abc_Frame_t * pAbc, int argc, char **argv ) #endif -#if defined(WIN32) && !defined(__cplusplus) +#if defined(WIN32) #include #include @@ -1395,10 +1395,10 @@ int CmfFindNumber( char * pName ) ***********************************************************************/ void CnfDupFileUnzip( char * pOldName ) { - extern char * Io_MvLoadFileBz2( char * pFileName, int * pnFileSize ); + extern char * Io_MvLoadFileBz2( char * pFileName, long * pnFileSize ); char pNewName[1000]; FILE * pFile; - int nFileSize; + long nFileSize; char * pBuffer = Io_MvLoadFileBz2( pOldName, &nFileSize ); assert( strlen(pOldName) < 1000 ); sprintf( pNewName, "%s.v", pOldName );