https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119975

--- Comment #11 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-15 branch has been updated by Robert Dubner
<rdub...@gcc.gnu.org>:

https://gcc.gnu.org/g:6c214d4e458afd628c6e511df8a6cc1e5f4ab776

commit r15-10133-g6c214d4e458afd628c6e511df8a6cc1e5f4ab776
Author: Robert Dubner <rdub...@symas.com>
Date:   Thu Jun 5 10:53:02 2025 -0400

    cobol: Guard clock_gettime(). [PR119975]

    This attempts to eliminate "'clock_gettime' not declared..." when
    building on x86_64-apple-darwin15.6.0.  Calls to clock_gettime have been
    reduced to two locations.  Both have been guarded with

    gcc/cobol/ChangeLog:

            PR cobol/119975
            * genapi.cc (parser_intrinsic_call_0): Use get_time_nanoseconds().
            * genutil.cc (get_time_64): Rename to get_time_nanoseconds().
            (get_time_nanoseconds): Likewise.
            * genutil.h (get_time_64): Likewise.
            (get_time_nanoseconds): Likewise.
            * util.cc (class cbl_timespec): Timing routine uses
            get_time_nanoseconds().
            (operator-): Likewise.
            (parse_file): Likewise.

    libgcobol/ChangeLog:

            PR cobol/119975
            * configure.ac: AC_CHECK_LIB(rt, clock_gettime).
            * config.h.in: Likewise.
            * configure: Likewise.
            * gfileio.cc: Remove in-line cppcheck-suppress.
            * intrinsic.cc (timespec_to_string): Use guarded clock_gettime().
            (__gg__current_date): Likewise.
            (__gg__seconds_past_midnight): Likewise.
            (__gg__formatted_current_date): Likewise.
            (__gg__random): Likewise.
            (__gg__random_next): Likewise.
            (__gg__when_compiled): Likewise.
            * libgcobol.cc (cobol_time): Likewise.
            (get_time_nanoseconds): Likewise.
            (__gg__clock_gettime): Likewise.
            (__gg__get_date_hhmmssff): Likewise.
            * libgcobol.h (__gg__clock_gettime): Likewise.
            (struct cbl_timespec): Likewise.

    (cherry picked from commit 2e334900f4ddcd804e3b324402544a572d306ab6)

Reply via email to