Use ISO C and C++ conformant name: _fdopen on windows
Fixes ``` warning: In file included from src\lib.c:12: warning: src/./parser.c:1781:28: warning: 'fdopen' is deprecated: The POSIX name for this item is deprecated. Instead, use the ISO C and C++ conformant name: _fdopen. See online help for details. [-Wdeprecated-declarations] warning: self->dot_graph_file = fdopen(fd, "a"); warning: ^ warning: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\stdio.h:2431:28: note: 'fdopen' has been explicitly marked deprecated here warning: _Check_return_ _CRT_NONSTDC_DEPRECATE(_fdopen) _ACRTIMP FILE* __cdecl fdopen(_In_ int _FileHandle, _In_z_ char const* _Format); warning: ^ warning: C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\ucrt\corecrt.h:414:50: note: expanded from macro '_CRT_NONSTDC_DEPRECATE' warning: #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT( \ warning: ^ warning: C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\VC\Tools\MSVC\14.29.30133\include\vcruntime.h:310:47: note: expanded from macro '_CRT_DEPRECATE_TEXT' warning: #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text)) ```
This commit is contained in:
parent
3ff5c19403
commit
6e0c49305e
1 changed files with 4 additions and 0 deletions
|
|
@ -1776,7 +1776,11 @@ void ts_parser_print_dot_graphs(TSParser *self, int fd) {
|
|||
}
|
||||
|
||||
if (fd >= 0) {
|
||||
#ifdef _WIN32
|
||||
self->dot_graph_file = _fdopen(fd, "a");
|
||||
#else
|
||||
self->dot_graph_file = fdopen(fd, "a");
|
||||
#endif
|
||||
} else {
|
||||
self->dot_graph_file = NULL;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue