Summary: | poppler 0.14 will not compile on Solaris. | ||
---|---|---|---|
Product: | poppler | Reporter: | Brian Cameron <brian.cameron> |
Component: | general | Assignee: | poppler-bugs <poppler-bugs> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | Solaris | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | patch fixing issues. |
Description
Brian Cameron
2010-06-17 11:47:53 UTC
Hmm, i can understand the JpegWriter.h and SplashOutputDev.cc patches, but is your compiler that bad that #include <cstdio> is different from #include <stdio.h> ? does changing virtual bool init(FILE *f, int width, int height, int hDPI, int vDPI) = 0; to virtual bool init(::FILE *f, int width, int height, int hDPI, int vDPI) = 0; help? I am using the Sun Studio compiler. Perhaps it is that bad, since changing it to "::FILE" doesn't fix the problem, but adding stdio.h does. If that hunk isn't acceptable to go upstream, then if you could accept the other hunks, that would be great. If you have any other suggestions to try, let me know. I understand that adding stdio.h and removing cstdio makes it still compile, right? Yes, that works for me. Adding stdio.h and removing cstdio from ImgWriter.h also resolves the compile issue. Pushed, thanks for the patch. Sorry to reply to a closed bug, but: - As an alternate to the stdio.h/cstdio switch, just inserting a using namespace std; before the inclusion of <cstdio> fixes the issue for ImgWriter.h. I'm not certain what the thinking is these days on "using namespace std", so maybe that's less palatable than just switching back to the C headers. - Brian's patch doesn't completely fix things for me, as goo/gstrtod.cc fails because of missing prototypes for a few functions: "gstrtod.cc", line 53: Error, badfunccp: The function "localeconv" must have a prototype. "gstrtod.cc", line 54: Error, incomplete: The type "lconv" is incomplete. "gstrtod.cc", line 55: Error, badfunccp: The function "strlen" must have a prototype. "gstrtod.cc", line 96: Error, badfunccp: The function "malloc" must have a prototype. "gstrtod.cc", line 99: Error, badfunccp: The function "memcpy" must have a prototype. "gstrtod.cc", line 101: Error, badfunccp: The function "memcpy" must have a prototype. etc. If I add a "using namespace std;" before the inclusion of <clocale> in gstrtod.c, that resolves that issue. Yes, I can also verify that with the following three lines the code also compiles fine on Solaris: #include <config.h> using namespace std; #include <cstdio> I should have said that those 3 lines fixes the ImgWriter.h issue on Solaris just fine, so if you want to use that technique, that is okay. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.