]> 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>
Wed, 11 Jun 2025 20:07:58 +0000 (16:07 -0400)
commit582dda08eabc8f7dc9c504c0010d778bd6ff09b2
tree61572f7cb6b4cf1b8aa7bc17bde6e1a88e0bf75b
parent2f2e51b6596c3796b907c6289d3e631508d8774e
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.
libgcobol/intrinsic.cc
libgcobol/libgcobol.cc
libgcobol/libgcobol.h