> > some recent warning fixes break cygwin compiling.

> > e.g. in lib/Xmu/StrToCurs.c:172
> > a printf("%lu", sizeof(...)) was changed to
> > printf("%lu", (ulong)sizeof(...))

> > and in lib/Xmu/WidgetNode.c

> > But ulong is not defined on cygwin. What is the correct fix for this.
> > Change the printf type to %u (which might break on 64 bit
> > architectures)
> > or using (unsigned long) or defining ulong for cygwin where
> > it's needed?

> you must define a format string
> that matches your machine's size_t.

> try something like this:

> #if arch1
> #define SIZE_T_FORMAT "%lu"
> #elif arch2
> #define SIZE_T_FORMAT "%u"
> #else
> #error...
> #endif

... and then end up with the task of maintaining what arch1 & arch2 are.
Are you volunteering yourself, your children and your grandchildren for
this task?  Mine have better things to do.

Marc.

+----------------------------------+-----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310           |
|  Computing and Network Services  |  fax:    1-780-492-1729           |
|  352 General Services Building   |  email:  [EMAIL PROTECTED]          |
|  University of Alberta           +-----------------------------------+
|  Edmonton, Alberta               |                                   |
|  T6G 2H1                         |     Standard disclaimers apply    |
|  CANADA                          |                                   |
+----------------------------------+-----------------------------------+
XFree86 Core Team member.  ATI driver and X server internals.

_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to