Commit Graph

7 Commits

Author SHA1 Message Date
Zbigniew Sarbinowski 916093f49f [SystemZ][z/OS] correct rc and errno within nanosleep()
This patch fixes rc and errno within nanosleep(). It also updates __rem parameter as well it introduces cast to handle conversions from long into unsigned int to avoid warnings.

Reviewed By: Mordante

Differential Revision: https://reviews.llvm.org/D99373
2021-04-06 15:36:58 +00:00
jasonliu 158026301b [libc++][AIX] Initial patch to unblock the libc++ build on AIX
This path would unblock the build of libc++ library on AIX:
1. Add _AIX guard for _LIBCPP_HAS_THREAD_API_PTHREAD
2. Use uselocale to actually take the locale setting
   into account.
3. extract_mtime and extract_atime mod needed for AIX. As stat
   structure on AIX uses internal structure st_timespec to store
   time for binary compatibility reason. So we need to convert it
   back to timespec here.
4. Do not build cxa_thread_atexit.cpp for libcxxabi on AIX.

Differential Revision: https://reviews.llvm.org/D97558
2021-03-24 22:13:20 +00:00
Muiez Ahmed f6af5efcec [SystemZ][z/OS] vasprintf fix libc++
The aim is to use the correct vasprintf implementation for z/OS libc++, where a copy of va_list ap is needed. In particular, it avoids the potential that the initial internal call to vsnprintf will modify ap and the subsequent call to vsnprintf will use that modified ap.

Differential Revision: https://reviews.llvm.org/D97473
2021-03-18 15:00:57 -04:00
Muiez Ahmed ebe6161c54 [SystemZ][z/OS] Missing locale functions libc++
The aim is to add the missing z/OS specific locale functions for libc++ (newlocale, freelocale and uselocale).

Reviewed By: ldionne, #libc, curdeius

Differential Revision: https://reviews.llvm.org/D98044
2021-03-08 19:32:33 +00:00
Muiez Ahmed 53c8587dcd [SystemZ][z/OS] Missing non-posix functions libc++
The aim is to add missing non-posix functions for z/OS libc++ (strtod_l and strtof_l).

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D97051
2021-03-04 15:23:21 +00:00
Zbigniew Sarbinowski cb2d2ae56a [SystemZ][ZOS] Provide CLOCK_MONOTONIC alternative
We need CLOCK_MONOTONIC equivalent implementation for z/OS within libc++. The default implementation is asserting.

On z/OS the lack of  'clock_gettime()' and 'time_point()' force us to look for alternatives.
The current proposal is to use `gettimeofday()` for CLOCK_MONOTONIC  which is also used in CLOCK_REALTIME.  This will allow us to skip the assertion with compromised CLOCK_MONOTONIC implementation which will not guarantee to never go back in time because it will use `gettimeofday()` but only when it's set.

Is this a good compromise for platforms which does not support monotonic clock?
Hopefully this will spark the discussion and agreement how to proceed in this situation.

Reviewed By: #libc, ldionne, hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D93542
2021-02-12 18:39:48 +00:00
Louis Dionne b51756819a [libc++] Rename include/support to include/__support
We do ship those headers, so the directory name should not be something
that can potentially conflict with user-defined directories.

Differential Revision: https://reviews.llvm.org/D95956
2021-02-04 10:16:33 -05:00