|
8 | 8 | *
|
9 | 9 | *
|
10 | 10 | * 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 $ |
12 | 12 | *
|
13 | 13 | *-------------------------------------------------------------------------
|
14 | 14 | */
|
|
25 | 25 | #include<pwd.h>
|
26 | 26 | #include<stdlib.h>
|
27 | 27 | #include<errno.h>
|
| 28 | +#include<netinet/in.h> |
| 29 | +#include<arpa/inet.h> |
28 | 30 |
|
29 | 31 | #include"catalog/catname.h"
|
30 | 32 | #include"catalog/pg_shadow.h"
|
|
36 | 38 | #include"utils/syscache.h"
|
37 | 39 |
|
38 | 40 |
|
39 |
| -#ifdefCYR_RECODE |
40 |
| -unsignedcharRecodeForwTable[128]; |
41 |
| -unsignedcharRecodeBackTable[128]; |
42 |
| -#endif |
43 |
| - |
44 | 41 | ProcessingModeMode=InitProcessing;
|
45 | 42 |
|
46 | 43 | /* Note: we rely on these to initialize as zeroes */
|
47 | 44 | staticchardirectoryLockFile[MAXPGPATH];
|
48 | 45 | staticcharsocketLockFile[MAXPGPATH];
|
49 | 46 |
|
| 47 | +#ifdefCYR_RECODE |
| 48 | +staticunsignedcharRecodeForwTable[128]; |
| 49 | +staticunsignedcharRecodeBackTable[128]; |
| 50 | + |
| 51 | +staticvoidGetCharSetByHost(char*TableName,inthost,constchar*DataDir); |
| 52 | +#endif |
| 53 | + |
50 | 54 |
|
51 | 55 | /* ----------------------------------------------------------------
|
52 | 56 | *ignoring system indexes support stuff
|
@@ -236,14 +240,14 @@ pg_convert2(PG_FUNCTION_ARGS)
|
236 | 240 |
|
237 | 241 | #ifdefCYR_RECODE
|
238 | 242 |
|
| 243 | +void |
239 | 244 | SetCharSet(void)
|
240 | 245 | {
|
241 | 246 | FILE*file;
|
242 | 247 | char*filename;
|
243 | 248 | char*map_file;
|
244 | 249 | charbuf[MAX_TOKEN];
|
245 |
| -inti, |
246 |
| -c; |
| 250 | +inti; |
247 | 251 | unsignedcharFromChar,
|
248 | 252 | ToChar;
|
249 | 253 | charChTable[MAX_TOKEN];
|
@@ -289,8 +293,8 @@ SetCharSet(void)
|
289 | 293 | while (!feof(file)&&buf[0])
|
290 | 294 | {
|
291 | 295 | 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); |
294 | 298 | }
|
295 | 299 | }
|
296 | 300 | }
|
@@ -415,7 +419,6 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
|
415 | 419 | *map_file;
|
416 | 420 | intkey,
|
417 | 421 | ChIndex=0,
|
418 |
| -c, |
419 | 422 | i,
|
420 | 423 | bufsize;
|
421 | 424 | structCharsetItem*ChArray[MAX_CHARSETS];
|
@@ -445,8 +448,8 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
|
445 | 448 | elseif (strcasecmp(buf,"RecodeTable")==0)
|
446 | 449 | key=KEY_TABLE;
|
447 | 450 | 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); |
450 | 453 |
|
451 | 454 | switch (key)
|
452 | 455 | {
|
@@ -501,8 +504,8 @@ GetCharSetByHost(char *TableName, int host, const char *DataDir)
|
501 | 504 | while (!feof(file)&&buf[0])
|
502 | 505 | {
|
503 | 506 | 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); |
506 | 509 | }
|
507 | 510 | }
|
508 | 511 | }
|
|