diff --git a/ddr/include/ddr/std/string.hpp b/ddr/include/ddr/std/string.hpp index 486396c3876..67ca7b0da35 100644 --- a/ddr/include/ddr/std/string.hpp +++ b/ddr/include/ddr/std/string.hpp @@ -27,13 +27,16 @@ #if defined(J9ZOS390) #include +#if !defined(__open_xl__) #undef toupper #undef tolower - +#endif /* !defined(__open_xl__) */ #include -#define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c) -#define tolower(c) (isupper(c) ? (c | _XLOWER_ASCII) : c) +#if !defined(__open_xl__) +#define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c) +#define tolower(c) (isupper(c) ? (c | _XLOWER_ASCII) : c) +#endif /* defined(__open_xl__) */ #else /* defined(J9ZOS390) */ #include diff --git a/ddr/include/ddr/std/unordered_map.hpp b/ddr/include/ddr/std/unordered_map.hpp index 7e72c2f9b83..5110126cb5d 100644 --- a/ddr/include/ddr/std/unordered_map.hpp +++ b/ddr/include/ddr/std/unordered_map.hpp @@ -26,8 +26,10 @@ #if defined(J9ZOS390) #include +#if !defined(__open_xl__) #undef toupper #undef tolower +#endif /* !defined(__open_xl__) */ #endif /* defined(J9ZOS390) */ #include @@ -38,9 +40,9 @@ using std::unordered_map; using std::tr1::unordered_map; #endif /* defined(OMR_HAVE_CXX11) */ -#if defined(J9ZOS390) -#define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c) -#define tolower(c) (isupper(c) ? (c | _XLOWER_ASCII) : c) -#endif /* defined(J9ZOS390) */ +#if defined(J9ZOS390) && !defined(__open_xl__) +#define toupper(c) (islower(c) ? (c & _XUPPER_ASCII) : c) +#define tolower(c) (isupper(c) ? (c | _XLOWER_ASCII) : c) +#endif /* defined(J9ZOS390) && !defined(__open_xl__) */ #endif /* DDR_UNORDERED_MAP */