Skip to content

Commit

Permalink
MDEV-27142 - fix Connect engine reliance on textmode stdio on Windows...
Browse files Browse the repository at this point in the history
by removing a couple ifdef(_WIN32)
  • Loading branch information
vaintroub committed Jul 18, 2022
1 parent 016dd21 commit a5dc76a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
6 changes: 2 additions & 4 deletions storage/connect/json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,8 @@

#define ARGS MY_MIN(24,(int)len-i),s+MY_MAX(i-3,0)

#if defined(_WIN32)
#define EL "\r\n"
#else
#define EL "\n"
#define EL "\n"
#if !defined(_WIN32)
#undef SE_CATCH // Does not work for Linux
#endif

Expand Down
13 changes: 3 additions & 10 deletions storage/connect/tabmul.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,16 @@ bool TDBMUL::InitFileNames(PGLOBAL g)

p = filename + strlen(filename) - 1;

#if !defined(_WIN32)
// Data files can be imported from Windows (having CRLF)

// Data files can have CRLF
if (*p == '\n' || *p == '\r') {
// is this enough for Unix ???
p--; // Eliminate ending CR or LF character

if (p >= filename)
// is this enough for Unix ???
if (*p == '\n' || *p == '\r')
p--; // Eliminate ending CR or LF character

} // endif p

#else
if (*p == '\n')
p--; // Eliminate ending new-line character
#endif
} // endif p
// Trim rightmost blanks
for (; p >= filename && *p == ' '; p--) ;

Expand Down

0 comments on commit a5dc76a

Please sign in to comment.