Compilation failed when --with-recode specified (patch) - Mailing list pgsql-hackers

From Oliver Elphick
Subject Compilation failed when --with-recode specified (patch)
Date
Msg-id 1020414984.11663.5.camel@linda
Whole thread Raw
Responses Re: Compilation failed when --with-recode specified (patch)
Re: Compilation failed when --with-recode specified (patch)
List 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.Elphick@lfix.co.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

pgsql-hackers by date:

Previous
From: Bradley Kieser
Date:
Subject: Re: a vulnerability in PostgreSQL
Next
From: Magnus Enbom
Date:
Subject: Re: Inefficient handling of LO-restore + Patch