Compilation failed when --with-recode specified (patch)

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Compilation failed when --with-recode specified (patch)
Date: 2002-05-03 08:36:24
Message-ID: 1020414984.11663.5.camel@linda
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Using this configuration:
./configure --enable-locale --enable-recode --enable-multibyte
--enable-nls --with-pgport=9631 --with-CXX --with-perl --with-python
--with-tcl --enable-odbc--with-unixodbc --with-openssl --with-pam
--enable-syslog --enable-debug --enable-cassert --enable-depend
--with-tkconfig=/usr/lib/tk8.3 --with-tclconfig=/usr/lib/tcl8.3
--with-includes=/usr/include/tcl8.3

current cvs would not compile. I found it necessary to make the
following corrections:

Index: src/backend/utils/init/miscinit.c
===================================================================
RCS file: /projects/cvsroot/pgsql/src/backend/utils/init/miscinit.c,v
retrieving revision 1.87
diff -c -r1.87 miscinit.c
*** src/backend/utils/init/miscinit.c 2002/04/27 21:24:34 1.87
--- src/backend/utils/init/miscinit.c 2002/05/03 05:15:14
***************
*** 39,44 ****
--- 39,45 ----
#ifdef CYR_RECODE
unsigned char RecodeForwTable[128];
unsigned char RecodeBackTable[128];
+ static void GetCharSetByHost(char *TableName, int host, const char *DataDir);
#endif

ProcessingMode Mode = InitProcessing;
***************
*** 236,249 ****

#ifdef CYR_RECODE

! SetCharSet(void)
{
FILE *file;
char *filename;
char *map_file;
char buf[MAX_TOKEN];
! int i,
! c;
unsigned char FromChar,
ToChar;
char ChTable[MAX_TOKEN];
--- 237,249 ----

#ifdef CYR_RECODE

! void SetCharSet(void)
{
FILE *file;
char *filename;
char *map_file;
char buf[MAX_TOKEN];
! int i;
unsigned char FromChar,
ToChar;
char ChTable[MAX_TOKEN];
***************
*** 289,295 ****
while (!feof(file) && buf[0])
{
next_token(file, buf, sizeof(buf));
! elog(LOG, "SetCharSet: unknown tag %s in file %s"
buf, filename);
}
}
--- 289,295 ----
while (!feof(file) && buf[0])
{
next_token(file, buf, sizeof(buf));
! elog(LOG, "SetCharSet: unknown tag %s in file %s",
buf, filename);
}
}
***************
*** 445,451 ****
else if (strcasecmp(buf, "RecodeTable") == 0)
key = KEY_TABLE;
else
! elog(LOG, "GetCharSetByHost: unknown tag %s in file %s"
buf, CHARSET_FILE);

switch (key)
--- 445,451 ----
else if (strcasecmp(buf, "RecodeTable") == 0)
key = KEY_TABLE;
else
! elog(LOG, "GetCharSetByHost: unknown tag %s in file %s",
buf, CHARSET_FILE);

switch (key)
***************
*** 501,507 ****
while (!feof(file) && buf[0])
{
next_token(file, buf, sizeof(buf));
! elog(LOG, "GetCharSetByHost: unknown tag %s in file %s"
buf, CHARSET_FILE);
}
}
--- 501,507 ----
while (!feof(file) && buf[0])
{
next_token(file, buf, sizeof(buf));
! elog(LOG, "GetCharSetByHost: unknown tag %s in file %s",
buf, CHARSET_FILE);
}
}
--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839 932A 614D 4C34 3E1D 0C1C

"Rejoice with them that do rejoice, and weep with them
that weep." Romans 12:15

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Enbom 2002-05-03 12:20:47 Re: Inefficient handling of LO-restore + Patch
Previous Message Bradley Kieser 2002-05-03 08:11:16 Re: a vulnerability in PostgreSQL