From 3cdeb689a807adf5eaf37addef74aebdc60285c3 Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Wed, 13 Sep 2023 16:35:45 -0400 Subject: [PATCH] Fix Solaris builds (Issue #498) --- CHANGES.md | 3 ++- htmldoc/ps-pdf.cxx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5ada7d2b..6d4ada1e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,8 +2,9 @@ - Now link to CUPS library instead of embedding its HTTP code. - Fixed multiple conversions of UTF-8 HTML files from the GUI (Issue #496) -- Fixed some minor CodeQL warnings. +- Fixed a compile bug on Solaris (Issue #498) - Fixed a crash bug with bad title images (Issue #510) +- Fixed some minor CodeQL warnings. # Changes in HTMLDOC v1.9.16 diff --git a/htmldoc/ps-pdf.cxx b/htmldoc/ps-pdf.cxx index 383c5095..8bbbefb9 100644 --- a/htmldoc/ps-pdf.cxx +++ b/htmldoc/ps-pdf.cxx @@ -6,7 +6,7 @@ * broken into more manageable pieces once we make all of the output * "drivers" into classes... * - * Copyright © 2011-2022 by Michael R Sweet. + * Copyright © 2011-2023 by Michael R Sweet. * Copyright © 1997-2010 by Easy Software Products. All rights reserved. * * This program is free software. Distribution and use rights are outlined in @@ -11651,8 +11651,12 @@ write_prolog(FILE *out, /* I - Output file */ doc_date.tm_hour, doc_date.tm_min, doc_date.tm_sec, #ifdef WIN32 (int)(_timezone / 3600)); -#else +#elif HAVE_TM_GMTOFF (int)(doc_date.tm_gmtoff / 3600)); +#elif defined(__sun) + (int)(timezone / 3600)); +#else + 0); #endif // WIN32 if (doc_title != NULL) fprintf(out, "%%%%Title: %s\n", doc_title); @@ -12040,8 +12044,12 @@ write_prolog(FILE *out, /* I - Output file */ doc_date.tm_hour, doc_date.tm_min, doc_date.tm_sec, #ifdef WIN32 (int)(_timezone / 3600)); -#else +#elif HAVE_TM_GMTOFF (int)(doc_date.tm_gmtoff / 3600)); +#elif defined(__sun) + (int)(timezone / 3600)); +#else + 0); #endif // WIN32 write_string(out, (uchar *)temp, 0);