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

Поиск
Список
Период
Сортировка
Искать

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

От:
Oliver Elphick <olly@lfix.co.uk>
Дата:
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 

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

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Oliver Elphick  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

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

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

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.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 
-- End of PGP section.

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

FAQ