Add a fix for 64 bit arch

Submitted by:	Rink Springer <rink@stack.nl>
This commit is contained in:
Mathieu Arnold 2005-01-08 10:42:27 +00:00
parent 11b173559c
commit df329e9367
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=125761
6 changed files with 186 additions and 0 deletions

View file

@ -7,6 +7,7 @@
PORTNAME= DBD-Pg
PORTVERSION= 1.32
PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD

View file

@ -0,0 +1,14 @@
diff -ru dbdimp.c~ dbdimp.c
--- dbdimp.c~ Sun Jan 2 20:01:43 2005
+++ dbdimp.c Sun Jan 2 20:06:16 2005
@@ -986,7 +986,9 @@
int num_fields;
char *value;
char *p;
- int i, pg_type, value_len, chopblanks, len;
+ int i, pg_type, chopblanks;
+ size_t value_len;
+ STRLEN len;
AV *av;
D_imp_dbh_from_sth;

View file

@ -0,0 +1,78 @@
diff -ru quote.c~ quote.c
--- quote.c~ Sun Jan 2 20:01:43 2005
+++ quote.c Sun Jan 2 20:04:39 2005
@@ -9,7 +9,7 @@
{
const char *source = from;
char *target = to;
- unsigned int remaining = length;
+ unsigned size_t remaining = length;
while (remaining > 0)
{
@@ -146,9 +146,9 @@
unsigned char *
PQunescapeBytea2(const unsigned char *strtext, size_t *retbuflen)
{
- size_t strtextlen, buflen;
+ size_t strtextlen, buflen, i, j;
unsigned char *buffer, *tmpbuf;
- int i, j, byte;
+ int byte;
if (strtext == NULL) {
return NULL;
@@ -393,7 +393,7 @@
{
char *result;
char *dest;
- int max_len = 0, i;
+ size_t max_len = 0, i;
/* We are going to retun a quote_bytea() for backwards compat but
we warn first */
@@ -483,7 +483,7 @@
void
dequote_char(string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
/* TODO: chop_blanks if requested */
*retlen = strlen(string);
@@ -493,7 +493,7 @@
void
dequote_varchar (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
*retlen = strlen(string);
}
@@ -503,7 +503,7 @@
void
dequote_bytea(string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
char *s, *p;
int c1,c2,c3;
@@ -542,7 +542,7 @@
void
dequote_sql_binary (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
/* We are going to retun a dequote_bytea(), JIC */
warn("Use of SQL_BINARY invalid in dequote()");
@@ -556,7 +556,7 @@
void
dequote_bool (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
switch(*string){
case 'f': *string = '0'; break;

View file

@ -7,6 +7,7 @@
PORTNAME= DBD-Pg
PORTVERSION= 1.32
PORTREVISION= 1
CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= DBD

View file

@ -0,0 +1,14 @@
diff -ru dbdimp.c~ dbdimp.c
--- dbdimp.c~ Sun Jan 2 20:01:43 2005
+++ dbdimp.c Sun Jan 2 20:06:16 2005
@@ -986,7 +986,9 @@
int num_fields;
char *value;
char *p;
- int i, pg_type, value_len, chopblanks, len;
+ int i, pg_type, chopblanks;
+ size_t value_len;
+ STRLEN len;
AV *av;
D_imp_dbh_from_sth;

View file

@ -0,0 +1,78 @@
diff -ru quote.c~ quote.c
--- quote.c~ Sun Jan 2 20:01:43 2005
+++ quote.c Sun Jan 2 20:04:39 2005
@@ -9,7 +9,7 @@
{
const char *source = from;
char *target = to;
- unsigned int remaining = length;
+ unsigned size_t remaining = length;
while (remaining > 0)
{
@@ -146,9 +146,9 @@
unsigned char *
PQunescapeBytea2(const unsigned char *strtext, size_t *retbuflen)
{
- size_t strtextlen, buflen;
+ size_t strtextlen, buflen, i, j;
unsigned char *buffer, *tmpbuf;
- int i, j, byte;
+ int byte;
if (strtext == NULL) {
return NULL;
@@ -393,7 +393,7 @@
{
char *result;
char *dest;
- int max_len = 0, i;
+ size_t max_len = 0, i;
/* We are going to retun a quote_bytea() for backwards compat but
we warn first */
@@ -483,7 +483,7 @@
void
dequote_char(string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
/* TODO: chop_blanks if requested */
*retlen = strlen(string);
@@ -493,7 +493,7 @@
void
dequote_varchar (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
*retlen = strlen(string);
}
@@ -503,7 +503,7 @@
void
dequote_bytea(string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
char *s, *p;
int c1,c2,c3;
@@ -542,7 +542,7 @@
void
dequote_sql_binary (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
/* We are going to retun a dequote_bytea(), JIC */
warn("Use of SQL_BINARY invalid in dequote()");
@@ -556,7 +556,7 @@
void
dequote_bool (string, retlen)
char *string;
- int *retlen;
+ size_t *retlen;
{
switch(*string){
case 'f': *string = '0'; break;