mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-27142 - postfix
Fix build failure in comp_err, if git is configured with default, platform-specific EOL. The error happens because comp_err is not prepared to handle extraneous CR characters from errmgs-utf8.txt. Use fopen in text mode to fix.
This commit is contained in:
@@ -494,7 +494,7 @@ static uint parse_input_file(const char *file_name, struct errors **top_error,
|
|||||||
section_start= er_offset;
|
section_start= er_offset;
|
||||||
section_count= 0;
|
section_count= 0;
|
||||||
|
|
||||||
if (!(file= my_fopen(file_name, O_RDONLY | O_SHARE, MYF(MY_WME))))
|
if (!(file= my_fopen(file_name, O_RDONLY | O_TEXT | O_SHARE, MYF(MY_WME))))
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
|
||||||
while ((str= fgets(buff, sizeof(buff), file)))
|
while ((str= fgets(buff, sizeof(buff), file)))
|
||||||
|
@@ -598,6 +598,9 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
|||||||
#else
|
#else
|
||||||
#define HAVE_SOCK_CLOEXEC
|
#define HAVE_SOCK_CLOEXEC
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef O_TEXT
|
||||||
|
#define O_TEXT 0
|
||||||
|
#endif
|
||||||
|
|
||||||
/* additional file share flags for win32 */
|
/* additional file share flags for win32 */
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@@ -291,6 +291,8 @@ static void make_ftype(register char * to, register int flag)
|
|||||||
|
|
||||||
if (flag & FILE_BINARY)
|
if (flag & FILE_BINARY)
|
||||||
*to++='b';
|
*to++='b';
|
||||||
|
else if (flag & O_TEXT)
|
||||||
|
*to++= 't';
|
||||||
|
|
||||||
if (O_CLOEXEC)
|
if (O_CLOEXEC)
|
||||||
*to++= 'e';
|
*to++= 'e';
|
||||||
|
Reference in New Issue
Block a user