Problem compiling font-mgr.c

robert delius royar xemacs at frinabulax.org
Mon Nov 22 22:21:23 EST 2010


After changes registered in src/ChangeLog as
2010-11-20  Aidan Kehoe  <kehoea at parhasard.net>
[...]
         * font-mgr.c (Ffc_pattern_get):
I get a compilation failure below:
gcc-4.2 -c -Wall -Wno-switch -Wundef -Wsign-compare -Wno-char-subscripts 
-Wpacked -Wpointer-arith -Wshadow -Wmissing-declarations 
-Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement 
-Wunused-parameter -g -O3 -fno-strict-aliasing -arch i386  -Demacs -I. 
-I/Users/royar/src/xemacs-hg/src -DHAVE_CONFIG_H -I/opt/X11/include 
-I/opt/X11/include/freetype2 -I/opt/local/include -I/usr/X11/include 
font-mgr.c
font-mgr.c: In function 'Ffc_pattern_get':
font-mgr.c:443: error: incompatible type for argument 1 of 
'__gmpz_get_si'
make[1]: *** [font-mgr.o] Error 1
make: *** [src] Error 2

A diff between this fon-mgr.c and the one from
"XEmacs 21.5  (beta29) "garbanzo" cde1608596d0 [Lucid] (i386-apple-darwin10.5.0, Mule) of Fri Nov 19 2010 on grendal.frinabulax.org"

--- /Users/royar/scratch/font-mgr.c     2010-04-05 10:15:53.000000000 
-0400
+++ src/font-mgr.c      2010-11-22 22:06:55.000000000 -0500
@@ -411,6 +411,7 @@
    Extbyte *fc_property;
    FcResult fc_result;
    FcValue fc_value;
+  int int_id = 0;

    /*
      process arguments
@@ -435,14 +436,21 @@
        dead_wrong_type_argument (Qstringp, property);
      }

-  if (!NILP (id)) CHECK_NATNUM (id);
+  if (!NILP (id))
+    {
+#ifdef HAVE_BIGNUM
+      check_integer_range (id, Qzero, make_integer (EMACS_INT_MAX));
+      int_id = BIGNUMP (id) ? bignum_to_int (id) : XINT (id);
+#else
+      check_integer_range (id, Qzero, make_integer (EMACS_INT_MAX));
+      int_id = XINT (id);
+#endif
+    }
    if (!NILP (type)) CHECK_SYMBOL (type);

    /* get property */
    fc_result = FcPatternGet (XFC_PATTERN_PTR (pattern),
-                           fc_property,
-                           NILP (id) ? 0 : XINT (id),
-                           &fc_value);
+                           fc_property, int_id, &fc_value);

    switch (fc_result)
      {

The offending line is
       int_id = BIGNUMP (id) ? bignum_to_int (id) : XINT (id);


-- 
   When fascism comes to America, it will be wrapped in a flag and
   carrying a cross.
                                                    Sinclair Lewis



More information about the XEmacs-Beta mailing list