[Poppler-bugs] [Bug 105766] New: Add missing time.h to some headers
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Tue Mar 27 12:17:32 UTC 2018
https://bugs.freedesktop.org/show_bug.cgi?id=105766
Bug ID: 105766
Summary: Add missing time.h to some headers
Product: poppler
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: poppler-bugs at lists.freedesktop.org
Reporter: mojca at macports.org
Created attachment 138376
--> https://bugs.freedesktop.org/attachment.cgi?id=138376&action=edit
Add missing time.h plus minor cleanup
I'm attaching a patch to fix a broken build on some platforms (notable FreeBSD
and NetBSD). Since the time headers are needed in gfile.h not just in gfile.cc,
I moved inclusion of time.h there and made a minor cleanup of code.
Note that #include <ctime.h> does not exist (not even on Mac), it's either
<ctime> or <time.h>. I tested it and that fails. That said, #elif
defined(MACOS) is not defined either, so it doesn't really do any harm, but
it's of no use.
I had to patch poppler/Form.h in the released version because it also lacked
time headers. When preparing the patch I noticed it was already fixed upstream,
but if all other headers are included like <set> and <vector>, meaning that
it's C++ anyway, so it also made more sense to use <ctime> rather than
<time.h>. That one is optional though, it's just cosmetics.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler-bugs/attachments/20180327/dfaf3745/attachment.html>
More information about the Poppler-bugs
mailing list