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

Lists: pgsql-hackers
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
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


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Compilation failed when --with-recode specified (patch)
Date: 2002-05-03 20:44:31
Message-ID: 22122.1020458671@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Oliver Elphick <olly(at)lfix(dot)co(dot)uk> writes:
> current cvs would not compile. I found it necessary to make the
> following corrections:

A little software rot setting in there :-(. My compiler complained
about even more stuff than yours did. Patch applied.

regards, tom lane


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Compilation failed when --with-recode specified (patch)
Date: 2002-06-02 22:18:47
Message-ID: 200206022218.g52MIlW10966@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


Glad you are testing recode because I changed its token handling to use
the new unified token code used by pg_hba.conf and pg_ident.conf.

---------------------------------------------------------------------------

Oliver Elphick wrote:
-- Start of PGP signed section.
> 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
-- End of PGP section.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026