[Poppler-bugs] [Bug 27610] New: snprintf() is undefined by _XOPEN_SOURCE=500 on BSDs, making poppler 0.12.4 fail to compile.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Apr 12 20:45:54 PDT 2010


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

           Summary: snprintf() is undefined by _XOPEN_SOURCE=500 on BSDs,
                    making poppler 0.12.4 fail to compile.
           Product: poppler
           Version: unspecified
          Platform: x86 (IA32)
        OS/Version: FreeBSD
            Status: NEW
          Severity: normal
          Priority: medium
         Component: general
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: the_paya at gentoo.org


CMake config (autotools too I think, just did a quick grep) is adding the
define -D_XOPEN_SOURCE=500 which (at that version, 500) correctly leaves
snprintf() undefined, according to the spec.
Given that function is being used in poppler/Catalog.cc, the proper define
should be -D_XOPEN_SOURCE=600.

Perhaps unrelated to the summary, but also causing compile to fail here,
strcasecmp() is being used in 2 places, poppler/GlobalParams.cc and
test/perf-test.cc, this is defined on <strings.h> (on both BSD and Linux),
which isn't included in the source files (they only have <string.h>, which
seems to be enough for Linux).

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Poppler-bugs mailing list