X
[deliverable/binutils-gdb.git] / binutils / dllwrap.c
index da0222b254d8a92e9f431cda707f576b907a9136..574611b3dd97b009f3ca3fcb0113fe37def10120 100644 (file)
@@ -1,5 +1,5 @@
 /* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
-   Copyright (C) 1998 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
    Contributed by Mumit Khan (khan@xraylith.wisc.edu).
 
    This file is part of GNU Binutils.
 #include <unistd.h>
 #endif
 
-#include "getopt.h"
+#include "bfd.h"
 #include "libiberty.h"
+#include "bucomm.h"
+#include "getopt.h"
 #include "dyn-string.h"
 
 #include <ctype.h>
@@ -82,7 +84,7 @@
 
 static char *program_version = "0.2.4";
 static char *driver_name = "gcc";
-static char *cygwin32_driver_flags = 
+static char *cygwin_driver_flags = 
   "-Wl,--dll -nostartfiles";
 static char *mingw32_driver_flags = "-mdll";
 static char *generic_driver_flags = "-Wl,--dll";
@@ -95,7 +97,7 @@ static char *target = TARGET;
 
 typedef enum {
   UNKNOWN_TARGET, 
-  CYGWIN32_TARGET, 
+  CYGWIN_TARGET, 
   MINGW32_TARGET
 } 
 target_type;
@@ -646,7 +648,7 @@ main (argc, argv)
   
   /* set the target platform. */
   if (strstr (target, "cygwin32"))
-    which_target = CYGWIN32_TARGET;
+    which_target = CYGWIN_TARGET;
   else if (strstr (target, "mingw32"))
     which_target = MINGW32_TARGET;
   else 
@@ -680,8 +682,8 @@ main (argc, argv)
     {
       switch (which_target)
         {
-       case CYGWIN32_TARGET:
-          driver_flags = cygwin32_driver_flags;
+       case CYGWIN_TARGET:
+          driver_flags = cygwin_driver_flags;
          break;
        
        case MINGW32_TARGET:
@@ -701,8 +703,8 @@ main (argc, argv)
     {
       switch (which_target)
         {
-       case CYGWIN32_TARGET:
-         entry_point = "__cygwin32_dll_entry@12";
+       case CYGWIN_TARGET:
+         entry_point = "__cygwin_dll_entry@12";
          break;
        
        case MINGW32_TARGET:
@@ -724,7 +726,7 @@ main (argc, argv)
     {
       char *tmpbuf = (char *) xmalloc (sizeof ("0x12345678") + 1);
       unsigned long hash = strhash (dll_file_name);
-      sprintf (tmpbuf, "0x%.8X", 0x60000000|((hash<<16)&0xFFC0000));
+      sprintf (tmpbuf, "0x%.8lX", 0x60000000|((hash<<16)&0xFFC0000));
       image_base_str = tmpbuf;
     }
 
@@ -767,7 +769,7 @@ main (argc, argv)
        {
           dyn_string_append (step_pre1, " --export-all --exclude-symbol=");
           dyn_string_append (step_pre1, 
-         "_cygwin32_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12");
+         "_cygwin_dll_entry@12,DllMainCRTStartup@12,DllMain@12,DllEntryPoint@12");
        }
       dyn_string_append (step_pre1, " --output-def ");
       dyn_string_append (step_pre1, def_file_name);
This page took 0.023633 seconds and 4 git commands to generate.