diff options
author | taca <taca> | 2011-09-12 16:24:32 +0000 |
---|---|---|
committer | taca <taca> | 2011-09-12 16:24:32 +0000 |
commit | bce7094e229d3514d3024bcef01c2385081b69fb (patch) | |
tree | 6f2e7a6d57fe5522a4feda2c62708a198f9b2d30 /lang/php53 | |
parent | e4addfa09a667c49f2fa7db84dbf9968e4e77860 (diff) | |
download | pkgsrc-bce7094e229d3514d3024bcef01c2385081b69fb.tar.gz |
Add some patches to fix build problem of databases/php-mssql with recent
updated databases/freetds.
Diffstat (limited to 'lang/php53')
-rw-r--r-- | lang/php53/distinfo | 4 | ||||
-rw-r--r-- | lang/php53/patches/patch-php__mssql.c | 27 | ||||
-rw-r--r-- | lang/php53/patches/patch-php__mssql.h | 14 |
3 files changed, 44 insertions, 1 deletions
diff --git a/lang/php53/distinfo b/lang/php53/distinfo index a5495e88612..469db8a8a0e 100644 --- a/lang/php53/distinfo +++ b/lang/php53/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.21 2011/08/23 22:22:27 taca Exp $ +$NetBSD: distinfo,v 1.22 2011/09/12 16:24:32 taca Exp $ SHA1 (php-5.3.8/php-5.3.8.tar.bz2) = 8f29029e092f262876bfdd2ce56f6867e2b74b85 RMD160 (php-5.3.8/php-5.3.8.tar.bz2) = f18a18e2dfd7ea7885760eec2a05b3c4a15ad9db @@ -17,3 +17,5 @@ SHA1 (patch-ah) = b20c29c64b3099f77855a5ec28960dc1c4f65c83 SHA1 (patch-ai) = d4766893a2c47a4e4a744248dda265b0a9a66a1f SHA1 (patch-aj) = d611d13fcc28c5d2b9e9586832ce4b8ae5707b48 SHA1 (patch-al) = fbbee5502e0cd1c47c6e7c15e0d54746414ec32e +SHA1 (patch-php__mssql.c) = b46c688ff2d8da33ca2f9beb0eb9182b6edf7e23 +SHA1 (patch-php__mssql.h) = fa9e349127121cf478691c108ac611563e445c40 diff --git a/lang/php53/patches/patch-php__mssql.c b/lang/php53/patches/patch-php__mssql.c new file mode 100644 index 00000000000..044bb8f8f68 --- /dev/null +++ b/lang/php53/patches/patch-php__mssql.c @@ -0,0 +1,27 @@ +$NetBSD: patch-php__mssql.c,v 1.1 2011/09/12 16:24:32 taca Exp $ + +Fix with newer freetds: + +* cast pointer => long => int, hoping values are ranges in int. +* Don't pass unsigned char ** to spprintf(). + +--- ext/mssql/php_mssql.c.orig 2011-07-28 11:01:04.000000000 +0000 ++++ ext/mssql/php_mssql.c +@@ -764,7 +764,7 @@ static void php_mssql_do_connect(INTERNA + dbfreelogin(mssql.login); + RETURN_FALSE; + } +- link = (int) index_ptr->ptr; ++ link = (int)(long) index_ptr->ptr; + ptr = zend_list_find(link,&type); /* check if the link is still there */ + if (ptr && (type==le_link || type==le_plink)) { + zend_list_addref(link); +@@ -1117,7 +1117,7 @@ static void php_mssql_get_column_content + } + + res_length = 19; +- spprintf(&res_buf, 0, "%d-%02d-%02d %02d:%02d:%02d" , dateinfo.year, dateinfo.month, dateinfo.day, dateinfo.hour, dateinfo.minute, dateinfo.second); ++ spprintf((char **)&res_buf, 0, "%d-%02d-%02d %02d:%02d:%02d" , dateinfo.year, dateinfo.month, dateinfo.day, dateinfo.hour, dateinfo.minute, dateinfo.second); + } + + ZVAL_STRINGL(result, res_buf, res_length, 0); diff --git a/lang/php53/patches/patch-php__mssql.h b/lang/php53/patches/patch-php__mssql.h new file mode 100644 index 00000000000..53acf077576 --- /dev/null +++ b/lang/php53/patches/patch-php__mssql.h @@ -0,0 +1,14 @@ +$NetBSD: patch-php__mssql.h,v 1.1 2011/09/12 16:24:32 taca Exp $ + +* Use definition in freetds. + +--- ext/mssql/php_mssql.h.orig 2011-01-01 02:19:59.000000000 +0000 ++++ ext/mssql/php_mssql.h +@@ -65,7 +65,6 @@ typedef short TDS_SHORT; + #define dbfreelogin dbloginfree + #endif + #define dbrpcexec dbrpcsend +-typedef unsigned char *LPBYTE; + typedef float DBFLT4; + #else + #define MSSQL_VERSION "7.0" |