[Poppler-bugs] [Bug 60095] utils/pdfunite.cc fails to build

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 5 14:50:53 PST 2013


https://bugs.freedesktop.org/show_bug.cgi?id=60095

--- Comment #17 from Adrian Johnson <ajohnson at redneon.com> ---
(In reply to comment #16)
> Wait Wait Wait, are you saying that _FILE_OFFSET_BITS defines the type of
> off_t?

Yes. On 32-bit platforms the size of off_t is determined by _FILE_OFFSET_BITS.

> Then _FILE_OFFSET_BITS  should be in poppler-config.h too, and that should
> mostly fix the problem, no?

It wouldn't make that much difference. The problem then is we then need to
ensure poppler-config.h is the first include. Otherwise if you have

#include <stdio.h>
#include "poppler-config.h"

off_t will be defined before poppler-config.h is included. And files that don't
include poppler-config but include stdio.h (or other system headers that may
result in off_t being defined) will also have the wrong definition of off_t.

If _FILE_OFFSET_BITS is not defined at the start of each source file (whether
by config.h or poppler-config.h) it becomes very difficult to ensure
_FILE_OFFSET_BITS is defined before any system includes. 

It is also not a good idea to include config.h defines in public header files
since it clashes with the config.h in applications including the header file.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler-bugs/attachments/20130205/aab3d462/attachment.html>


More information about the Poppler-bugs mailing list