]> 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>
Tue, 29 Jul 2025 16:06:39 +0000 (12:06 -0400)
commitc48cce8872c3b66f28727b8dee8349ec72e1f234
treeec080d1eac2b71d2e8f8d35a5faf9b07579a48b7
parent7305d78ab9478422ac03d17399e2384859a73c81
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.

(cherry picked from commit 8fc9e03a70fd08b54449b05833b00e7f8ad01c25)
gcc/cobol/genapi.cc
gcc/cobol/genutil.cc
gcc/cobol/genutil.h