From 51bc944def10bb8aba028c8581801e586f54cbd8 Mon Sep 17 00:00:00 2001 From: h_vogt Date: Tue, 22 Dec 2015 18:06:33 +0100 Subject: [PATCH] xspice/cmpp, compatibility with MS Visual Studio --- src/xspice/cmpp/cmpp.h | 8 ++++++++ src/xspice/cmpp/pp_mod.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/src/xspice/cmpp/cmpp.h b/src/xspice/cmpp/cmpp.h index eff6d74ff..cf8f1bda5 100644 --- a/src/xspice/cmpp/cmpp.h +++ b/src/xspice/cmpp/cmpp.h @@ -45,6 +45,14 @@ NON-STANDARD FEATURES #define MODPATH_FILENAME "modpath.lst" #define UDNPATH_FILENAME "udnpath.lst" +#ifdef _MSC_VER +#include +#define strdup _strdup +#define unlink _unlink +#define isatty _isatty +#define fileno _fileno +#endif + /* *********************************************************************** */ typedef enum { diff --git a/src/xspice/cmpp/pp_mod.c b/src/xspice/cmpp/pp_mod.c index 04d56c0f0..4b2436b91 100644 --- a/src/xspice/cmpp/pp_mod.c +++ b/src/xspice/cmpp/pp_mod.c @@ -57,7 +57,9 @@ NON-STANDARD FEATURES #include #include #include +#ifndef _MSC_VER #include +#endif #include "mod_yacc_y.h" extern int mod_yyparse(void);