This is an archive of the discontinued LLVM Phabricator instance.

[SystemZ][z/OS] Enable POSIX_l functions for z/OS
ClosedPublic

Authored by muiez on Oct 28 2020, 10:31 AM.

Details

Summary

The aim of this patch is to enable POSIX _l functions for z/OS. In particular, the functions are provided with libc++ and this patch resorts to the fallback functions. Nonetheless, the functions are being added so the implementation of the ctype<> member functions can call them. The following changes were needed to allow for a successful build when using the libc++ library for z/OS.

Diff Detail

Event Timeline

muiez created this revision.Oct 28 2020, 10:31 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 28 2020, 10:31 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
muiez requested review of this revision.Oct 28 2020, 10:31 AM
muiez removed a reviewer: Restricted Project.
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 28 2020, 10:31 AM
muiez removed a reviewer: Restricted Project.Oct 28 2020, 10:34 AM
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 28 2020, 10:34 AM

Please quit removing libc++ as a reviewer. There's a reason why we add that group of reviewers. You won't check this in without the approval of someone in the group anyway.

libcxx/include/wchar.h
173 ↗(On Diff #301323)

Where are those defined for z/OS? I see definitions in src/solaris/support/mbsnrtowcs.inc and src/support/win32/support.cpp, but nothing that seems to be included when building for z/OS. Did I miss something?

muiez updated this revision to Diff 301717.Oct 29 2020, 1:02 PM

Removed mbsnrtowcs and wcsnrtombs declarations from libcxx wchar.h. Adding those declarations to the system wchar.h instead.

muiez added inline comments.Oct 29 2020, 1:11 PM
libcxx/include/wchar.h
173 ↗(On Diff #301323)

Please see updated revision. Removed this change and added the declarations to the system wchar.h instead.

ldionne accepted this revision.Nov 10 2020, 4:43 AM
ldionne added inline comments.
libcxx/include/support/ibm/xlocale.h
21

Wikipedia tells me that AIX 7.1 was released 10 years ago. Can we remove this AIX < 7.1 specific workaround?

This revision is now accepted and ready to land.Nov 10 2020, 4:43 AM
This revision was automatically updated to reflect the committed changes.