View | Details | Raw Unified | Return to bug 91452
Collapse All | Expand All

(-)/usr/ports/lang/pike76/Makefile (-2 / +1 lines)
Lines 6-13 Link Here
6
#
6
#
7
7
8
PORTNAME=	pike76
8
PORTNAME=	pike76
9
PORTVERSION=	7.6.50
9
PORTVERSION=	7.6.64
10
PORTREVISION=	2
11
CATEGORIES=	lang
10
CATEGORIES=	lang
12
MASTER_SITES=	ftp://pike.ida.liu.se/pub/pike/beta/${PORTVERSION}/ \
11
MASTER_SITES=	ftp://pike.ida.liu.se/pub/pike/beta/${PORTVERSION}/ \
13
		ftp://pike.ida.liu.se/pub/pike/all/${PORTVERSION}/ \
12
		ftp://pike.ida.liu.se/pub/pike/all/${PORTVERSION}/ \
(-)/usr/ports/lang/pike76/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
MD5 (Pike-v7.6.50.tar.gz) = 20aa2b8ff088733b6c5fc048d47aa712
1
MD5 (Pike-v7.6.64.tar.gz) = a325b63a3d8778da3d89961889493c9b
2
SHA256 (Pike-v7.6.50.tar.gz) = 0282adfcdc43dc7feced18415ce165ffc1a1ea288cfb9b343368b170f6445711
2
SHA256 (Pike-v7.6.64.tar.gz) = 79c57c698d05d8979a3db475d35995a62f0a290d552866e5b765c988d8284591
3
SIZE (Pike-v7.6.50.tar.gz) = 17521150
3
SIZE (Pike-v7.6.64.tar.gz) = 15197522
(-)/usr/ports/lang/pike76/files/patch-lib-modules-Parser.pmod-XML.pmod-Tree.pmod (-68 lines)
Lines 1-68 Link Here
1
--- lib/modules/Parser.pmod/XML.pmod/Tree.pmod.old	Wed Nov 16 12:29:10 2005
2
+++ lib/modules/Parser.pmod/XML.pmod/Tree.pmod	Wed Nov 16 12:29:14 2005
3
@@ -1,7 +1,7 @@
4
 #pike __REAL_VERSION__
5
 
6
 /*
7
- * $Id: Tree.pmod,v 1.53 2004/12/21 16:07:07 grubba Exp $
8
+ * $Id: Tree.pmod,v 1.54 2005/11/07 14:21:17 nilsson Exp $
9
  *
10
  */
11
 
12
@@ -757,11 +757,15 @@
13
   //!
14
   static void create(int type, string name, mapping attr, string text)
15
   {
16
-    if (name) {
17
+    if (name && has_value(name, ":")) {
18
       sscanf(reverse(name), "%[^/:]", mTagName);
19
       mTagName=reverse(mTagName);
20
       mNamespace=name[..sizeof(name)-(1+sizeof(mTagName))];
21
     }
22
+    else {
23
+      mTagName = name;
24
+      mNamespace = "";
25
+    }
26
     mNodeType = type;
27
 //     mTagCode = kTagMapping[name] || kUnsupportedTagMapping[name];
28
     mAttributes = attr;
29
@@ -1447,25 +1451,27 @@
30
     //  the W3 spec. This is necessary since CDATA sections are
31
     //  converted to text nodes which might need to be concatenated
32
     //  with neighboring text nodes.
33
+
34
     Node text_node;
35
-    foreach(contents, Node child) {
36
+    int(0..1) modified;
37
+
38
+    foreach(contents; int i; Node child) {
39
       if (child->get_node_type() == XML_TEXT) {
40
-	if (text_node)
41
+	if (text_node) {
42
 	  //  Add this text string to the previous text node.
43
 	  text_node->_add_to_text (child->get_text());
44
+	  contents[i]=0;
45
+	  modified=1;
46
+	}
47
 	else
48
 	  text_node = child;
49
-      } else {
50
-	//  Process buffered text before this child is added
51
-	if (text_node) {
52
-	  node->add_child(text_node);
53
-	  text_node = 0;
54
-	}
55
-	node->add_child(child);
56
-      }
57
+      } else
58
+	text_node = 0;
59
     }
60
-    if (text_node)
61
-      node->add_child(text_node);
62
+
63
+    if( modified )
64
+      contents -= ({ 0 });
65
+    node->replace_children( contents );
66
     return (node);
67
 
68
   case "error":
(-)/usr/ports/lang/pike76/files/patch-modules-Odbc-odbc_result.c (-73 lines)
Lines 1-73 Link Here
1
--- src/modules/Odbc/odbc_result.c.old	Wed Nov 16 10:55:43 2005
2
+++ src/modules/Odbc/odbc_result.c	Wed Nov 16 10:55:48 2005
3
@@ -2,7 +2,7 @@
4
 || This file is part of Pike. For copyright information see COPYRIGHT.
5
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
6
 || for more information.
7
-|| $Id: odbc_result.c,v 1.37 2003/05/02 12:54:37 grubba Exp $
8
+|| $Id: odbc_result.c,v 1.38 2005/11/09 13:12:35 grubba Exp $
9
 */
10
 
11
 /*
12
@@ -21,7 +21,7 @@
13
 #include "config.h"
14
 #endif /* HAVE_CONFIG_H */
15
 
16
-RCSID("$Id: odbc_result.c,v 1.37 2003/05/02 12:54:37 grubba Exp $");
17
+RCSID("$Id: odbc_result.c,v 1.38 2005/11/09 13:12:35 grubba Exp $");
18
 
19
 #include "interpret.h"
20
 #include "object.h"
21
@@ -442,6 +442,18 @@
22
 	      push_int(0);
23
 	    }
24
 	    break;
25
+	  } else if (code == SQL_SUCCESS_WITH_INFO) {
26
+	    /* Data truncated. */
27
+	    num_strings++;
28
+#ifdef ODBC_DEBUG
29
+	    fprintf(stderr, "[%d] ", num_strings);
30
+#endif /* ODBC_DEBUG */
31
+	    if (PIKE_ODBC_RES->field_info[i].type == SQL_C_BINARY) {
32
+	      push_string(make_shared_binary_string(blob_buf, BLOB_BUFSIZ));
33
+	    } else {
34
+	      /* SQL_C_CHAR's are NUL-terminated... */
35
+	      push_string(make_shared_binary_string(blob_buf, BLOB_BUFSIZ - 1));
36
+	    }
37
 	  } else {
38
 	    num_strings++;
39
 #ifdef ODBC_DEBUG
40
@@ -453,15 +465,27 @@
41
 #endif /* SQL_NO_TOTAL */
42
                 ) {
43
 	      push_string(make_shared_binary_string(blob_buf, len));
44
-	      break;
45
 	    } else {
46
-	      if (PIKE_ODBC_RES->field_info[i].type == SQL_C_BINARY) {
47
-		push_string(make_shared_binary_string(blob_buf, BLOB_BUFSIZ));
48
-	      } else {
49
-		/* SQL_C_CHAR's are NUL-terminated... */
50
-		push_string(make_shared_binary_string(blob_buf, BLOB_BUFSIZ - 1));
51
+	      /* Truncated, but no support for chained SQLGetData calls. */
52
+	      char *buf = xalloc(len+2);
53
+	      SQLLEN newlen = 0;
54
+	      code = SQLGetData(PIKE_ODBC_RES->hstmt, (SQLUSMALLINT)(i+1),
55
+				PIKE_ODBC_RES->field_info[i].type,
56
+				buf, len+1, &newlen);
57
+	      if (code != SQL_SUCCESS) {
58
+		Pike_error("odbc->fetch_row(): "
59
+			   "Unexpected code from SQLGetData(): %d\n",
60
+			   code);
61
 	      }
62
+	      if (len != newlen) {
63
+		Pike_error("odbc->fetch_row(): "
64
+			   "Unexpected length from SQLGetData(): "
65
+			   "%d (expected %d)\n", newlen, len);
66
+	      }
67
+	      push_string(make_shared_binary_string(buf, len));
68
+	      free(buf);
69
 	    }
70
+	    break;
71
 	  }
