]> git.ipfire.org Git - thirdparty/gcc.git/commit
cobol: Eliminate unguarded clock_gettime dependencies. [PR119975]
authorRobert Dubner <rdubner@symas.com>
Wed, 11 Jun 2025 19:49:41 +0000 (15:49 -0400)
committerRobert Dubner <rdubner@symas.com>
Tue, 29 Jul 2025 16:06:39 +0000 (12:06 -0400)
commit8df603ce1c0f69eb4ffe01d044096dbd082d406d
tree381b29bdf61d58210d24b3dccfae48ec0e399d23
parentf79a7d0f7b3f79c8e234ca870c0abf5b3101368e
cobol: Eliminate unguarded clock_gettime dependencies. [PR119975]

These changes are help make it possible to compile on MacOS.  In
addition to guarding clock_settime() calls, it removes the use
of structures and constants needed for clock_settime().

libgcobol/ChangeLog:

PR cobol/119975
* intrinsic.cc (__gg__current_date): Eliminate CLOCK_REALTIME.
(__gg__seconds_past_midnight): Likewise.
(__gg__formatted_current_date): Likewise.
(__gg__random): Likewise.
(__gg__random_next): Likewise.
* libgcobol.cc: include <sys/time.h>.
(__gg__abort): Eliminate CLOCK_REALTIME.
(cobol_time): Likewise.
(get_time_nanoseconds): Rename.
(get_time_nanoseconds_local): Comment; Eliminate CLOCK_REALTIME.
(__gg__clock_gettime): Likewise.
(__gg__get_date_hhmmssff): Likewise.
* libgcobol.h (__gg__clock_gettime): Eliminate clockid_t from declaration.

(cherry picked from commit 582dda08eabc8f7dc9c504c0010d778bd6ff09b2)
libgcobol/intrinsic.cc
libgcobol/libgcobol.cc
libgcobol/libgcobol.h