Commit 91fc10fd authored by Tom Lane's avatar Tom Lane

Fix compile errors in CYR_RECODE code, per report from Oliver Elphick.

parent 90739d46
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.87 2002/04/27 21:24:34 tgl Exp $ * $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.88 2002/05/03 20:43:30 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <pwd.h> #include <pwd.h>
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "catalog/catname.h" #include "catalog/catname.h"
#include "catalog/pg_shadow.h" #include "catalog/pg_shadow.h"
...@@ -36,17 +38,19 @@ ...@@ -36,17 +38,19 @@
#include "utils/syscache.h" #include "utils/syscache.h"
#ifdef CYR_RECODE
unsigned char RecodeForwTable[128];
unsigned char RecodeBackTable[128];
#endif
ProcessingMode Mode = InitProcessing; ProcessingMode Mode = InitProcessing;
/* Note: we rely on these to initialize as zeroes */ /* Note: we rely on these to initialize as zeroes */
static char directoryLockFile[MAXPGPATH]; static char directoryLockFile[MAXPGPATH];
static char socketLockFile[MAXPGPATH]; static char socketLockFile[MAXPGPATH];
#ifdef CYR_RECODE
static unsigned char RecodeForwTable[128];
static unsigned char RecodeBackTable[128];
static void GetCharSetByHost(char *TableName, int host, const char *DataDir);
#endif
/* ---------------------------------------------------------------- /* ----------------------------------------------------------------
* ignoring system indexes support stuff * ignoring system indexes support stuff
...@@ -236,14 +240,14 @@ pg_convert2(PG_FUNCTION_ARGS) ...@@ -236,14 +240,14 @@ pg_convert2(PG_FUNCTION_ARGS)
#ifdef CYR_RECODE #ifdef CYR_RECODE
void
SetCharSet(void) SetCharSet(void)
{ {
FILE *file; FILE *file;
char *filename; char *filename;
char *map_file; char *map_file;
char buf[MAX_TOKEN]; char buf[MAX_TOKEN];
int i, int i;
c;
unsigned char FromChar, unsigned char FromChar,
ToChar; ToChar;
char ChTable[MAX_TOKEN]; char ChTable[MAX_TOKEN];
...@@ -289,7 +293,7 @@ SetCharSet(void) ...@@ -289,7 +293,7 @@ SetCharSet(void)
while (!feof(file) && buf[0]) while (!feof(file) && buf[0])
{ {
next_token(file, buf, sizeof(buf)); next_token(file, buf, sizeof(buf));
elog(LOG, "SetCharSet: unknown tag %s in file %s" elog(LOG, "SetCharSet: unknown tag %s in file %s",
buf, filename); buf, filename);
} }
} }
...@@ -415,7 +419,6 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir) ...@@ -415,7 +419,6 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
*map_file; *map_file;
int key, int key,
ChIndex = 0, ChIndex = 0,
c,
i, i,
bufsize; bufsize;
struct CharsetItem *ChArray[MAX_CHARSETS]; struct CharsetItem *ChArray[MAX_CHARSETS];
...@@ -445,7 +448,7 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir) ...@@ -445,7 +448,7 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
else if (strcasecmp(buf, "RecodeTable") == 0) else if (strcasecmp(buf, "RecodeTable") == 0)
key = KEY_TABLE; key = KEY_TABLE;
else else
elog(LOG, "GetCharSetByHost: unknown tag %s in file %s" elog(LOG, "GetCharSetByHost: unknown tag %s in file %s",
buf, CHARSET_FILE); buf, CHARSET_FILE);
switch (key) switch (key)
...@@ -501,7 +504,7 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir) ...@@ -501,7 +504,7 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
while (!feof(file) && buf[0]) while (!feof(file) && buf[0])
{ {
next_token(file, buf, sizeof(buf)); next_token(file, buf, sizeof(buf));
elog(LOG, "GetCharSetByHost: unknown tag %s in file %s" elog(LOG, "GetCharSetByHost: unknown tag %s in file %s",
buf, CHARSET_FILE); buf, CHARSET_FILE);
} }
} }
......
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