Hello, I got a compiler error from GCC on Mac OS X 10.5.
podofo/src/PdfCompilerCompatPrivate.h: In function ‘PoDoFo::pdf_uint32
PoDoFo::compat::podofo_ntohl(PoDoFo::pdf_uint32)’:
podofo/src/PdfCompilerCompatPrivate.h:91: error: expected id-expression
before ‘(’ token
Here's the patch to fix the problem. Should work on all platforms.
Index: src/PdfCompilerCompatPrivate.h
===================================================================
--- src/PdfCompilerCompatPrivate.h (revision 1107)
+++ src/PdfCompilerCompatPrivate.h (working copy)
@@ -88,19 +88,35 @@
*/
inline static pdf_uint32 podofo_ntohl(pdf_uint32 i) {
+#ifdef ntohl
+ return static_cast<pdf_uint32>( ntohl( i ) );
+#else
return static_cast<pdf_uint32>( ::ntohl( i ) );
+#endif
}
inline static pdf_uint16 podofo_ntohs(pdf_uint16 i) {
+#ifdef ntohs
+ return static_cast<pdf_uint16>( ntohs( i ) );
+#else
return static_cast<pdf_uint16>( ::ntohs( i ) );
+#endif
}
inline static pdf_uint32 podofo_htonl(pdf_uint32 i) {
+#ifdef htonl
+ return static_cast<pdf_uint32>( htonl( i ) );
+#else
return static_cast<pdf_uint32>( ::htonl( i ) );
+#endif
}
inline static pdf_uint16 podofo_htons(pdf_uint16 i) {
+#ifdef htons
+ return static_cast<pdf_uint16>( htons( i ) );
+#else
return static_cast<pdf_uint16>( ::htons( i ) );
+#endif
}
--
Dwight Kelly
Apago, Inc. 4080 McGinnis Ferry Rd Suite 601 Alpharetta, GA 30005
voice:(770) 619-1884 fax:(770) 619-1885
email: [email protected] web: http://www.apago.com
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Podofo-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/podofo-users