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

Commit373679c

Browse files
committed
meson: Define HAVE_LOCALE_T for msvc
Meson doesn't see the redefinition of locale_t done insrc/include/port/win32_port.h, so it is not defining HAVE_LOCALE_T,HAVE_WCSTOMBS_L nor HAVE_MBSTOWCS_L as the currentsrc/tools/msvc/build.pl script does. Add manual overrides to fix.Author: Author: Juan Jose Santamaria Flecha <juanjo.santamaria@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/CAC%2BAXB1wJEqfKCuVcNpoH%3Dgxd61N%3D7c2fR3Ew6YRPpSfEUA%3DyQ%40mail.gmail.com
1 parentb9424d0 commit373679c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

‎meson.build

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2193,12 +2193,15 @@ endif
21932193

21942194
# Check for the locale_t type and find the right header file. macOS
21952195
# needs xlocale.h; standard is locale.h, but glibc also has an
2196-
# xlocale.h file that we should not use.
2196+
# xlocale.h file that we should not use. MSVC has a replacement
2197+
# defined in src/include/port/win32_port.h.
21972198
if cc.has_type('locale_t',prefix:'#include <locale.h>')
21982199
cdata.set('HAVE_LOCALE_T',1)
21992200
elif cc.has_type('locale_t',prefix:'#include <xlocale.h>')
22002201
cdata.set('HAVE_LOCALE_T',1)
22012202
cdata.set('LOCALE_T_IN_XLOCALE',1)
2203+
elif cc.get_id()=='msvc'
2204+
cdata.set('HAVE_LOCALE_T',1)
22022205
endif
22032206

22042207
# Check if the C compiler understands typeof or a variant. Define
@@ -2411,6 +2414,13 @@ if cc.has_function('syslog', args: test_c_args) and \
24112414
endif
24122415

24132416

2417+
# MSVC has replacements defined in src/include/port/win32_port.h.
2418+
if cc.get_id()=='msvc'
2419+
cdata.set('HAVE_WCSTOMBS_L',1)
2420+
cdata.set('HAVE_MBSTOWCS_L',1)
2421+
endif
2422+
2423+
24142424
# if prerequisites for unnamed posix semas aren't fulfilled, fall back to sysv
24152425
# semaphores
24162426
if sema_kind=='unnamed_posix'and \

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp