summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/EncodeExecutable.c
diff options
context:
space:
mode:
Diffstat (limited to 'Source/kwsys/EncodeExecutable.c')
-rw-r--r--Source/kwsys/EncodeExecutable.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/kwsys/EncodeExecutable.c b/Source/kwsys/EncodeExecutable.c
index a0cdcd7..d7c9a45 100644
--- a/Source/kwsys/EncodeExecutable.c
+++ b/Source/kwsys/EncodeExecutable.c
@@ -12,7 +12,9 @@
=========================================================================*/
#include <stdio.h>
-
+#ifdef __WATCOMC__
+#define _unlink unlink
+#endif
int main(int argc, char* argv[])
{
FILE* ifp;
@@ -76,6 +78,9 @@ int main(int argc, char* argv[])
fprintf(ofp, "extern %s_EXPORT int %sEncodedWriteArray%s(const char* fname)\n",
argv[3], argv[3], argv[4]);
fprintf(ofp, "{\n");
+ fprintf(ofp, "#ifdef __WATCOMC__\n");
+ fprintf(ofp, "#define _unlink unlink\n");
+ fprintf(ofp, "#endif\n");
fprintf(ofp, " FILE* ofp = fopen(fname, \"wb\");\n");
fprintf(ofp, " if(!ofp) { return 0; }\n");
for(i=0; i < count; ++i)