php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56838 non-gcc compilers dont like var defines in the code
Submitted: 2006-02-12 13:42 UTC Modified: 2006-02-12 20:50 UTC
From: info at gknw dot de Assigned:
Status: Closed Package: svn (PECL)
PHP Version: Irrelevant OS: NetWare, Win32
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: info at gknw dot de
New email:
PHP Version: OS:

 

 [2006-02-12 13:42 UTC] info at gknw dot de
Description:
------------
Hi,
I've tried to compile php_svn for NetWare and Win32 platforms, but there the usual non-gcc compilers dotn like when you define new vars in the middle of the code.
See below patch for correction.
Beside this a great extension!! I was all the time thinking of coding self one with only some of the functions yours provides! very great! thanks!

Guenter.


Reproduce code:
---------------
--- svn.c.orig	Mon May 30 01:59:52 2005
+++ svn.c	Tue Feb 07 01:58:18 2006
@@ -226,6 +226,7 @@
 	svn_boolean_t store_password_val = TRUE;
 	svn_auth_provider_object_t *provider;
 	svn_auth_baton_t *ab;
+	apr_array_header_t *providers;
 
 	if (SVN_G(pool)) return;
 
@@ -244,8 +245,7 @@
 	SVN_G(ctx)->log_msg_func = php_svn_get_commit_log;
 	
 	/* The whole list of registered providers */
-	apr_array_header_t *providers
-		= apr_array_make (SVN_G(pool), 10, sizeof (svn_auth_provider_object_t *));
+	providers = apr_array_make (SVN_G(pool), 10, sizeof (svn_auth_provider_object_t *));
 
 	/* The main disk-caching auth providers, for both
 	   'username/password' creds and 'username' creds.  */
@@ -679,11 +679,12 @@
 		svn_sort__item_t *item;
 		svn_log_changed_path_t *log_item;
 		zval *zpaths;
+		const char *path;
 
 		MAKE_STD_ZVAL(zpaths);
 		array_init(zpaths);
 		item = &(APR_ARRAY_IDX (sorted_paths, i, svn_sort__item_t));
-		const char *path = item->key;
+		path = item->key;
 		log_item = apr_hash_get (changed_paths, item->key, item->klen);
 
 		add_assoc_stringl(zpaths, "action", &(log_item->action), 1,1);



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-02-12 20:50 UTC] info at gknw dot de
okay - seems fixed in cvs code + a bunch of new stuff;
how about a 0.2 release?
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:28 2024 UTC