On Tue, 10 Dec 2002, Warren Turkal wrote:

> > A larger issue is that, on some 32-bit systems, this ends up typedef'ing
> > CARD32 as 'unsigned int', and on others, as 'unsigned long'.   For reasons
> > I won't get into here, the X sources currently need CARD32 to be
> > typedef'ed as 'unsigned long' for all 32-bit environments.  The same
> > issue, without 'unsigned' occurs with INT32.

> What does it matter if the type is unsigned and 32 bits in length?

In point of fact, a similar comment could be made about your patch itself.

Technically, you are correct.  There is no difference between the two.
However, there are more than technical issues to be dealt with here.

If you check, you will note that typedef'ing CARD32 as unsigned int on
32-bit systems produces a plethora of warnings, and fixing those produces
even more.

In practice, these warnings produce two effects that this project must be
concerned with.  One is related to PR, the other to software maintenance.

The PR issue is that compilation warnings advertise poor code quality to
those (the majority) that don't have the time nor the gumption to dig
deeper.

The software maintenance issue is that the more "nonsense" warnings you
produce by default, the less likely it is patch submissions will have been
pre-laundered for portability problems.  That's simply because nonsense
warnings drown out "real" warnings.

So, your task, to my mind, is clear:  make sure `make World` logs do not
differ whether CARD32 is typedef'ed as 'unsigned long' or 'unsigned int'
on 32-bit systems.  Then ensure the changes needed do not adversely affect
inter-operability between 32-bit and 64-bit systems.

After going through that exercise, perhaps, you will have gained a greater
appreciation for what portability really means.

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