[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Processed: 008_fix_xgetpw_macro.diff breaks Xlib API.



On Thu, Apr 22, 2004 at 11:28:24AM +1000, Daniel Stone wrote:
> On Wed, Apr 21, 2004 at 11:51:58AM -0700, Chris Waters wrote:

> > Now, I'll grant that large parts of X11 predate the C standards, but
> > that's no excuse for ignoring the problem or pretending it doesn't
> > exist.  There should be a plan in place for dealing with this sort of
> > thing.

> OK, so let me dictate something on behalf of the XSF and X upstream and
> make existing, long-accepted practice absolutely clear:

Let me repeat, "long-accepted practice" is no excuse for ignoring the
problem or pretending it doesn't exist.  (And it may be long-accepted,
but it's not very widely accepted, or the ISO C committees wouldn't
have forbidden it.)

> The use of a preceding underscore in functions, macros, variable names
> and/or other symbols in X code denotes internalisation,

What part of "this code is relying on undefined behavior" don't you
understand?

> and MUST NOT be depended on by any other library.

I agree, depending on undefined behavior is foolish.  Both outside *and*
inside of X.

So technically, what we have here is two bugs.  One against OpenMotif
for depending on X internal symbols (symbols with mandatorily
undefined behavior, at that).  And one against X upstream for code
with undefined behavior.

After fifteen years(!) there should be a plan for dealing with this
sort of thing!  I'm not blaming you, I know you're not responsible,
but geeze!  Even the BSDs only took five or six years to terms with
ISO C, and they started out convinced it was a AT&T plot! :)

-- 
Chris Waters           |  Pneumonoultra-        osis is too long
xtifr@debian.org       |  microscopicsilico-    to fit into a single
or xtifr@speakeasy.net |  volcaniconi-          standalone haiku



Reply to: