summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abc/abcShow.c8
-rw-r--r--src/base/cmd/cmd.c4
-rw-r--r--src/base/cmd/cmdUtils.c5
-rw-r--r--src/base/main/mainReal.c6
4 files changed, 20 insertions, 3 deletions
diff --git a/src/base/abc/abcShow.c b/src/base/abc/abcShow.c
index ff43dbe6..dd8e9efe 100644
--- a/src/base/abc/abcShow.c
+++ b/src/base/abc/abcShow.c
@@ -363,7 +363,11 @@ void Abc_ShowFile( char * FileNameDot )
// generate the PostScript file using DOT
sprintf( CommandDot, "%s -Tps -o %s %s", pDotName, FileNamePs, FileNameDot );
+#if defined(__wasm)
+ RetValue = -1;
+#else
RetValue = system( CommandDot );
+#endif
if ( RetValue == -1 )
{
fprintf( stdout, "Command \"%s\" did not succeed.\n", CommandDot );
@@ -401,7 +405,11 @@ void Abc_ShowFile( char * FileNameDot )
char CommandPs[1000];
unlink( FileNameDot );
sprintf( CommandPs, "%s %s &", pGsNameUnix, FileNamePs );
+#if defined(__wasm)
+ if ( 1 )
+#else
if ( system( CommandPs ) == -1 )
+#endif
{
fprintf( stdout, "Cannot execute \"%s\".\n", CommandPs );
return;
diff --git a/src/base/cmd/cmd.c b/src/base/cmd/cmd.c
index a0042443..259c9d78 100644
--- a/src/base/cmd/cmd.c
+++ b/src/base/cmd/cmd.c
@@ -2175,7 +2175,11 @@ void Gia_ManGnuplotShow( char * pPlotFileName )
{
char Command[1000];
sprintf( Command, "%s %s ", pProgNameGnuplot, pPlotFileName );
+#if defined(__wasm)
+ if ( 1 )
+#else
if ( system( Command ) == -1 )
+#endif
{
fprintf( stdout, "Cannot execute \"%s\".\n", Command );
return;
diff --git a/src/base/cmd/cmdUtils.c b/src/base/cmd/cmdUtils.c
index 3409543f..c10e9134 100644
--- a/src/base/cmd/cmdUtils.c
+++ b/src/base/cmd/cmdUtils.c
@@ -52,6 +52,9 @@ int cmdCheckShellEscape( Abc_Frame_t * pAbc, int argc, char ** argv)
int RetValue;
if (argv[0][0] == '!')
{
+#if defined(__wasm)
+ RetValue = -1;
+#else
const int size = 4096;
int i;
char * buffer = ABC_ALLOC(char, 10000);
@@ -70,7 +73,7 @@ int cmdCheckShellEscape( Abc_Frame_t * pAbc, int argc, char ** argv)
// the parts, we lose information. So a command like
// `!ls "file name"` will be sent to the system as
// `ls file name` which is a BUG
-
+#endif
return 1;
}
else
diff --git a/src/base/main/mainReal.c b/src/base/main/mainReal.c
index 922e0521..a13be5e5 100644
--- a/src/base/main/mainReal.c
+++ b/src/base/main/mainReal.c
@@ -49,7 +49,9 @@ SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include <sys/times.h>
#include <sys/resource.h>
#include <unistd.h>
+#if !defined(__wasm)
#include <signal.h>
+#endif
#include <stdlib.h>
#endif
@@ -132,7 +134,7 @@ int Abc_RealMain( int argc, char * argv[] )
break;
case 'm': {
-#if !defined(WIN32) && !defined(ABC_NO_RLIMIT)
+#if !defined(WIN32) && !defined(__wasm)
int maxMb = atoi(globalUtilOptarg);
printf("Limiting memory use to %d MB\n", maxMb);
struct rlimit limit = {
@@ -144,7 +146,7 @@ int Abc_RealMain( int argc, char * argv[] )
break;
}
case 'l': {
-#if !defined(WIN32) && !defined(ABC_NO_RLIMIT)
+#if !defined(WIN32) && !defined(__wasm)
rlim_t maxTime = atoi(globalUtilOptarg);
printf("Limiting time to %d seconds\n", (int)maxTime);
struct rlimit limit = {