Commit 2c018f9b authored by Tom Lane's avatar Tom Lane

Fix for Alpha portability.

parent 55103553
...@@ -62,7 +62,7 @@ parse_cfgdict(text *in, Map **m) { ...@@ -62,7 +62,7 @@ parse_cfgdict(text *in, Map **m) {
(errcode(ERRCODE_SYNTAX_ERROR), (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"), errmsg("syntax error"),
errdetail("Syntax error in position %d near \"%c\"", errdetail("Syntax error in position %d near \"%c\"",
ptr-VARDATA(in), *ptr))); (int) (ptr-VARDATA(in)), *ptr)));
} else if (state==CS_INKEY) { } else if (state==CS_INKEY) {
if ( isspace(*ptr) ) { if ( isspace(*ptr) ) {
mptr->key=nstrdup(begin, ptr-begin); mptr->key=nstrdup(begin, ptr-begin);
...@@ -75,7 +75,7 @@ parse_cfgdict(text *in, Map **m) { ...@@ -75,7 +75,7 @@ parse_cfgdict(text *in, Map **m) {
(errcode(ERRCODE_SYNTAX_ERROR), (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"), errmsg("syntax error"),
errdetail("Syntax error in position %d near \"%c\"", errdetail("Syntax error in position %d near \"%c\"",
ptr-VARDATA(in), *ptr))); (int) (ptr-VARDATA(in)), *ptr)));
} else if ( state==CS_WAITEQ ) { } else if ( state==CS_WAITEQ ) {
if ( *ptr=='=' ) if ( *ptr=='=' )
state=CS_WAITVALUE; state=CS_WAITVALUE;
...@@ -84,7 +84,7 @@ parse_cfgdict(text *in, Map **m) { ...@@ -84,7 +84,7 @@ parse_cfgdict(text *in, Map **m) {
(errcode(ERRCODE_SYNTAX_ERROR), (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"), errmsg("syntax error"),
errdetail("Syntax error in position %d near \"%c\"", errdetail("Syntax error in position %d near \"%c\"",
ptr-VARDATA(in), *ptr))); (int) (ptr-VARDATA(in)), *ptr)));
} else if ( state==CS_WAITVALUE ) { } else if ( state==CS_WAITVALUE ) {
if ( *ptr=='"' ) { if ( *ptr=='"' ) {
begin=ptr+1; begin=ptr+1;
...@@ -115,7 +115,7 @@ parse_cfgdict(text *in, Map **m) { ...@@ -115,7 +115,7 @@ parse_cfgdict(text *in, Map **m) {
(errcode(ERRCODE_SYNTAX_ERROR), (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("syntax error"), errmsg("syntax error"),
errdetail("Syntax error in position %d near \"%c\"", errdetail("Syntax error in position %d near \"%c\"",
ptr-VARDATA(in), *ptr))); (int) (ptr-VARDATA(in)), *ptr)));
} else if ( state == CS_INESC ) { } else if ( state == CS_INESC ) {
state=CS_INVALUE; state=CS_INVALUE;
} else if ( state == CS_IN2ESC ) { } else if ( state == CS_IN2ESC ) {
...@@ -125,7 +125,7 @@ parse_cfgdict(text *in, Map **m) { ...@@ -125,7 +125,7 @@ parse_cfgdict(text *in, Map **m) {
(errcode(ERRCODE_SYNTAX_ERROR), (errcode(ERRCODE_SYNTAX_ERROR),
errmsg("bad parser state"), errmsg("bad parser state"),
errdetail("%d at position %d near \"%c\"", errdetail("%d at position %d near \"%c\"",
state, ptr-VARDATA(in), *ptr))); state, (int) (ptr-VARDATA(in)), *ptr)));
ptr++; ptr++;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment