SOURCES: php-pecl-rpmreader-tsrmls.patch (NEW), php4-pecl-rpmreade...

adamg adamg at pld-linux.org
Tue Nov 1 19:54:23 CET 2005


Author: adamg                        Date: Tue Nov  1 18:54:23 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- make it build with ZTS enabled

---- Files affected:
SOURCES:
   php-pecl-rpmreader-tsrmls.patch (NONE -> 1.1)  (NEW), php4-pecl-rpmreader-tsrmls.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/php-pecl-rpmreader-tsrmls.patch
diff -u /dev/null SOURCES/php-pecl-rpmreader-tsrmls.patch:1.1
--- /dev/null	Tue Nov  1 19:54:23 2005
+++ SOURCES/php-pecl-rpmreader-tsrmls.patch	Tue Nov  1 19:54:18 2005
@@ -0,0 +1,195 @@
+diff -burN rpmreader-0.2.orig/rpmreader_io.c rpmreader-0.2/rpmreader_io.c
+--- rpmreader-0.2.orig/rpmreader_io.c	2005-11-01 18:48:35.722941296 +0100
++++ rpmreader-0.2/rpmreader_io.c	2005-11-01 18:56:19.515434120 +0100
+@@ -63,7 +63,7 @@
+ 
+ /* {{{ proto int _php_rpm_validity(php_stream *stream)
+    Will read the first 4 bytes of the file and check to see if they are the magic number that identifies the file as an RPM file. */
+-int _php_rpm_validity(php_stream *stream)
++int _php_rpm_validity(php_stream *stream TSRMLS_DC)
+ {
+ 	/*Will return 0 on error, non-zero on success. */
+ 
+@@ -108,7 +108,7 @@
+ 
+ /* {{{ proto int _php_rpm_seek_header(php_stream *stream)
+    Will read from the file pointer until it reaches the first header magic number.  */
+-int _php_rpm_seek_header(php_stream *stream)
++int _php_rpm_seek_header(php_stream *stream TSRMLS_DC)
+ {
+ 	/* This function will return 0 on error, non-zero on success.  The
+ 	 * return value, if not zero, will contain the number of bytes
+@@ -162,7 +162,7 @@
+ 
+ /* {{{ proto int _php_rpm_find_signature(php_stream *stream)
+    Will read from the file pointer until it reaches the first header magic number (the signature). */
+-int _php_rpm_find_signature(php_stream *stream)
++int _php_rpm_find_signature(php_stream *stream TSRMLS_DC)
+ {
+ 	/* This function makes use of the php_stream_seek function to
+ 	 * rewind the file back to the beginning of the file.  The
+@@ -182,7 +182,7 @@
+ 	else
+ 		return 0;
+ 
+-	bytecount = _php_rpm_seek_header(stream);
++	bytecount = _php_rpm_seek_header(stream TSRMLS_CC);
+ 
+ 	return bytecount;
+ }
+@@ -190,7 +190,7 @@
+ 
+ /* {{{ proto int _php_rpm_find_header(php_stream *stream)
+    Will read from the file pointer until it reaches the second header magic number (the header). */
+-int _php_rpm_find_header(php_stream *stream)
++int _php_rpm_find_header(php_stream *stream TSRMLS_DC)
+ {
+ 	/* This function makes use of the _php_rpm_find_signature function
+ 	 * to skip to the first header in the file before trying to find
+@@ -208,7 +208,7 @@
+ 
+ 	/* Use the _php_rpm_find_signature function to get to the first
+ 	 * header (signature) */
+-	bytecount = _php_rpm_find_signature(stream);
++	bytecount = _php_rpm_find_signature(stream TSRMLS_CC);
+ 	if (bytecount == 0)
+ 		return 0;
+ 
+@@ -226,7 +226,7 @@
+ 
+ 	/* Use the _php_rpm_seek_header function to get to the next
+ 	 * header */ 
+-	retval = _php_rpm_seek_header(stream);
++	retval = _php_rpm_seek_header(stream TSRMLS_CC);
+ 	if (retval == 0)
+ 		return 0;
+ 
+@@ -239,7 +239,7 @@
+ 
+ /* {{{ proto int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr)
+    Will read the header for a header structure within an RPM file. */
+-int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr)
++int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr TSRMLS_DC)
+ {
+ 	/* This function assumes that the file pointer is pointing to the
+ 	 * first byte of the header.  The function will read the 0x10(16)
+@@ -330,7 +330,7 @@
+ 
+ /* {{{ proto int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx)
+    Will read an index entry within a header in an RPM file. */
+-int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx)
++int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx TSRMLS_DC)
+ {
+ 	/* This function assumes that the file pointer is pointing to the
+ 	 * first byte of an index.  The function will read the 0x10(16)
+@@ -413,7 +413,7 @@
+ /* {{{ proto int _php_rpm_fetch_store(php_stream *stream, rpmHeader *rh, void **store)
+    Will read the entire data store within a header in an RPM file. */
+ int _php_rpm_fetch_store(php_stream *stream, rpmHeader *rh,
+-						 void **store)
++						 void **store TSRMLS_DC)
+ {
+ 	/* This function assumes that the file pointer is pointing
+ 	 * to the first byte of the store.  If the return value is
+@@ -455,7 +455,7 @@
+ /* {{{ proto int _php_rpm_import_indices(php_stream *stream, rpmHeader *hdr, zend_llist **idxlist)
+    Will import all the index entries in the Header into a linked list so that we don't have to keep referencing the file to get the information. */
+ int _php_rpm_import_indices(php_stream *stream, rpmHeader *hdr,
+-							zend_llist **idxlist)
++							zend_llist **idxlist TSRMLS_DC)
+ {
+ 	/* The function will return 0 on error, non-zero on success.  If
+ 	 * successful, the number of indices processed will be returned.
+@@ -476,7 +476,7 @@
+ 	}
+ 
+ 	for (i = 0; i < hdr->num_indices; i++) {
+-		nbytes = _php_rpm_fetch_index(stream, &idx);
++		nbytes = _php_rpm_fetch_index(stream, &idx TSRMLS_CC);
+ 		if (nbytes == 0x10) {
+ 			zend_llist_add_element(idxl, (void *) idx);
+ 		}
+diff -burN rpmreader-0.2.orig/rpmreader_io.h rpmreader-0.2/rpmreader_io.h
+--- rpmreader-0.2.orig/rpmreader_io.h	2005-11-01 18:48:35.722941296 +0100
++++ rpmreader-0.2/rpmreader_io.h	2005-11-01 18:56:11.941585520 +0100
+@@ -85,17 +85,17 @@
+ 	rpmIndexNode *tail;
+ } rpmIndexList;
+ 
+-void _free_rpmreader(zend_rsrc_list_entry *rsrc);
++void _free_rpmreader(zend_rsrc_list_entry *rsrc TSRMLS_DC);
+ void _php_free_rpm_index(void **idx);
+-int _php_rpm_validity(php_stream *stream);
+-int _php_rpm_seek_header(php_stream *stream);
+-int _php_rpm_find_signature(php_stream *stream);
+-int _php_rpm_find_header(php_stream *stream);
+-int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr);
+-int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx);
+-int _php_rpm_fetch_store(php_stream *stream, rpmHeader *hdr, void **store);
++int _php_rpm_validity(php_stream *stream TSRMLS_DC);
++int _php_rpm_seek_header(php_stream *stream TSRMLS_DC);
++int _php_rpm_find_signature(php_stream *stream TSRMLS_DC);
++int _php_rpm_find_header(php_stream *stream TSRMLS_DC);
++int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr TSRMLS_DC);
++int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx TSRMLS_DC);
++int _php_rpm_fetch_store(php_stream *stream, rpmHeader *hdr, void **store TSRMLS_DC);
+ int _php_rpm_import_indices (php_stream *stream, rpmHeader *hdr,
+-			     zend_llist **l);
++			     zend_llist **l TSRMLS_DC);
+ 
+ #endif
+ 
+--- rpmreader-0.2.orig/rpmreader.c	2005-11-01 18:48:35.722941296 +0100
++++ rpmreader-0.2/rpmreader.c	2005-11-01 19:03:47.761290392 +0100
+@@ -254,21 +254,21 @@
+ 		RETURN_FALSE;
+     }
+ 	
+-    if (!_php_rpm_validity(rfr->stream)) {
++    if (!_php_rpm_validity(rfr->stream TSRMLS_CC)) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "File is not an RPM file");
+ 		php_stream_close(rfr->stream);
+ 		efree(rfr);
+ 		RETURN_FALSE;
+     }
+ 	
+-    if (!(retval = _php_rpm_find_header(rfr->stream))) {
++    if (!(retval = _php_rpm_find_header(rfr->stream TSRMLS_CC))) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "RPM Header not found in file");
+ 		php_stream_close(rfr->stream);
+ 		efree(rfr);
+ 		RETURN_FALSE;
+     }
+ 
+-    if (_php_rpm_fetch_header(rfr->stream, &rh) < 0x10)	{
++    if (_php_rpm_fetch_header(rfr->stream, &rh TSRMLS_CC) < 0x10)	{
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot read header section");
+ 		php_stream_close(rfr->stream);
+ 		efree(rfr);
+@@ -278,7 +278,7 @@
+     rfr->rpmhdr = rh;
+ 
+     idxl = NULL;
+-    retval = _php_rpm_import_indices(rfr->stream, rfr->rpmhdr, &idxl);
++    retval = _php_rpm_import_indices(rfr->stream, rfr->rpmhdr, &idxl TSRMLS_CC);
+ 
+     if (idxl == NULL) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Problem importing indices");
+@@ -289,7 +289,7 @@
+ 
+     rfr->idxlist = idxl;
+ 	
+-    retval = _php_rpm_fetch_store(rfr->stream, rfr->rpmhdr, &store);
++    retval = _php_rpm_fetch_store(rfr->stream, rfr->rpmhdr, &store TSRMLS_CC);
+     if (store == NULL) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Problem importing store");
+ 		php_stream_close(rfr->stream);
+@@ -327,7 +327,7 @@
+ 			RETURN_FALSE;
+ 		}
+ 		
+-		result = _php_rpm_validity(stream);
++		result = _php_rpm_validity(stream TSRMLS_CC);
+ 		
+ 		php_stream_close(stream);
+ 		

================================================================
Index: SOURCES/php4-pecl-rpmreader-tsrmls.patch
diff -u /dev/null SOURCES/php4-pecl-rpmreader-tsrmls.patch:1.1
--- /dev/null	Tue Nov  1 19:54:23 2005
+++ SOURCES/php4-pecl-rpmreader-tsrmls.patch	Tue Nov  1 19:54:18 2005
@@ -0,0 +1,195 @@
+diff -burN rpmreader-0.2.orig/rpmreader_io.c rpmreader-0.2/rpmreader_io.c
+--- rpmreader-0.2.orig/rpmreader_io.c	2005-11-01 18:48:35.722941296 +0100
++++ rpmreader-0.2/rpmreader_io.c	2005-11-01 18:56:19.515434120 +0100
+@@ -63,7 +63,7 @@
+ 
+ /* {{{ proto int _php_rpm_validity(php_stream *stream)
+    Will read the first 4 bytes of the file and check to see if they are the magic number that identifies the file as an RPM file. */
+-int _php_rpm_validity(php_stream *stream)
++int _php_rpm_validity(php_stream *stream TSRMLS_DC)
+ {
+ 	/*Will return 0 on error, non-zero on success. */
+ 
+@@ -108,7 +108,7 @@
+ 
+ /* {{{ proto int _php_rpm_seek_header(php_stream *stream)
+    Will read from the file pointer until it reaches the first header magic number.  */
+-int _php_rpm_seek_header(php_stream *stream)
++int _php_rpm_seek_header(php_stream *stream TSRMLS_DC)
+ {
+ 	/* This function will return 0 on error, non-zero on success.  The
+ 	 * return value, if not zero, will contain the number of bytes
+@@ -162,7 +162,7 @@
+ 
+ /* {{{ proto int _php_rpm_find_signature(php_stream *stream)
+    Will read from the file pointer until it reaches the first header magic number (the signature). */
+-int _php_rpm_find_signature(php_stream *stream)
++int _php_rpm_find_signature(php_stream *stream TSRMLS_DC)
+ {
+ 	/* This function makes use of the php_stream_seek function to
+ 	 * rewind the file back to the beginning of the file.  The
+@@ -182,7 +182,7 @@
+ 	else
+ 		return 0;
+ 
+-	bytecount = _php_rpm_seek_header(stream);
++	bytecount = _php_rpm_seek_header(stream TSRMLS_CC);
+ 
+ 	return bytecount;
+ }
+@@ -190,7 +190,7 @@
+ 
+ /* {{{ proto int _php_rpm_find_header(php_stream *stream)
+    Will read from the file pointer until it reaches the second header magic number (the header). */
+-int _php_rpm_find_header(php_stream *stream)
++int _php_rpm_find_header(php_stream *stream TSRMLS_DC)
+ {
+ 	/* This function makes use of the _php_rpm_find_signature function
+ 	 * to skip to the first header in the file before trying to find
+@@ -208,7 +208,7 @@
+ 
+ 	/* Use the _php_rpm_find_signature function to get to the first
+ 	 * header (signature) */
+-	bytecount = _php_rpm_find_signature(stream);
++	bytecount = _php_rpm_find_signature(stream TSRMLS_CC);
+ 	if (bytecount == 0)
+ 		return 0;
+ 
+@@ -226,7 +226,7 @@
+ 
+ 	/* Use the _php_rpm_seek_header function to get to the next
+ 	 * header */ 
+-	retval = _php_rpm_seek_header(stream);
++	retval = _php_rpm_seek_header(stream TSRMLS_CC);
+ 	if (retval == 0)
+ 		return 0;
+ 
+@@ -239,7 +239,7 @@
+ 
+ /* {{{ proto int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr)
+    Will read the header for a header structure within an RPM file. */
+-int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr)
++int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr TSRMLS_DC)
+ {
+ 	/* This function assumes that the file pointer is pointing to the
+ 	 * first byte of the header.  The function will read the 0x10(16)
+@@ -330,7 +330,7 @@
+ 
+ /* {{{ proto int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx)
+    Will read an index entry within a header in an RPM file. */
+-int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx)
++int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx TSRMLS_DC)
+ {
+ 	/* This function assumes that the file pointer is pointing to the
+ 	 * first byte of an index.  The function will read the 0x10(16)
+@@ -413,7 +413,7 @@
+ /* {{{ proto int _php_rpm_fetch_store(php_stream *stream, rpmHeader *rh, void **store)
+    Will read the entire data store within a header in an RPM file. */
+ int _php_rpm_fetch_store(php_stream *stream, rpmHeader *rh,
+-						 void **store)
++						 void **store TSRMLS_DC)
+ {
+ 	/* This function assumes that the file pointer is pointing
+ 	 * to the first byte of the store.  If the return value is
+@@ -455,7 +455,7 @@
+ /* {{{ proto int _php_rpm_import_indices(php_stream *stream, rpmHeader *hdr, zend_llist **idxlist)
+    Will import all the index entries in the Header into a linked list so that we don't have to keep referencing the file to get the information. */
+ int _php_rpm_import_indices(php_stream *stream, rpmHeader *hdr,
+-							zend_llist **idxlist)
++							zend_llist **idxlist TSRMLS_DC)
+ {
+ 	/* The function will return 0 on error, non-zero on success.  If
+ 	 * successful, the number of indices processed will be returned.
+@@ -476,7 +476,7 @@
+ 	}
+ 
+ 	for (i = 0; i < hdr->num_indices; i++) {
+-		nbytes = _php_rpm_fetch_index(stream, &idx);
++		nbytes = _php_rpm_fetch_index(stream, &idx TSRMLS_CC);
+ 		if (nbytes == 0x10) {
+ 			zend_llist_add_element(idxl, (void *) idx);
+ 		}
+diff -burN rpmreader-0.2.orig/rpmreader_io.h rpmreader-0.2/rpmreader_io.h
+--- rpmreader-0.2.orig/rpmreader_io.h	2005-11-01 18:48:35.722941296 +0100
++++ rpmreader-0.2/rpmreader_io.h	2005-11-01 18:56:11.941585520 +0100
+@@ -85,17 +85,17 @@
+ 	rpmIndexNode *tail;
+ } rpmIndexList;
+ 
+-void _free_rpmreader(zend_rsrc_list_entry *rsrc);
++void _free_rpmreader(zend_rsrc_list_entry *rsrc TSRMLS_DC);
+ void _php_free_rpm_index(void **idx);
+-int _php_rpm_validity(php_stream *stream);
+-int _php_rpm_seek_header(php_stream *stream);
+-int _php_rpm_find_signature(php_stream *stream);
+-int _php_rpm_find_header(php_stream *stream);
+-int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr);
+-int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx);
+-int _php_rpm_fetch_store(php_stream *stream, rpmHeader *hdr, void **store);
++int _php_rpm_validity(php_stream *stream TSRMLS_DC);
++int _php_rpm_seek_header(php_stream *stream TSRMLS_DC);
++int _php_rpm_find_signature(php_stream *stream TSRMLS_DC);
++int _php_rpm_find_header(php_stream *stream TSRMLS_DC);
++int _php_rpm_fetch_header(php_stream *stream, rpmHeader **hdr TSRMLS_DC);
++int _php_rpm_fetch_index(php_stream *stream, rpmIndex **idx TSRMLS_DC);
++int _php_rpm_fetch_store(php_stream *stream, rpmHeader *hdr, void **store TSRMLS_DC);
+ int _php_rpm_import_indices (php_stream *stream, rpmHeader *hdr,
+-			     zend_llist **l);
++			     zend_llist **l TSRMLS_DC);
+ 
+ #endif
+ 
+--- rpmreader-0.2.orig/rpmreader.c	2005-11-01 18:48:35.722941296 +0100
++++ rpmreader-0.2/rpmreader.c	2005-11-01 19:03:47.761290392 +0100
+@@ -254,21 +254,21 @@
+ 		RETURN_FALSE;
+     }
+ 	
+-    if (!_php_rpm_validity(rfr->stream)) {
++    if (!_php_rpm_validity(rfr->stream TSRMLS_CC)) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "File is not an RPM file");
+ 		php_stream_close(rfr->stream);
+ 		efree(rfr);
+ 		RETURN_FALSE;
+     }
+ 	
+-    if (!(retval = _php_rpm_find_header(rfr->stream))) {
++    if (!(retval = _php_rpm_find_header(rfr->stream TSRMLS_CC))) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "RPM Header not found in file");
+ 		php_stream_close(rfr->stream);
+ 		efree(rfr);
+ 		RETURN_FALSE;
+     }
+ 
+-    if (_php_rpm_fetch_header(rfr->stream, &rh) < 0x10)	{
++    if (_php_rpm_fetch_header(rfr->stream, &rh TSRMLS_CC) < 0x10)	{
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot read header section");
+ 		php_stream_close(rfr->stream);
+ 		efree(rfr);
+@@ -278,7 +278,7 @@
+     rfr->rpmhdr = rh;
+ 
+     idxl = NULL;
+-    retval = _php_rpm_import_indices(rfr->stream, rfr->rpmhdr, &idxl);
++    retval = _php_rpm_import_indices(rfr->stream, rfr->rpmhdr, &idxl TSRMLS_CC);
+ 
+     if (idxl == NULL) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Problem importing indices");
+@@ -289,7 +289,7 @@
+ 
+     rfr->idxlist = idxl;
+ 	
+-    retval = _php_rpm_fetch_store(rfr->stream, rfr->rpmhdr, &store);
++    retval = _php_rpm_fetch_store(rfr->stream, rfr->rpmhdr, &store TSRMLS_CC);
+     if (store == NULL) {
+ 		php_error_docref(NULL TSRMLS_CC, E_WARNING, "Problem importing store");
+ 		php_stream_close(rfr->stream);
+@@ -327,7 +327,7 @@
+ 			RETURN_FALSE;
+ 		}
+ 		
+-		result = _php_rpm_validity(stream);
++		result = _php_rpm_validity(stream TSRMLS_CC);
+ 		
+ 		php_stream_close(stream);
+ 		
================================================================



More information about the pld-cvs-commit mailing list