Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9728ce7

Browse files
committed
This is the first (of hopefully few) AIX port patches. This patch
was tested with Linux/GCC. I still have some issues with with the snprintf() function. David Hartwig
1 parent 9a88848 commit 9728ce7

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

src/backend/commands/copy.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*
88
* IDENTIFICATION
9-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.54 1998/08/24 01:13:39 momjian Exp $
9+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.55 1998/08/29 04:09:23 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -65,7 +65,7 @@ static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline
6565
static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim);
6666

6767
#endif
68-
static void CopyAttributeOut(FILE *fp, unsigned char *string, char *delim, int is_array);
68+
static void CopyAttributeOut(FILE *fp, char *string, char *delim, int is_array);
6969
static int CountTuples(Relation relation);
7070

7171
extern FILE *Pfout,
@@ -1146,9 +1146,9 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
11461146
}
11471147

11481148
static void
1149-
CopyAttributeOut(FILE *fp, unsigned char *server_string, char *delim, int is_array)
1149+
CopyAttributeOut(FILE *fp, char *server_string, char *delim, int is_array)
11501150
{
1151-
unsigned char *string;
1151+
char *string;
11521152
char c;
11531153

11541154
#ifdef MULTIBYTE

src/backend/commands/dbcommands.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.21 1998/08/24 01:13:40 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.22 1998/08/29 04:09:24 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -45,8 +45,8 @@ static void stop_vacuum(char *dbpath, char *dbname);
4545
void
4646
createdb(char *dbname, char *dbpath, int encoding)
4747
{
48-
Oid db_id,
49-
user_id;
48+
Oid db_id;
49+
int4 user_id;
5050
char buf[512];
5151
char *lp,
5252
loc[512];
@@ -100,8 +100,8 @@ createdb(char *dbname, char *dbpath, int encoding)
100100
void
101101
destroydb(char *dbname)
102102
{
103-
Oid user_id,
104-
db_id;
103+
int4 user_id;
104+
Oid db_id;
105105
char *path;
106106
char dbpath[MAXPGPATH + 1];
107107
char buf[512];

src/backend/optimizer/plan/planner.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.29 1998/07/20 21:18:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.30 1998/08/29 04:09:25 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -244,16 +244,15 @@ union_planner(Query *parse)
244244
* using the same function as for a subselect in 'where' */
245245
if (parse->hasSubLinks)
246246
{
247-
(List *) parse->havingQual =
248-
(List *) SS_process_sublinks((Node *) parse->havingQual);
247+
parse->havingQual = SS_process_sublinks((Node *) parse->havingQual);
249248
}
250249

251250
/* convert the havingQual to conjunctive normal form (cnf) */
252-
(List *) parse->havingQual=cnfify((Expr *)(Node *) parse->havingQual,true);
251+
parse->havingQual = (Node * ) cnfify((Expr *)(Node *) parse->havingQual,true);
253252

254253
/* Calculate the opfids from the opnos (=select the correct functions for
255254
* the used VAR datatypes) */
256-
(List *) parse->havingQual=fix_opids((List *) parse->havingQual);
255+
parse->havingQual = (Node * ) fix_opids((List *) parse->havingQual);
257256

258257
((Agg *) result_plan)->plan.qual=(List *) parse->havingQual;
259258

src/backend/utils/adt/varlena.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.39 1998/07/24 03:31:43 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.40 1998/08/29 04:09:27 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -475,10 +475,10 @@ textne(text *arg1, text *arg2)
475475
* Returns -1, 0 or 1
476476
*/
477477
int
478-
varstr_cmp(unsigned char *arg1, int len1, unsigned char *arg2, int len2)
478+
varstr_cmp(char *arg1, int len1, char *arg2, int len2)
479479
{
480480
int result;
481-
unsigned char *a1p, *a2p;
481+
char *a1p, *a2p;
482482

483483
#ifdef USE_LOCALE
484484
a1p = (unsigned char *) palloc(len1 + 1);
@@ -518,14 +518,14 @@ varstr_cmp(unsigned char *arg1, int len1, unsigned char *arg2, int len2)
518518
int
519519
text_cmp(text *arg1, text *arg2)
520520
{
521-
unsigned char *a1p, *a2p;
522-
int len1, len2;
521+
char *a1p, *a2p;
522+
int len1, len2;
523523

524524
if (arg1 == NULL || arg2 == NULL)
525525
return ((bool) FALSE);
526526

527-
a1p = (unsigned char *) VARDATA(arg1);
528-
a2p = (unsigned char *) VARDATA(arg2);
527+
a1p = VARDATA(arg1);
528+
a2p = VARDATA(arg2);
529529

530530
len1 = VARSIZE(arg1) - VARHDRSZ;
531531
len2 = VARSIZE(arg2) - VARHDRSZ;

src/include/utils/builtins.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: builtins.h,v 1.47 1998/08/19 02:04:03 momjian Exp $
9+
* $Id: builtins.h,v 1.48 1998/08/29 04:09:29 momjian Exp $
1010
*
1111
* NOTES
1212
* This should normally only be included by fmgr.h.
@@ -438,7 +438,7 @@ extern char *textout(text *vlena);
438438
extern text *textcat(text *arg1, text *arg2);
439439
extern bool texteq(text *arg1, text *arg2);
440440
extern bool textne(text *arg1, text *arg2);
441-
extern int varstr_cmp(unsigned char *arg1, int len1, unsigned char *arg2, int len2);
441+
extern int varstr_cmp(char *arg1, int len1, char *arg2, int len2);
442442
extern int text_cmp(text *arg1, text *arg2);
443443
extern bool text_lt(text *arg1, text *arg2);
444444
extern bool text_le(text *arg1, text *arg2);

0 commit comments

Comments
 (0)