pqiv icon indicating copy to clipboard operation
pqiv copied to clipboard

Add support for 64 bits time_t

Open danieljakots opened this issue 4 years ago • 1 comments
trafficstars

See #101 for details.

danieljakots avatar Jun 19 '21 15:06 danieljakots

Hi there, jca@openbsd here, new maintainer of our pqiv port.

A few comments on @danieljakots' proposal:

  • g_date_time_to_unix() returns a gint64. To print it portably without a cast one should use glib's G_GINT64_FORMAT.
  • Turns out that pqiv.c tries to avoid G_GINT64_FORMAT on WIN32, cf pqiv.c line 3710. Using %jd and an (intmax_t) cast supposedly works around the problem (%jd is the correct format for a signed integer).
  • Except, you seem to have hit a problem with mingw builds and the use of %ju, and have switched to PRIuMAX. Care to share what was the problem that lead to this commit?

jcourreges avatar Jun 20 '21 19:06 jcourreges

Sorry for ignoring this for so long, I have fallen quite behind on PRs. Thanks for the comment, too!

The MingW issue was simply that it didn't support "j" at the time. I don't bother to check right now and will just add the conditional win32 check to this branch, too.

phillipberndt avatar Jan 02 '24 10:01 phillipberndt