jasper.h includes among other things jas_types.h, which doesn't so much define types used by the libjasper api as pull in a bunch of headers and basic typedefs for the convenience the of the library's own compile, polluting the namespace of the client application. In particular, the inclusiong of stdbool.h is causing a conflict with Ghostscript's local definition of the bool type on some systems. This, and probably significant other parts of the jasper includes should be internalized to private headers and not exported to clients.
*** Bug 687506 has been marked as a duplicate of this bug. ***
Also noticed a problem with stdbool.h building on RedHat Linux 7.3 . gs8.30 can't compile.
This has been fixed in the svn trunk with Lennard's commit to replace stdbool.h with a jas_bool typedef.
*** Bug 688197 has been marked as a duplicate of this bug. ***