pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/wm/uwm Fix errno. Hide malloc & calloc for ANSI systems.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/5ca7e028b7fa
branches:  trunk
changeset: 504180:5ca7e028b7fa
user:      joerg <joerg%pkgsrc.org@localhost>
date:      Tue Dec 06 15:57:22 2005 +0000

description:
Fix errno. Hide malloc & calloc for ANSI systems.

diffstat:

 wm/uwm/distinfo         |  11 ++++++-----
 wm/uwm/patches/patch-ab |  32 ++++++++++++++++++++++----------
 wm/uwm/patches/patch-ac |  10 +++++++++-
 wm/uwm/patches/patch-ad |  43 +++++++++++++++++++++++++++++++------------
 wm/uwm/patches/patch-aj |  25 ++++++++++++++++++++++---
 wm/uwm/patches/patch-ak |  23 +++++++++++++++++++++++
 6 files changed, 113 insertions(+), 31 deletions(-)

diffs (truncated from 346 to 300 lines):

diff -r 60e4b7a6c0bf -r 5ca7e028b7fa wm/uwm/distinfo
--- a/wm/uwm/distinfo   Tue Dec 06 15:55:57 2005 +0000
+++ b/wm/uwm/distinfo   Tue Dec 06 15:57:22 2005 +0000
@@ -1,15 +1,16 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 18:43:55 wiz Exp $
+$NetBSD: distinfo,v 1.4 2005/12/06 15:57:22 joerg Exp $
 
 SHA1 (X.V11R3uwm.tar.gz) = 180ad291555e3ff887fd32c9f7c286d5f1899bb8
 RMD160 (X.V11R3uwm.tar.gz) = b5722e71e50cd2b9a3d5727c1519be23704ddc54
 Size (X.V11R3uwm.tar.gz) = 114262 bytes
 SHA1 (patch-aa) = 99d696103e0bd2f845a516bb13770bd17d6546fa
-SHA1 (patch-ab) = e78dd9b5966557f4891192af4b580f32d42f3d09
-SHA1 (patch-ac) = d00643d8287a652430efb9f5aaa92d5588731d1d
-SHA1 (patch-ad) = c1bcba9002ce7c1a99fc494dc22053e0bba7646c
+SHA1 (patch-ab) = dbcbafe7dd8efd58c7948115dca50fd737f12a72
+SHA1 (patch-ac) = 0020163e35c0855114a4fe733e478d826fde9ec7
+SHA1 (patch-ad) = c07472091df19f1bd1a0489c24d996e995cab255
 SHA1 (patch-ae) = 4045c5200b95b6a75a2e05800672da6741e93cbf
 SHA1 (patch-af) = 17bd90e705a2ebb64ab2fdee10c725cc21d796d0
 SHA1 (patch-ag) = 7c03e888d27aa0b29b42ecbd913e26294b43bdf1
 SHA1 (patch-ah) = aaadc46f53f646c84b9e3973dab16afcd4535b41
 SHA1 (patch-ai) = 2efc4aee364cc8d85ffe7b617f3ad6cbea0d6e0e
-SHA1 (patch-aj) = afecd31a610e100d8868fcc4c867077015b18773
+SHA1 (patch-aj) = 5f28dd36e0af231e52e98ff41e26054c5fe30c8a
+SHA1 (patch-ak) = 11bd82eae6bdc41f3aa660a3a84893bd52a63d5d
diff -r 60e4b7a6c0bf -r 5ca7e028b7fa wm/uwm/patches/patch-ab
--- a/wm/uwm/patches/patch-ab   Tue Dec 06 15:55:57 2005 +0000
+++ b/wm/uwm/patches/patch-ab   Tue Dec 06 15:57:22 2005 +0000
@@ -1,8 +1,8 @@
-$NetBSD: patch-ab,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+$NetBSD: patch-ab,v 1.2 2005/12/06 15:57:22 joerg Exp $
 
 --- uwm.c.orig Sun Oct 23 22:21:55 1988
 +++ uwm.c      Wed Jan 19 08:20:54 2000
-@@ -41,9 +41,18 @@
+@@ -41,9 +41,22 @@ char *ProgramName;
  
  #include "uwm.h"
  #include <ctype.h>
@@ -16,13 +16,17 @@
 +#define HAVE_MKSTEMP
 +#endif
 +#endif
++
++#ifdef X_NOT_STDC_ENV
++char *malloc();
++#endif
  
  #ifdef PROFIL
 -#include <signal.h>
  /*
   * Dummy handler for profiling.
   */
-@@ -53,6 +62,27 @@
+@@ -53,6 +66,27 @@ ptrap()
  }
  #endif
  
