mirror of https://github.com/YosysHQ/abc.git
Modify include guards in cmd.c so that Windows compilers don't compile Unix-only code.
This commit is contained in:
parent
03da96f12f
commit
237d81397f
|
|
@ -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 CmdCommandUndo ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
static int CmdCommandRecall ( 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 );
|
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 CmdCommandScanDir ( Abc_Frame_t * pAbc, int argc, char ** argv );
|
||||||
static int CmdCommandRenameFiles ( 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 );
|
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", "undo", CmdCommandUndo, 0 );
|
||||||
Cmd_CommandAdd( pAbc, "Basic", "recall", CmdCommandRecall, 0 );
|
Cmd_CommandAdd( pAbc, "Basic", "recall", CmdCommandRecall, 0 );
|
||||||
Cmd_CommandAdd( pAbc, "Basic", "empty", CmdCommandEmpty, 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", "scandir", CmdCommandScanDir, 0 );
|
||||||
Cmd_CommandAdd( pAbc, "Basic", "renamefiles", CmdCommandRenameFiles, 0 );
|
Cmd_CommandAdd( pAbc, "Basic", "renamefiles", CmdCommandRenameFiles, 0 );
|
||||||
Cmd_CommandAdd( pAbc, "Basic", "ls", CmdCommandLs, 0 );
|
Cmd_CommandAdd( pAbc, "Basic", "ls", CmdCommandLs, 0 );
|
||||||
|
|
@ -1209,7 +1209,7 @@ usage:
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if defined(WIN32) && !defined(__cplusplus)
|
#if defined(WIN32)
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
|
||||||
|
|
@ -1395,10 +1395,10 @@ int CmfFindNumber( char * pName )
|
||||||
***********************************************************************/
|
***********************************************************************/
|
||||||
void CnfDupFileUnzip( char * pOldName )
|
void CnfDupFileUnzip( char * pOldName )
|
||||||
{
|
{
|
||||||
extern char * Io_MvLoadFileBz2( char * pFileName, int * pnFileSize );
|
extern char * Io_MvLoadFileBz2( char * pFileName, long * pnFileSize );
|
||||||
char pNewName[1000];
|
char pNewName[1000];
|
||||||
FILE * pFile;
|
FILE * pFile;
|
||||||
int nFileSize;
|
long nFileSize;
|
||||||
char * pBuffer = Io_MvLoadFileBz2( pOldName, &nFileSize );
|
char * pBuffer = Io_MvLoadFileBz2( pOldName, &nFileSize );
|
||||||
assert( strlen(pOldName) < 1000 );
|
assert( strlen(pOldName) < 1000 );
|
||||||
sprintf( pNewName, "%s.v", pOldName );
|
sprintf( pNewName, "%s.v", pOldName );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue