diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2022-02-03 01:24:14 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2022-02-03 01:24:14 +0100 |
commit | adb0e8c994425d0147ab88d0a734048cc6df2403 (patch) | |
tree | 1c732d715c6b162fb4bc7350b2889bc0493c5e11 | |
parent | fe419467b375fb64f078b14f2088968b3130aeaa (diff) | |
download | mariadb-git-bb-10.9-wlad.tar.gz |
MDEV-27142 - fix Connect engine reliance on textmode stdio on Windows...bb-10.9-wlad
by removing a couple ifdef(_WIN32)
-rw-r--r-- | storage/connect/json.cpp | 6 | ||||
-rw-r--r-- | storage/connect/tabmul.cpp | 13 |
2 files changed, 5 insertions, 14 deletions
diff --git a/storage/connect/json.cpp b/storage/connect/json.cpp index 17c6ba9791a..d2cca759b13 100644 --- a/storage/connect/json.cpp +++ b/storage/connect/json.cpp @@ -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 diff --git a/storage/connect/tabmul.cpp b/storage/connect/tabmul.cpp index d260149514d..a0160fc6dd7 100644 --- a/storage/connect/tabmul.cpp +++ b/storage/connect/tabmul.cpp @@ -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--) ; |