Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit91fc10f

Browse files
committed
Fix compile errors in CYR_RECODE code, per report from Oliver Elphick.
1 parent90739d4 commit91fc10f

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

‎src/backend/utils/init/miscinit.c

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.87 2002/04/27 21:24:34 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.88 2002/05/03 20:43:30 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -25,6 +25,8 @@
2525
#include<pwd.h>
2626
#include<stdlib.h>
2727
#include<errno.h>
28+
#include<netinet/in.h>
29+
#include<arpa/inet.h>
2830

2931
#include"catalog/catname.h"
3032
#include"catalog/pg_shadow.h"
@@ -36,17 +38,19 @@
3638
#include"utils/syscache.h"
3739

3840

39-
#ifdefCYR_RECODE
40-
unsignedcharRecodeForwTable[128];
41-
unsignedcharRecodeBackTable[128];
42-
#endif
43-
4441
ProcessingModeMode=InitProcessing;
4542

4643
/* Note: we rely on these to initialize as zeroes */
4744
staticchardirectoryLockFile[MAXPGPATH];
4845
staticcharsocketLockFile[MAXPGPATH];
4946

47+
#ifdefCYR_RECODE
48+
staticunsignedcharRecodeForwTable[128];
49+
staticunsignedcharRecodeBackTable[128];
50+
51+
staticvoidGetCharSetByHost(char*TableName,inthost,constchar*DataDir);
52+
#endif
53+
5054

5155
/* ----------------------------------------------------------------
5256
*ignoring system indexes support stuff
@@ -236,14 +240,14 @@ pg_convert2(PG_FUNCTION_ARGS)
236240

237241
#ifdefCYR_RECODE
238242

243+
void
239244
SetCharSet(void)
240245
{
241246
FILE*file;
242247
char*filename;
243248
char*map_file;
244249
charbuf[MAX_TOKEN];
245-
inti,
246-
c;
250+
inti;
247251
unsignedcharFromChar,
248252
ToChar;
249253
charChTable[MAX_TOKEN];
@@ -289,8 +293,8 @@ SetCharSet(void)
289293
while (!feof(file)&&buf[0])
290294
{
291295
next_token(file,buf,sizeof(buf));
292-
elog(LOG,"SetCharSet: unknown tag %s in file %s"
293-
buf,filename);
296+
elog(LOG,"SetCharSet: unknown tag %s in file %s",
297+
buf,filename);
294298
}
295299
}
296300
}
@@ -415,7 +419,6 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
415419
*map_file;
416420
intkey,
417421
ChIndex=0,
418-
c,
419422
i,
420423
bufsize;
421424
structCharsetItem*ChArray[MAX_CHARSETS];
@@ -445,8 +448,8 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
445448
elseif (strcasecmp(buf,"RecodeTable")==0)
446449
key=KEY_TABLE;
447450
else
448-
elog(LOG,"GetCharSetByHost: unknown tag %s in file %s"
449-
buf,CHARSET_FILE);
451+
elog(LOG,"GetCharSetByHost: unknown tag %s in file %s",
452+
buf,CHARSET_FILE);
450453

451454
switch (key)
452455
{
@@ -501,8 +504,8 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
501504
while (!feof(file)&&buf[0])
502505
{
503506
next_token(file,buf,sizeof(buf));
504-
elog(LOG,"GetCharSetByHost: unknown tag %s in file %s"
505-
buf,CHARSET_FILE);
507+
elog(LOG,"GetCharSetByHost: unknown tag %s in file %s",
508+
buf,CHARSET_FILE);
506509
}
507510
}
508511
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp