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

Commit5d1c8a3

Browse files
committed
Fix compile errors.
1 parentb73d8d2 commit5d1c8a3

File tree

1 file changed

+11
-14
lines changed

1 file changed

+11
-14
lines changed

‎contrib/tsearch/morph.c

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@
66
*/
77
#include"postgres.h"
88

9-
#include"utils/elog.h"
10-
#include"utils/palloc.h"
9+
#include<locale.h>
10+
1111
#include"utils/builtins.h"
12-
#include"catalog/pg_control.h"
13-
#include"utils/pg_locale.h"
1412

1513
#include"morph.h"
1614
#include"deflex.h"
@@ -25,7 +23,7 @@
2523
*/
2624
typedefstruct
2725
{
28-
charlocalename[LOCALE_NAME_BUFLEN];
26+
charlocalename[NAMEDATALEN];
2927
/* init dictionary */
3028
void*(*init) (void);
3129
/* close dictionary */
@@ -52,9 +50,8 @@ DICTdicts[] = {
5250

5351
#undef DICT_TABLE
5452

55-
/* array for storing dictinary's objects (if needed) */
56-
void*dictobjs[
57-
lengthof(dicts)];
53+
/* array for storing dictionary's objects (if needed) */
54+
void*dictobjs[lengthof(dicts)];
5855

5956
#defineSTOPLEXEM-2
6057
#defineBYLOCALE-1
@@ -104,24 +101,24 @@ initmorph(void)
104101
k;
105102
MAPDICT*md;
106103
boolneedinit[lengthof(dicts)];
107-
PG_LocaleCategorieslc;
108-
104+
constchar*curlocale;
109105
intbylocaledict=NODICT;
110106

111107
if (inited)
112108
return;
113109
for (i=1;i<lengthof(dicts);i++)
114110
needinit[i]= false;
115111

116-
PGLC_current(&lc);
117-
if (lc.lc_ctype)
112+
curlocale=setlocale(LC_CTYPE,NULL);
113+
if (curlocale)
114+
{
118115
for (i=1;i<lengthof(dicts);i++)
119-
if (strcmp(dicts[i].localename,lc.lc_ctype)==0)
116+
if (strcmp(dicts[i].localename,curlocale)==0)
120117
{
121118
bylocaledict=i;
122119
break;
123120
}
124-
PGLC_free_categories(&lc);
121+
}
125122

126123
for (i=1;i<lengthof(mapdict);i++)
127124
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp