[Patch] DBD-mysql use of "long long" breaks win32 builds

[Patch] DBD-mysql use of "long long" breaks win32 builds

am 13.04.2005 00:01:18 von gozer

--------------enigCB5E099CC8E17573F43626A5
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

my_ulonglong does correctly map to 'long long' or __int64 on win32 platforms.

The following patch fixes compilation failures on win32:

Index: DBD-mysql/dbdimp.c
--- DBD-mysql/dbdimp.c.~1~ Tue Apr 12 14:57:28 2005
+++ DBD-mysql/dbdimp.c Tue Apr 12 14:57:28 2005
@@ -1716,7 +1716,7 @@
else
rows= mysql_num_rows(*cdaPtr);

- if ((long long)rows == -1)
+ if ((my_ulonglong)rows == -1)
{
if (dbis->debug >= 2)
PerlIO_printf(DBILOGFP,
@@ -1796,7 +1796,7 @@
imp_sth->row_num);
}

- if ((long long) imp_sth->row_num == -1)
+ if ((my_ulonglong) imp_sth->row_num == -1)
return -1;
else
return (int) imp_sth->row_num;
Index: DBD-mysql/mysql.xs
--- DBD-mysql/mysql.xs.~1~ Tue Apr 12 14:57:28 2005
+++ DBD-mysql/mysql.xs Tue Apr 12 14:57:28 2005
@@ -300,7 +300,7 @@
/* fix to make rows able to handle errors and handle max value from
affected rows
*/
- if ((long long)imp_sth->row_num == -1)
+ if ((my_ulonglong)imp_sth->row_num == -1)
sprintf(buf, "%d", -1);
else
sprintf(buf, "%llu", imp_sth->row_num);

------------------------------------------------------------ --------------------
Philippe M. Chiasson m/gozer\@(apache|cpan|ectoplasm)\.org/ GPG KeyID : 88C3A5A5
http://gozer.ectoplasm.org/ F9BF E0C2 480E 7680 1AE5 3631 CB32 A107 88C3A5A5

--------------enigCB5E099CC8E17573F43626A5
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFCXEU0yzKhB4jDpaURA6P1AJ9Ec9EGilfUraNQCGFcwIOc+uvaXACd GMQm
USd7eK9aVCeOMcRr9zzksDE=
=ge/O
-----END PGP SIGNATURE-----

--------------enigCB5E099CC8E17573F43626A5--