Re: [xml] Libxml changes for Macintosh Carbon libraries. (Patch)
- From: Bjorn Reese <breese mail1 stofanet dk>
- To: "Johnson, Cameron" <ccjohnson filenet com>
- Cc: xml gnome org
- Subject: Re: [xml] Libxml changes for Macintosh Carbon libraries. (Patch)
- Date: 07 Jan 2004 11:26:59 +0100
On Mon, 2004-01-05 at 20:17, Johnson, Cameron wrote:
TRIOSTR.C:
I made the following change at around line 57. I found
that USE_STRTOF was causing problems in Carbon. I used
the __MACOS__ define to conditional it, but I'm not
100% sure that was the appropriate one to use.
------------------------------------------
#if defined(TRIO_COMPILER_SUPPORTS_C99)
# define USE_STRTOD
# ifndef __MACOS__
# define USE_STRTOF
# endif
#elif defined(TRIO_COMPILER_MSVC)
# define USE_STRTOD
#endif
------------------------------------------
Something is wrong. The compiler claims to support C99, but does not
support strtof() which is defined by C99.
I think that a better approach is to undef TRIO_COMPILER_SUPPORTS_C99
in triodef.h (where all platform specific macros should reside)
According to the "PP Carbon Porting Guide" [1] the appropriate macro
to use seems to be TARGET_API_MAC_CARBON rather than __MACOS__
(although I am not sure what a prefix file is.)
Try the patch below instead, and let us know if it works.
[1]
ftp://ftp.metrowerks.com/pub/docs/Targets/Win_Mac_Pro_8/PP_Carbon_Porting_Guide.pdf
Index: triodef.h
===================================================================
RCS file: /cvs/gnome/gnome-xml/triodef.h,v
retrieving revision 1.7
diff -u -r1.7 triodef.h
--- triodef.h 25 Apr 2003 23:12:21 -0000 1.7
+++ triodef.h 7 Jan 2004 10:21:59 -0000
@@ -40,6 +40,8 @@
# define TRIO_COMPILER_MSVC
#elif defined(__BORLANDC__)
# define TRIO_COMPILER_BCB
+#elif defined(__MWERKS__)
+# define TRIO_COMPILER_MWERKS __MWERKS__
#endif
#if defined(VMS) || defined(__VMS)
@@ -209,6 +211,16 @@
# endif
#endif
+#if defined(TRIO_COMPILER_MWERKS) && defined(TARGET_API_MAC_CARBON)
+/*
+ * Although the Metrowerks compiler supports C99, the Carbon library
+ * does not contain all C99 functions.
+ */
+# if defined(TRIO_COMPILER_SUPPORTS_C99)
+# undef TRIO_COMPILER_SUPPORTS_C99
+# endif
+#endif
+
/*
* Not all preprocessors supports the LL token.
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]