]> git.ipfire.org Git - thirdparty/gcc.git/commit
cobol: Honor HAVE_CLOCK_GETTIME and HAVE_GETTIMEOFDAY. [PR119975]
authorRobert Dubner <rdubner@symas.com>
Mon, 2 Jun 2025 19:55:20 +0000 (15:55 -0400)
committerRobert Dubner <rdubner@symas.com>
Mon, 2 Jun 2025 20:24:52 +0000 (16:24 -0400)
commit8fc9e03a70fd08b54449b05833b00e7f8ad01c25
treee124cd77b7fb1b7d01b7bbf076012b0a75f61148
parent3d287bff14885598c75c1cb16b08e0ba4ba05bce
cobol: Honor HAVE_CLOCK_GETTIME and HAVE_GETTIMEOFDAY. [PR119975]

These changes cause genapi.cc to use whichever of clock_gettime() or
gettimeofday() are available.  This prevents compilation errors on
systems where clock_gettime() is not available.

gcc/cobol/ChangeLog:

PR cobol/119975
* genapi.cc (parser_intrinsic_call_0): Use get_time_64() function.
* genutil.cc (get_time_64): Definition created.
* genutil.h (get_time_64): Declaration created.
gcc/cobol/genapi.cc
gcc/cobol/genutil.cc
gcc/cobol/genutil.h