pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/www/bkedit Fix build with gcc4.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/918e3731de51
branches:  trunk
changeset: 515119:918e3731de51
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Sun Jun 25 13:46:37 2006 +0000

description:
Fix build with gcc4.

diffstat:

 www/bkedit/distinfo         |    6 +-
 www/bkedit/patches/patch-ab |   22 ++++++
 www/bkedit/patches/patch-ac |  142 ++++++++++++++++++++++++++++++++++++++++++++
 www/bkedit/patches/patch-ad |  142 ++++++++++++++++++++++++++++++++++++++++++++
 www/bkedit/patches/patch-ae |  142 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 453 insertions(+), 1 deletions(-)

diffs (truncated from 479 to 300 lines):

diff -r 02abcea7d9cf -r 918e3731de51 www/bkedit/distinfo
--- a/www/bkedit/distinfo       Sun Jun 25 13:35:32 2006 +0000
+++ b/www/bkedit/distinfo       Sun Jun 25 13:46:37 2006 +0000
@@ -1,6 +1,10 @@
-$NetBSD: distinfo,v 1.5 2005/02/24 14:08:29 wiz Exp $
+$NetBSD: distinfo,v 1.6 2006/06/25 13:46:37 wiz Exp $
 
 SHA1 (bk_edit-0.6.23.tar.gz) = fe37a0e213e54d8a60f70b6e03818e26f3690bf2
 RMD160 (bk_edit-0.6.23.tar.gz) = a9cc09925ccd0691d5a38b04ea2a81f877a3c102
 Size (bk_edit-0.6.23.tar.gz) = 113434 bytes
 SHA1 (patch-aa) = 84d7f99a8de035df2fd92586ded632aaf6edfc1e
