pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/sysutils/xdu Kill local strdup completely and also rem...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/6cc290c45993
branches:  trunk
changeset: 514171:6cc290c45993
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Thu Jun 08 15:39:25 2006 +0000

description:
Kill local strdup completely and also remove the malloc and calloc
definitions. ANSI C is portable enough for us.

diffstat:

 sysutils/xdu/distinfo         |   4 +-
 sysutils/xdu/patches/patch-aa |  49 ++++++++++++++++++++----------------------
 2 files changed, 25 insertions(+), 28 deletions(-)

diffs (95 lines):

diff -r 50fa41dca45e -r 6cc290c45993 sysutils/xdu/distinfo
--- a/sysutils/xdu/distinfo     Thu Jun 08 15:36:17 2006 +0000
+++ b/sysutils/xdu/distinfo     Thu Jun 08 15:39:25 2006 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.6 2005/07/12 20:16:00 hubertf Exp $
+$NetBSD: distinfo,v 1.7 2006/06/08 15:39:25 joerg Exp $
 
 SHA1 (xdu-3.0.tar.Z) = 196e2ba03253fd6b8a88fafe6b00e40632183d0c
 RMD160 (xdu-3.0.tar.Z) = 0c95ad79aaeb6e58433add71d852cc0b2312a5f9
@@ -9,4 +9,4 @@
 SHA1 (xdu-3.0.i18n.patch) = 6f14b5458111b7c9776d15760d1876d242f0dabd
 RMD160 (xdu-3.0.i18n.patch) = a1ada2ae69331010dd7f3c0e77cb4410065a7254
 Size (xdu-3.0.i18n.patch) = 2760 bytes
-SHA1 (patch-aa) = 8296ae806d36d6e7e679c58b9694012a98176d6f
+SHA1 (patch-aa) = abb9683db2646ae98f943693dfcb7f634ab0cb23
diff -r 50fa41dca45e -r 6cc290c45993 sysutils/xdu/patches/patch-aa
--- a/sysutils/xdu/patches/patch-aa     Thu Jun 08 15:36:17 2006 +0000
+++ b/sysutils/xdu/patches/patch-aa     Thu Jun 08 15:39:25 2006 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.4 2005/07/12 20:16:00 hubertf Exp $
+$NetBSD: patch-aa,v 1.5 2006/06/08 15:39:25 joerg Exp $
 
---- xdu.c.orig 2005-07-11 23:15:31.000000000 +0200
-+++ xdu.c      2005-07-11 23:19:59.000000000 +0200
-@@ -19,13 +19,15 @@
+--- xdu.c.orig 2006-06-08 15:35:16.000000000 +0000
++++ xdu.c
+@@ -19,13 +19,13 @@
   * limitation a license to do the foregoing actions under any patents of
   * the party supplying this software to the X Consortium.
   */
@@ -11,8 +11,8 @@
 +#include <string.h>
  #include "version.h"
  
- extern char *malloc(), *calloc();
- 
+-extern char *malloc(), *calloc();
+-
 -#define       MAXDEPTH        80      /* max elements in a path */
 -#define       MAXNAME         1024    /* max pathname element length */
 +#define       MAXDEPTH        1024    /* max elements in a path */
@@ -20,7 +20,7 @@
  #define       MAXPATH         4096    /* max total pathname length */
  #define       NCOLS           5       /* default number of columns in display */
  
-@@ -96,6 +98,10 @@
+@@ -96,6 +96,10 @@ int size;
        struct  node    *np;
  
        np = (struct node *)calloc(1,sizeof(struct node));
@@ -31,27 +31,24 @@
        np->name = strdup(name);
        np->size = size;
        np->num = nnodes;
-@@ -610,6 +616,7 @@
+@@ -610,20 +614,6 @@ pwd()
                100.0*topp->size/rootp->size);
  }
  
-+#if !defined(__NetBSD__) && !defined(SVR4) /* == Solaris etc. */
- char *
- strdup(s)
- char *s;
-@@ -619,10 +626,15 @@
- 
-       n = strlen(s);
-       cp = malloc(n+1);
-+      if (cp == NULL) {
-+              fprintf(stderr, "Out of memory! (#2)\n");
-+              exit(1);
-+      }
-       strcpy(cp,s);
- 
-       return  cp;
- }
-+#endif /* __NetBSD__ */
- 
+-char *
+-strdup(s)
+-char *s;
+-{
+-      int     n;
+-      char    *cp;
+-
+-      n = strlen(s);
+-      cp = malloc(n+1);
+-      strcpy(cp,s);
+-
+-      return  cp;
+-}
+-
  /**************** External Entry Points ****************/
  
+ int



Home | Main Index | Thread Index | Old Index