72
 	}
73
 	if (num_strings > 1) {
(-)/usr/ports/lang/pike76/files/patch-stralloc.c (-28 lines)
Lines 1-28 Link Here
1
--- src/stralloc.c.old	Fri Nov 18 11:06:05 2005
2
+++ src/stralloc.c	Fri Nov 18 11:06:10 2005
3
@@ -2,7 +2,7 @@
4
 || This file is part of Pike. For copyright information see COPYRIGHT.
5
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
6
 || for more information.
7
-|| $Id: stralloc.c,v 1.169 2005/01/19 13:06:57 grubba Exp $
8
+|| $Id: stralloc.c,v 1.170 2005/11/18 01:14:22 nilsson Exp $
9
 */
10
 
11
 #include "global.h"
12
@@ -24,7 +24,7 @@
13
 #include <ctype.h>
14
 #include <math.h>
15
 
16
-RCSID("$Id: stralloc.c,v 1.169 2005/01/19 13:06:57 grubba Exp $");
17
+RCSID("$Id: stralloc.c,v 1.170 2005/11/18 01:14:22 nilsson Exp $");
18
 
19
 /* #define STRALLOC_USE_PRIMES */
20
 
21
@@ -1596,6 +1596,7 @@
22
 	add_ref(a = old);
23
       } else {
24
 	link_pike_string(a, a->hval);
25
+	add_ref(a);
26
       }
27
       return a;
28
     }else{
(-)/usr/ports/lang/pike76/files/patch-threads.c (-30 lines)
Lines 1-30 Link Here
1
--- src/threads.c.old	Wed Nov 16 10:58:57 2005
2
+++ src/threads.c	Wed Nov 16 10:59:00 2005
3
@@ -2,12 +2,12 @@
4
 || This file is part of Pike. For copyright information see COPYRIGHT.
5
 || Pike is distributed under GPL, LGPL and MPL. See the file COPYING
6
 || for more information.
7
-|| $Id: threads.c,v 1.238 2005/05/18 12:36:54 mast Exp $
8
+|| $Id: threads.c,v 1.239 2005/11/15 10:31:56 grubba Exp $
9
 */
10
 
11
 #ifndef CONFIGURE_TEST
12
 #include "global.h"
13
-RCSID("$Id: threads.c,v 1.238 2005/05/18 12:36:54 mast Exp $");
14
+RCSID("$Id: threads.c,v 1.239 2005/11/15 10:31:56 grubba Exp $");
15
 
16
 PMOD_EXPORT int num_threads = 1;
17
 PMOD_EXPORT int threads_disabled = 0;
18
@@ -1460,9 +1460,10 @@
19
     THIS_KEY->mutex_obj = NULL;
20
     if (mut->num_waiting)
21
       co_signal(&mut->condition);
22
-    else if (!mutex_obj->prog)
23
+    else if (mutex_obj && !mutex_obj->prog)
24
       co_destroy (&mut->condition);
25
-    free_object(mutex_obj);
26
+    if (mutex_obj)
27
+      free_object(mutex_obj);
28
   }
29
 }
30
 

Return to bug 91452