+SHA1 (patch-ab) = 35434dd2df53738c6941f01f7fdd780bf20ea3fb
+SHA1 (patch-ac) = f2d604127d303ad1293c2990671a807a772da2ac
+SHA1 (patch-ad) = e1161633ecd78e5c195e97a70710f4af99950a76
+SHA1 (patch-ae) = c9be8f24f93a885c4a2adaca103e3b487a5200e0
diff -r 02abcea7d9cf -r 918e3731de51 www/bkedit/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/bkedit/patches/patch-ab       Sun Jun 25 13:46:37 2006 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-ab,v 1.1 2006/06/25 13:46:37 wiz Exp $
+
+Fixes gcc4 error:
+error: invalid lvalue in decrement
+
+--- src/bk_edit_recent_document.c.orig 2003-11-29 13:14:14.000000000 +0000
++++ src/bk_edit_recent_document.c
+@@ -115,10 +115,13 @@ static void ok (GtkWidget *dialog, void 
+ {
+       GList *list = config_recent_documents_list_get (conf);
+       GList *l = list;
++      int len;
++
++      len = (int) which;
+ 
+       while (l)
+       {
+-              if (((int) which)-- == 0)
++              if (len-- == 0)
+               {
+                       break;
+               }
diff -r 02abcea7d9cf -r 918e3731de51 www/bkedit/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/bkedit/patches/patch-ac       Sun Jun 25 13:46:37 2006 +0000
@@ -0,0 +1,142 @@
+$NetBSD: patch-ac,v 1.1 2006/06/25 13:46:37 wiz Exp $
+
+Fixes gcc4 error:
+error: invalid storage class for function 'non_greedy_parsing'
+
+--- src/plugins/nn4/nn4_parse.lex.orig 2003-11-29 13:14:14.000000000 +0000
++++ src/plugins/nn4/nn4_parse.lex
+@@ -38,6 +38,7 @@
+ 
+ #undef YY_USES_REJECT
+ 
++static char *non_greedy_parsing (pattern [], char []);
+ %}
+ 
+ %option noyywrap
+@@ -56,65 +57,6 @@ DOCTYPE             "<!DOCTYPE NETSCAPE-Bookmark-fi
+ 
+ 
+ %{
+-
+-static char *non_greedy_parsing (pattern stop_pattern[], char yytext[])
+-{
+-      char_vector *text_cv  = char_vector_new (text_cv, 100);
+-      char        *text_end = NULL;
+-      char        *text;
+-      int         in, i, which, chr_cnt = 0;
+-
+-      char_vector_add (text_cv, yytext[0]);
+-
+-      while ((text_end == NULL) && ((in = input ()) != EOF))
+-      {
+-              char_vector_add (text_cv, in);
+-              chr_cnt++;
+-
+-              for (which = 0; stop_pattern[which].text != NULL; which++)
+-              {
+-                      if (chr_cnt > stop_pattern[which].length)
+-                      {
+-                              stop_pattern[which].text_ptr++;
+-                      }
+-              }
+-
+-              for (which = 0; stop_pattern[which].text != NULL; which++)
+-              {
+-                      text_end = strstr ((text_cv->vector) + stop_pattern[which].text_ptr,
+-                                              stop_pattern[which].text);
+-                      if (text_end != NULL)
+-                      {
+-                              break;
+-                      }
+-              }
+-      }
+-
+-      if (text_end != NULL)
+-      {
+-              *text_end = '\0';
+-
+-              for (i = strlen (stop_pattern[which].text) - 1; i >= 0; i--)
+-              {
+-                      unput (stop_pattern[which].text[i]);
+-              }
+-      }
+-      else
+-      {
+-              char_vector_del (text_cv);
+-              return NULL;
+-      }
+-
+-      text = strdup (text_cv->vector);
+-      char_vector_del (text_cv);
+-
+-      return text;
+-}
+-
+-%}
+-
+-
+-%{
+ /************************************************************************
+  * doctype
+  ************************************************************************/
+@@ -283,6 +225,60 @@ static char *non_greedy_parsing (pattern
+ 
+ %%
+ 
++static char *non_greedy_parsing (pattern stop_pattern[], char yytext[])
++{
++      char_vector *text_cv  = char_vector_new (text_cv, 100);
++      char        *text_end = NULL;
++      char        *text;
++      int         in, i, which, chr_cnt = 0;
++
++      char_vector_add (text_cv, yytext[0]);
++
++      while ((text_end == NULL) && ((in = input ()) != EOF))
++      {
++              char_vector_add (text_cv, in);
++              chr_cnt++;
++
++              for (which = 0; stop_pattern[which].text != NULL; which++)
++              {
++                      if (chr_cnt > stop_pattern[which].length)
++                      {
++                              stop_pattern[which].text_ptr++;
++                      }
++              }
++
++              for (which = 0; stop_pattern[which].text != NULL; which++)
++              {
++                      text_end = strstr ((text_cv->vector) + stop_pattern[which].text_ptr,
++                                              stop_pattern[which].text);
++                      if (text_end != NULL)
++                      {
++                              break;
++                      }
++              }
++      }
++
++      if (text_end != NULL)
++      {
++              *text_end = '\0';
++
++              for (i = strlen (stop_pattern[which].text) - 1; i >= 0; i--)
++              {
++                      unput (stop_pattern[which].text[i]);
++              }
++      }
++      else
++      {
++              char_vector_del (text_cv);
++              return NULL;
++      }
++
++      text = strdup (text_cv->vector);
++      char_vector_del (text_cv);
++
++      return text;
++}
++
+ 
+ void yyerror (char *error_message)
+ {
diff -r 02abcea7d9cf -r 918e3731de51 www/bkedit/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/bkedit/patches/patch-ad       Sun Jun 25 13:46:37 2006 +0000
@@ -0,0 +1,142 @@
+$NetBSD: patch-ad,v 1.1 2006/06/25 13:46:37 wiz Exp $
+
+Fixes gcc4 error:
+error: invalid storage class for function 'non_greedy_parsing'
+
+--- src/plugins/moz/moz_parse.lex.orig 2003-11-29 13:14:14.000000000 +0000
++++ src/plugins/moz/moz_parse.lex
+@@ -41,6 +41,7 @@
+ #undef YY_USES_REJECT
+ 
+ int yylex (void);
++static char *non_greedy_parsing (pattern [], char []);
+ 
+ %}
+ 
+@@ -60,65 +61,6 @@ DOCTYPE             "<!DOCTYPE NETSCAPE-Bookmark-fi
+ 
+ 
+ %{
+-
+-static char *non_greedy_parsing (pattern stop_pattern[], char yytext[])
+-{
+-      char_vector *text_cv  = char_vector_new (text_cv, 100);
+-      char        *text_end = NULL;
+-      char        *text;
+-      int         in, i, which, chr_cnt = 0;
+-
+-      char_vector_add (text_cv, yytext[0]);
+-
+-      while ((text_end == NULL) && ((in = input ()) != EOF))
+-      {
+-              char_vector_add (text_cv, in);
+-              chr_cnt++;
+-
+-              for (which = 0; stop_pattern[which].text != NULL; which++)
+-              {
+-                      if (chr_cnt > stop_pattern[which].length)
+-                      {
+-                              stop_pattern[which].text_ptr++;
+-                      }
+-              }
+-
+-              for (which = 0; stop_pattern[which].text != NULL; which++)
+-              {
+-                      text_end = strstr ((text_cv->vector) + stop_pattern[which].text_ptr,
+-                                              stop_pattern[which].text);
+-                      if (text_end != NULL)
+-                      {
+-                              break;
+-                      }
+-              }
+-      }
+-
+-      if (text_end != NULL)
+-      {
+-              *text_end = '\0';
+-
+-              for (i = strlen (stop_pattern[which].text) - 1; i >= 0; i--)
+-              {
+-                      unput (stop_pattern[which].text[i]);
+-              }
+-      }
+-      else
+-      {
+-              char_vector_del (text_cv);
+-              return NULL;
+-      }
+-
+-      text = strdup (text_cv->vector);
+-      char_vector_del (text_cv);
+-
+-      return text;
+-}
+-
+-%}
+-
+-
+-%{
+ /************************************************************************
+  * doctype
+  ************************************************************************/
+@@ -303,6 +245,60 @@ static char *non_greedy_parsing (pattern
+ 
+ %%
+ 
++static char *non_greedy_parsing (pattern stop_pattern[], char yytext[])
++{
++      char_vector *text_cv  = char_vector_new (text_cv, 100);
++      char        *text_end = NULL;
++      char        *text;
++      int         in, i, which, chr_cnt = 0;
++
++      char_vector_add (text_cv, yytext[0]);
++
++      while ((text_end == NULL) && ((in = input ()) != EOF))
++      {
++              char_vector_add (text_cv, in);
++              chr_cnt++;
++
++              for (which = 0; stop_pattern[which].text != NULL; which++)
++              {
++                      if (chr_cnt > stop_pattern[which].length)
++                      {
++                              stop_pattern[which].text_ptr++;
++                      }
++              }
++
++              for (which = 0; stop_pattern[which].text != NULL; which++)
++              {



Home | Main Index | Thread Index | Old Index