1818#include < _Ccsid.h>
1919#endif
2020#ifdef __cplusplus
21- #include " llvm/Support/ErrorOr .h"
21+ #include " llvm/Support/Error .h"
2222#include < system_error>
2323#endif /* __cplusplus */
2424
@@ -41,6 +41,21 @@ int restorezOSStdHandleAutoConversion(int FD);
4141#ifdef __cplusplus
4242namespace llvm {
4343
44+ #ifdef __MVS__
45+
46+ /* * \brief Set the tag information for a file descriptor. */
47+ std::error_code setzOSFileTag (int FD, int CCSID, bool Text);
48+
49+ /* * \brief Get the the tag ccsid for a file name or a file descriptor. */
50+ ErrorOr<__ccsid_t > getzOSFileTag (const char *FileName, const int FD = -1 );
51+
52+ /* * \brief Query the file tag to determine if it needs conversion to UTF-8
53+ * codepage.
54+ */
55+ ErrorOr<bool > needzOSConversion (const char *FileName, const int FD = -1 );
56+
57+ #endif /* __MVS__*/
58+
4459inline std::error_code disableAutoConversion (int FD) {
4560#ifdef __MVS__
4661 if (::disablezOSAutoConversion (FD) == -1 )
@@ -79,34 +94,6 @@ inline ErrorOr<bool> needConversion(const char *FileName, const int FD = -1) {
7994 return false ;
8095}
8196
82- #ifdef __MVS__
83-
84- /* * \brief Disable the z/OS enhanced ASCII auto-conversion for the file
85- * descriptor.
86- */
87- std::error_code disablezOSAutoConversion (int FD);
88-
89- /* * \brief Query the z/OS enhanced ASCII auto-conversion status of a file
90- * descriptor and force the conversion if the file is not tagged with a
91- * codepage.
92- */
93- std::error_code enablezOSAutoConversion (int FD);
94-
95- /* * Restore the z/OS enhanced ASCII auto-conversion for the std handle. */
96- std::error_code restorezOSStdHandleAutoConversion (int FD);
97-
98- /* * \brief Set the tag information for a file descriptor. */
99- std::error_code setzOSFileTag (int FD, int CCSID, bool Text);
100-
101- /* * \brief Get the the tag ccsid for a file name or a file descriptor. */
102- ErrorOr<__ccsid_t > getzOSFileTag (const char *FileName, const int FD = -1 );
103-
104- /* * \brief Query the file tag to determine if it needs conversion to UTF-8
105- * codepage.
106- */
107- ErrorOr<bool > needzOSConversion (const char *FileName, const int FD = -1 );
108-
109- #endif /* __MVS__*/
11097} /* namespace llvm */
11198#endif /* __cplusplus */
11299
0 commit comments