Changes for linux compatibility

This commit is contained in:
David Anderson
2005-08-02 19:05:51 +00:00
parent d472d5d309
commit 96c9fc8bc8
4 changed files with 14 additions and 5 deletions

View File

@ -99,6 +99,7 @@ int main(int argc, char **argv)
fclose(fp);
}
dlclose(lib);
unlink(file);
HINSTANCE lib64 = 0;
@ -107,7 +108,8 @@ int main(int argc, char **argv)
#else
lib64 = dlmount("amxxpc64.dll");
#endif
if (!lib64)
pc_printf = (PRINTF)dlsym(lib64, "pc_printf");
if (!lib64 || !pc_printf)
{
pc_printf("64bit compiler failed to instantiate.\n");
exit(0);
@ -127,8 +129,6 @@ int main(int argc, char **argv)
sc64(argc, argv);
dlclose(lib64);
if (file == NULL)
{
pc_printf("Could not locate the output file on second pass.\n");
@ -207,7 +207,7 @@ int main(int argc, char **argv)
pc_printf("Done.\n");
dlclose(lib);
dlclose(lib64);
exit(0);
}