]> granicus.if.org Git - yasm/commitdiff
Don't try to use ltdl if compiling under Visual C++ (WIN32 defined).
authorPeter Johnson <peter@tortall.net>
Sun, 16 Mar 2003 00:19:19 +0000 (00:19 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 16 Mar 2003 00:19:19 +0000 (00:19 -0000)
svn path=/trunk/yasm/; revision=863

frontends/yasm/yasm.c

index 2f45ac17de3b3a230a07d5b54a5fe9203cd28629..6bd6e46d52cdc218361ed22f7e33acf6bbd06428 100644 (file)
@@ -28,7 +28,9 @@
 #include "libyasm.h"
 /*@unused@*/ RCSID("$IdPath$");
 
+#ifndef WIN32
 #include "ltdl.h"
+#endif
 #include "yasm-module.h"
 #include "yasm-options.h"
 
@@ -133,7 +135,9 @@ main(int argc, char *argv[])
     /*@null@*/ FILE *in = NULL, *obj = NULL;
     yasm_sectionhead *sections;
     size_t i;
+#ifndef WIN32
     int errors;
+#endif
 
 #if defined(HAVE_SETLOCALE) && defined(HAVE_LC_MESSAGES)
     setlocale(LC_MESSAGES, "");
@@ -149,6 +153,7 @@ main(int argc, char *argv[])
     yasm_gettext_hook = handle_yasm_gettext;
     yasm_errwarn_initialize();
 
+#ifndef WIN32
     /* Set libltdl malloc/free functions. */
 #ifdef WITH_DMALLOC
     lt_dlmalloc = malloc;
@@ -174,6 +179,7 @@ main(int argc, char *argv[])
        print_error(_("Module loader initialization failed"));
        return EXIT_FAILURE;
     }
+#endif
 
     if (parse_cmdline(argc, argv, options, NELEMS(options), print_error))
        return EXIT_FAILURE;
@@ -497,8 +503,10 @@ cleanup(yasm_sectionhead *sections)
 
     unload_modules();
 
+#ifndef WIN32
     /* Finish with libltdl. */
     lt_dlexit();
+#endif
 
     if (DO_FREE) {
        if (in_filename)