[Poppler-bugs] [Bug 14582] New: Build issue: USE_EXCEPTIONS definition is set or queried incorrectly

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 20 04:16:12 PST 2008


http://bugs.freedesktop.org/show_bug.cgi?id=14582

           Summary: Build issue: USE_EXCEPTIONS definition is set or queried
                    incorrectly
           Product: poppler
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: minor
          Priority: low
         Component: general
        AssignedTo: poppler-bugs at lists.freedesktop.org
        ReportedBy: barsnick at gmx.net


Created an attachment (id=14447)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=14447)
patch for proper use of USE_EXCEPTIONS

When compiling poppler with the configure option "--enable-exceptions" and with
gcc-4.2, it becomes obvious that the USE_EXCEPTIONS definition isn't used
correctly.

In goo/gmem.cc and goo/gmem.h, the definition is queried with "#if
USE_EXCEPTIONS". Yet it is defined with "#define USE_EXCEPTIONS", which is
boolean, and expands to an empty string. Therefore "#if USE_EXCEPTIONS" is an
expression which cannot be evaluated. (The C preprocessor sees "#if ".)

The solutions might be:
- Replace "#if USE_EXCEPTIONS" with "#ifdef USE_EXCEPTIONS".
- Replace "#define USE_EXCEPTIONS" with "#define USE_EXCEPTIONS 1".

Since I suppose the latter isn't the regular case with autoconf, I propose the
former solution. A patch is attached, which works for me.

The patch is against poppler-0.6.2, but it applies cleanly and safely against
newer versions, including 0.7.0.


-- 
Configure bugmail: http://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