mirror of
https://github.com/postgres/postgres.git
synced 2025-06-16 06:01:02 +03:00
Fix compile errors in CYR_RECODE code, per report from Oliver Elphick.
This commit is contained in:
@ -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 @@
|
|||||||
#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 @@
|
|||||||
#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)
|
|||||||
|
|
||||||
#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,8 +293,8 @@ 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)
|
|||||||
*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,8 +448,8 @@ 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,8 +504,8 @@ 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user