Skip to content

Commit abe40f1

Browse files
committed
Win32: use the ISO C and C++ conformant name "_putenv" instead of deprecated "putenv"
1 parent a0564fd commit abe40f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/training/pango_font_info.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ void PangoFontInfo::HardInitFontConfig(const std::string& fonts_dir,
152152
#ifdef _WIN32
153153
std::string env("FONTCONFIG_PATH=");
154154
env.append(cache_dir_.c_str());
155-
putenv(env.c_str());
156-
putenv("LANG=en_US.utf8");
155+
_putenv(env.c_str());
156+
_putenv("LANG=en_US.utf8");
157157
#else
158158
setenv("FONTCONFIG_PATH", cache_dir_.c_str(), true);
159159
// Fix the locale so that the reported font names are consistent.

0 commit comments

Comments
 (0)