* coffdump.c (xcalloc): Remove, in libiberty now.
authorJeff Law <law@redhat.com>
Fri, 15 Jan 1999 06:40:20 +0000 (06:40 +0000)
committerJeff Law <law@redhat.com>
Fri, 15 Jan 1999 06:40:20 +0000 (06:40 +0000)
        * srconv.c (xcalloc): Likewise.
        * sysdump.c (xcalloc): Likewise.

binutils/coffdump.c
binutils/srconv.c
binutils/sysdump.c

index 64815fb..5cd75cb 100644 (file)
@@ -32,15 +32,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #define PROGRAM_VERSION "1.0"
 
-char *xcalloc(a,b)
-int a;
-int b;
-{
-  char *r = xmalloc(a*b);
-  memset (r, 0, a * b);
-  return r;
-}
-
 static int atnl;
 static void dump_coff_scope ();
 
@@ -485,7 +476,9 @@ main (ac, av)
       { NULL, no_argument, 0, 0 }
     };
 
+#ifdef HAVE_SETLOCALE
   setlocale (LC_MESSAGES, "");
+#endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
index bd1ea65..e7e362c 100644 (file)
@@ -66,16 +66,6 @@ static int ids2[20000];
 static int base1 = 0x18;
 static int base2 = 0x2018;
 
-char *
-xcalloc (a, b)
-     int a;
-     int b;
-{
-  char *r = xmalloc (a * b);
-  memset (r, 0, a * b);
-  return r;
-}
-
 static int
 get_member_id (x)
      int x;
@@ -1919,7 +1909,9 @@ main (ac, av)
   char *input_file;
   char *output_file;
 
+#ifdef HAVE_SETLOCALE
   setlocale (LC_MESSAGES, "");
+#endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
index 3863031..6810f6f 100644 (file)
@@ -41,16 +41,6 @@ static int code;
 static int addrsize = 4;
 static FILE *file;
 
-static char *
-xcalloc (a, b)
-     int a;
-     int b;
-{
-  char *r = xmalloc (a * b);
-  memset (r, 0, a * b);
-  return r;
-}
-
 char *
 getCHARS (ptr, idx, size, max)
      unsigned char *ptr;
@@ -745,7 +735,9 @@ main (ac, av)
     {NULL, no_argument, 0, 0}
   };
 
+#ifdef HAVE_SETLOCALE
   setlocale (LC_MESSAGES, "");
+#endif
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);