Added support for gsinit packing.
[fw/sdcc] / src / SDCCglue.c
index 8524d1838305698c8d5f0750b079d3430f931c6d..f378ab1af21b51a0091d0704ed3e2228fe7fc3fa 100644 (file)
 #include "newalloc.h"
 
 #if !defined(__BORLANDC__) && !defined(_MSC_VER)
-#if 0                          /* This should no longer be necessary. */
-// This is a bit messy because we define link ourself
-#define link NoLiNk
-#include <unistd.h>
-#undef link
-#else
-
 #include <unistd.h>
 #endif
-#else
-// No unistd.h in Borland C++
-#endif
 
 symbol *interrupts[256];
 
@@ -1522,6 +1512,15 @@ glue ()
   applyToSet (tmpfileNameSet, rmTmpFiles);
 }
 
+#if defined (__MINGW32__) || defined (__CYGWIN__) || defined (_MSC_VER)
+void
+rm_tmpfiles (void)
+{
+  applyToSet (tmpfileSet, closeTmpFiles);
+  applyToSet (tmpfileNameSet, rmTmpFiles);
+}
+#endif
+
 /** Creates a temporary file a'la tmpfile which avoids the bugs
     in cygwin wrt c:\tmp.
     Scans, in order: TMP, TEMP, TMPDIR, else uses tmpfile().