Deleted Added
full compact
dllwrap.c (78828) dllwrap.c (89857)
1/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
1/* dllwrap.c -- wrapper for DLLTOOL and GCC to generate PE style DLLs
2 Copyright 1998, 1999, 2000 Free Software Foundation, Inc.
2 Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
3 Contributed by Mumit Khan (khan@xraylith.wisc.edu).
4
5 This file is part of GNU Binutils.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.

--- 20 unchanged lines hidden (view full) ---

31#endif
32
33#include "bfd.h"
34#include "libiberty.h"
35#include "bucomm.h"
36#include "getopt.h"
37#include "dyn-string.h"
38
3 Contributed by Mumit Khan (khan@xraylith.wisc.edu).
4
5 This file is part of GNU Binutils.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.

--- 20 unchanged lines hidden (view full) ---

31#endif
32
33#include "bfd.h"
34#include "libiberty.h"
35#include "bucomm.h"
36#include "getopt.h"
37#include "dyn-string.h"
38
39#include <ctype.h>
40#include <time.h>
41#include <sys/stat.h>
42
43#ifdef ANSI_PROTOTYPES
44#include <stdarg.h>
45#else
46#include <varargs.h>
47#endif

--- 464 unchanged lines hidden (view full) ---

512
513/**********************************************************************/
514
515static void
516usage (file, status)
517 FILE *file;
518 int status;
519{
39#include <time.h>
40#include <sys/stat.h>
41
42#ifdef ANSI_PROTOTYPES
43#include <stdarg.h>
44#else
45#include <varargs.h>
46#endif

--- 464 unchanged lines hidden (view full) ---

511
512/**********************************************************************/
513
514static void
515usage (file, status)
516 FILE *file;
517 int status;
518{
520 fprintf (file, _("Usage %s <options> <object-files>\n"), program_name);
519 fprintf (file, _("Usage %s <option(s)> <object-file(s)>\n"), program_name);
521 fprintf (file, _(" Generic options:\n"));
522 fprintf (file, _(" --quiet, -q Work quietly\n"));
523 fprintf (file, _(" --verbose, -v Verbose\n"));
524 fprintf (file, _(" --version Print dllwrap version\n"));
525 fprintf (file, _(" --implib <outname> Synonym for --output-lib\n"));
526 fprintf (file, _(" Options for %s:\n"), program_name);
527 fprintf (file, _(" --driver-name <driver> Defaults to \"gcc\"\n"));
528 fprintf (file, _(" --driver-flags <flags> Override default ld flags\n"));

--- 130 unchanged lines hidden (view full) ---

659 dyn_string_t driver_cmdline;
660
661 int def_file_seen = 0;
662
663 char *image_base_str = 0;
664
665 program_name = argv[0];
666
520 fprintf (file, _(" Generic options:\n"));
521 fprintf (file, _(" --quiet, -q Work quietly\n"));
522 fprintf (file, _(" --verbose, -v Verbose\n"));
523 fprintf (file, _(" --version Print dllwrap version\n"));
524 fprintf (file, _(" --implib <outname> Synonym for --output-lib\n"));
525 fprintf (file, _(" Options for %s:\n"), program_name);
526 fprintf (file, _(" --driver-name <driver> Defaults to \"gcc\"\n"));
527 fprintf (file, _(" --driver-flags <flags> Override default ld flags\n"));

--- 130 unchanged lines hidden (view full) ---

658 dyn_string_t driver_cmdline;
659
660 int def_file_seen = 0;
661
662 char *image_base_str = 0;
663
664 program_name = argv[0];
665
666#if defined (HAVE_SETLOCALE) && defined (HAVE_LC_MESSAGES)
667 setlocale (LC_MESSAGES, "");
668#endif
669#if defined (HAVE_SETLOCALE)
670 setlocale (LC_CTYPE, "");
671#endif
672 bindtextdomain (PACKAGE, LOCALEDIR);
673 textdomain (PACKAGE);
674
667 saved_argv = (char **) xmalloc (argc * sizeof (char*));
668 dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int));
669 driver_arg_indices = (int *) xmalloc (argc * sizeof (int));
670 for (i = 0; i < argc; ++i)
671 {
672 size_t len = strlen (argv[i]);
673 char *arg = (char *) xmalloc (len + 1);
674 strcpy (arg, argv[i]);

--- 161 unchanged lines hidden (view full) ---

836 {
837 char *fileprefix = choose_temp_base ();
838 def_file_name = (char *) xmalloc (strlen (fileprefix) + 5);
839 sprintf (def_file_name, "%s.def",
840 (dontdeltemps) ? mybasename (fileprefix) : fileprefix);
841 delete_def_file = 1;
842 free (fileprefix);
843 delete_def_file = 1;
675 saved_argv = (char **) xmalloc (argc * sizeof (char*));
676 dlltool_arg_indices = (int *) xmalloc (argc * sizeof (int));
677 driver_arg_indices = (int *) xmalloc (argc * sizeof (int));
678 for (i = 0; i < argc; ++i)
679 {
680 size_t len = strlen (argv[i]);
681 char *arg = (char *) xmalloc (len + 1);
682 strcpy (arg, argv[i]);

--- 161 unchanged lines hidden (view full) ---

844 {
845 char *fileprefix = choose_temp_base ();
846 def_file_name = (char *) xmalloc (strlen (fileprefix) + 5);
847 sprintf (def_file_name, "%s.def",
848 (dontdeltemps) ? mybasename (fileprefix) : fileprefix);
849 delete_def_file = 1;
850 free (fileprefix);
851 delete_def_file = 1;
844 warn (_("no export definition file provided"));
845 warn (_("creating one, but that may not be what you want"));
852 warn (_("no export definition file provided.\n\
853Creating one, but that may not be what you want"));
846 }
847
848 /* set the target platform. */
849 if (strstr (target, "cygwin"))
850 which_target = CYGWIN_TARGET;
851 else if (strstr (target, "mingw"))
852 which_target = MINGW_TARGET;
853 else

--- 396 unchanged lines hidden ---
854 }
855
856 /* set the target platform. */
857 if (strstr (target, "cygwin"))
858 which_target = CYGWIN_TARGET;
859 else if (strstr (target, "mingw"))
860 which_target = MINGW_TARGET;
861 else

--- 396 unchanged lines hidden ---