@@ -50,7 +54,15 @@
  #define gray_width 16
  #define gray_height 16
  static char gray_bits[] = {
-@@ -115,6 +145,10 @@
+@@ -103,7 +137,6 @@ char **environ;
+     GC gc;                    /* graphics context for gray background */
+     XImage grayimage;         /* for gray background */
+     XGCValues xgc;            /* to create font GCs */
+-    char *malloc();
+     Bool fallbackMFont = False,       /* using default GC font for menus, */
+          fallbackPFont = False,       /* popups, */
+          fallbackIFont = False;       /* icons */
+@@ -115,6 +148,10 @@ char **environ;
  #ifdef PROFIL
      signal(SIGTERM, ptrap);
  #endif
@@ -61,7 +73,7 @@
  
      /*
       * Set up internal defaults.
-@@ -369,7 +403,7 @@
+@@ -369,7 +406,7 @@ char **environ;
      if (IFontInfo == NULL) {
          fprintf(stderr, "uwm: Unable to open icon font '%s', using server default.\n",
                  IFontName);
@@ -70,7 +82,7 @@
        fallbackIFont = True;
      }
      PFontInfo = XLoadQueryFont(dpy, PFontName);
-@@ -379,7 +413,7 @@
+@@ -379,7 +416,7 @@ char **environ;
        if (fallbackIFont)
            PFontInfo = IFontInfo;
        else
@@ -79,7 +91,7 @@
        fallbackPFont = True;
      }
      MFontInfo = XLoadQueryFont(dpy, MFontName);
-@@ -389,7 +423,7 @@
+@@ -389,7 +426,7 @@ char **environ;
        if (fallbackIFont || fallbackPFont)
            MFontInfo = fallbackPFont ? PFontInfo : IFontInfo;
        else
@@ -88,7 +100,7 @@
        fallbackMFont = True;
      }
  
-@@ -685,7 +719,11 @@
+@@ -685,7 +722,11 @@ char **environ;
   */
  InitBindings()
  {
@@ -100,7 +112,7 @@
      char *tempfile;           /* Temporary filename. */
      register FILE *fp;                /* Temporary file pointer. */
      register char **ptr;      /* Default bindings string array pointer. */
-@@ -699,15 +737,26 @@
+@@ -699,15 +740,26 @@ InitBindings()
        exit (1);
      }
      strcpy (tempfile, TEMPFILE);
@@ -127,7 +139,7 @@
      fclose(fp);
  
      /*
-@@ -717,6 +766,7 @@
+@@ -717,6 +769,7 @@ InitBindings()
          perror("uwm: cannot open temp file");
          exit(1);
      }
diff -r 60e4b7a6c0bf -r 5ca7e028b7fa wm/uwm/patches/patch-ac
--- a/wm/uwm/patches/patch-ac   Tue Dec 06 15:55:57 2005 +0000
+++ b/wm/uwm/patches/patch-ac   Tue Dec 06 15:57:22 2005 +0000
@@ -1,4 +1,4 @@
-$NetBSD: patch-ac,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+$NetBSD: patch-ac,v 1.2 2005/12/06 15:57:22 joerg Exp $
 
 --- uwm.h.orig Mon Oct 24 19:08:24 1988
 +++ uwm.h      Thu Dec 23 00:27:02 1999
@@ -15,3 +15,11 @@
  #include <X11/Xos.h>
  #include <X11/Xlib.h>
  #include <X11/Xutil.h>
+@@ -261,7 +267,6 @@ typedef int Pixel;
+ /*
+  * External variable definitions.
+  */
+-extern int errno;
+ extern Window Pop;            /* Pop-up dimension display window. */
+ extern Window Frozen;         /* Contains window id of "gridded" window. */
+ extern XFontStruct *IFontInfo;        /* Icon text font information. */
diff -r 60e4b7a6c0bf -r 5ca7e028b7fa wm/uwm/patches/patch-ad
--- a/wm/uwm/patches/patch-ad   Tue Dec 06 15:55:57 2005 +0000
+++ b/wm/uwm/patches/patch-ad   Tue Dec 06 15:57:22 2005 +0000
@@ -1,8 +1,19 @@
-$NetBSD: patch-ad,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+$NetBSD: patch-ad,v 1.2 2005/12/06 15:57:22 joerg Exp $
 
 --- gram.y.orig        Thu Sep 22 22:14:31 1988
 +++ gram.y     Thu Dec 23 22:04:02 1999
-@@ -117,18 +117,18 @@
+@@ -60,7 +60,10 @@ static char *hcolors[4];            /* Color value
+ static char *mcolors[2];              /* Color values used in menus. */
+ MenuLink *menu_link;                  /* Temporary menu link pointer. */
+ 
++#ifdef X_NOT_STDC_ENV
+ char *calloc();
++char *malloc();
++#endif
+ 
+ %}
+ 
+@@ -117,18 +120,18 @@ expr:            keyword '=' compexpr
                                case IsString:
                                    if ($3 == C_STRING) {
                                        strcpy(KeywordTable[$1].sptr,
@@ -25,7 +36,7 @@
                                    break;
                                case IsBoolTrue:
                                case IsBoolFalse:
-@@ -197,12 +197,12 @@
+@@ -197,12 +200,12 @@ compexpr:        keyexpr ':' contexpr ':' butte
                            ml_ptr = $3;
                        }
        |       STRING
@@ -40,7 +51,7 @@
                            switch (KeywordTable[ki].type) {
                            case IsBoolTrue:
                                *(KeywordTable[ki].bptr) = TRUE;
-@@ -220,7 +220,7 @@
+@@ -220,7 +223,7 @@ boolvar:   STRING
        ;
  
  keyword:      STRING  {
@@ -49,7 +60,7 @@
                        }
        ;
  
-@@ -246,9 +246,9 @@
+@@ -246,9 +249,9 @@ buttexpr:  buttmodexpr
                        { $$ = CheckButtonState($1); }
        ;
  
@@ -61,7 +72,7 @@
  
  buttmodexpr:  buttmodifier
                        { $$ = $1; }
-@@ -257,7 +257,7 @@
+@@ -257,7 +260,7 @@ buttmodexpr:       buttmodifier
        ;
  
  buttmodifier: STRING
@@ -70,7 +81,7 @@
        ;
  
  menuname:     STRING
-@@ -304,7 +304,7 @@
+@@ -304,7 +307,7 @@ menuline:  strings ':' color2 menuaction 
  
  menuaction:   STRING
                        {
@@ -79,7 +90,7 @@
                            if ((ki != -1) &&
                                (KeywordTable[ki].type != IsFunction) &&
                                (KeywordTable[ki].type != IsQuitFunction) &&
-@@ -350,7 +350,7 @@
+@@ -350,7 +353,7 @@ menuaction:        STRING
                        }
        ;
  
@@ -88,7 +99,7 @@
        |       strings STRING
                        { $$ = strconcat($1, $2); }
        ;
-@@ -387,7 +387,7 @@
+@@ -387,7 +390,7 @@ color2:            '(' color ':' color ')' ':'
                        }
        ;
  
@@ -97,7 +108,15 @@
        |       /* empty */     { $$ = NULL; }
        ;
  %%
-@@ -572,6 +572,8 @@
+@@ -503,7 +506,6 @@ char *
+ strconcat(s1, s2)
+ char *s1, *s2;
+ {
+-    char *malloc();
+     char *p;
+ 
+     p = malloc(strlen(s1) + strlen(s2) + 2);
+@@ -572,6 +574,8 @@ char *name;                /* Menu, if needed. */
          setbinding(ICON, index, mask, name);
      if (context & WINDOW)
          setbinding(WINDOW, index, mask, name);
@@ -106,7 +125,7 @@
  }
  
  /*
-@@ -599,12 +601,13 @@
+@@ -599,12 +603,13 @@ int m;           /* Key/button/modifier mask. */
  char *mname;          /* Pointer to menu name, if needed. */
  {
      Binding *ptr;
@@ -121,7 +140,7 @@
  
      switch (m & (LeftMask | MiddleMask | RightMask)) {
      case LeftMask:
-@@ -771,9 +774,8 @@
+@@ -771,9 +776,8 @@ MenuLink *link;
      else {
          for(ptr = list; ptr->next; ptr = ptr->next) /* NULL */;
          ptr->next = link;
diff -r 60e4b7a6c0bf -r 5ca7e028b7fa wm/uwm/patches/patch-aj
--- a/wm/uwm/patches/patch-aj   Tue Dec 06 15:55:57 2005 +0000
+++ b/wm/uwm/patches/patch-aj   Tue Dec 06 15:57:22 2005 +0000
@@ -1,8 +1,19 @@
-$NetBSD: patch-aj,v 1.1.1.1 2000/12/12 02:03:49 wiz Exp $
+$NetBSD: patch-aj,v 1.2 2005/12/06 15:57:22 joerg Exp $
 
 --- Menu.c.orig        Sat Oct  1 18:41:13 1988
 +++ Menu.c     Mon Jan 17 22:09:10 2000
-@@ -84,6 +84,14 @@
+@@ -72,6 +72,10 @@ Bool alternateGC = True;    /* true if only
+ #define vfork() fork()
+ #endif
+ 
++#ifdef X_NOT_STDC_ENV
++char *malloc();
++#endif
++
+ /* the following procedure is a copy of the implementation of system, 
+  * modified to reset the handling of SIGINT, SIGQUIT, and SIGHUP before
+  * exec-ing
+@@ -84,6 +88,14 @@ char *s;
        char **oldenviron;
        extern char **environ, **newenviron;
  
@@ -17,7 +28,7 @@
        oldenviron = environ;



Home | Main Index | Thread Index | Old Index