* [developer] Code conflicts from ctype.h
@ 2024-11-19 15:11 Peter Tribble
2024-11-19 20:45 ` Richard Lowe
0 siblings, 1 reply; 4+ messages in thread
From: Peter Tribble @ 2024-11-19 15:11 UTC (permalink / raw)
To: illumos-dev
[-- Attachment #1: Type: text/plain, Size: 1181 bytes --]
Hi,
In /usr/include/iso/ctype_iso.h (included from ctype.h) we have
#define _U 0x00000001 /* Upper case */
#define _L 0x00000002 /* Lower case */
#define _N 0x00000004 /* Numeral (digit) */
#define _S 0x00000008 /* Spacing character */
#define _P 0x00000010 /* Punctuation */
#define _C 0x00000020 /* Control character */
#define _B 0x00000040 /* Blank */
#define _X 0x00000080 /* heXadecimal digit */
These can cause what can best be described as havoc with anything that
wants to use something like _C or _S. I've seen problems with openjdk and
harfbuzz, as examples.
Could there be a way to either move or hide these so they don't pollute the
global namespace so easily?
From an initial investigation, we use them in
usr/src/lib/libc/port/i18n/_ctype.c
and there's a private copy in stand, by the look of it.
--
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/
------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2d7673e4cb20cc36-Mbc85aa05c049c724c5837091
Delivery options: https://illumos.topicbox.com/groups/developer/subscription
[-- Attachment #2: Type: text/html, Size: 2068 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [developer] Code conflicts from ctype.h
2024-11-19 15:11 [developer] Code conflicts from ctype.h Peter Tribble
@ 2024-11-19 20:45 ` Richard Lowe
2024-11-20 2:09 ` Alan Coopersmith via illumos-developer
0 siblings, 1 reply; 4+ messages in thread
From: Richard Lowe @ 2024-11-19 20:45 UTC (permalink / raw)
To: illumos-developer
My memory, which might be incorrect, is that these were public with
the closed i18n and got left that way on the assumption that it was
more compatible than not.
I think this is probably wrong, for the reason you point out, but I'm
not sure how best to hide them. I doubt anything you're building is
asking for a strict environment, so that wouldn't help.
You could rename them and see what happens?
------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2d7673e4cb20cc36-M2a43cdf72deae11816ab0239
Delivery options: https://illumos.topicbox.com/groups/developer/subscription
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [developer] Code conflicts from ctype.h
2024-11-19 20:45 ` Richard Lowe
@ 2024-11-20 2:09 ` Alan Coopersmith via illumos-developer
2024-11-20 20:39 ` Richard Lowe
0 siblings, 1 reply; 4+ messages in thread
From: Alan Coopersmith via illumos-developer @ 2024-11-20 2:09 UTC (permalink / raw)
To: illumos-developer, Richard Lowe
On 11/19/24 12:45, Richard Lowe wrote:
> My memory, which might be incorrect, is that these were public with
> the closed i18n and got left that way on the assumption that it was
> more compatible than not.
I'm not sure they were ever intended to be Public in the ARC sense, but
they were visible artifacts of the macro implementations of ctype.h:
https://github.com/illumos/illumos-gate/blob/7c478bd95313f5f23a4c958a745db2134aa03244/usr/src/head/iso/ctype_iso.h
I can't imagine they have any valid use since you removed those macros.
-alan-
------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2d7673e4cb20cc36-M2b2e248c55eae2deb81196d6
Delivery options: https://illumos.topicbox.com/groups/developer/subscription
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [developer] Code conflicts from ctype.h
2024-11-20 2:09 ` Alan Coopersmith via illumos-developer
@ 2024-11-20 20:39 ` Richard Lowe
0 siblings, 0 replies; 4+ messages in thread
From: Richard Lowe @ 2024-11-20 20:39 UTC (permalink / raw)
To: Alan Coopersmith; +Cc: illumos-developer
You're right of course. I really need to come up with a clearer way
to differentiate "we want you to use this" and "we accidentally left
this visible, and now you might".
------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T2d7673e4cb20cc36-Me58340419d551226c165660c
Delivery options: https://illumos.topicbox.com/groups/developer/subscription
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-11-20 20:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-19 15:11 [developer] Code conflicts from ctype.h Peter Tribble
2024-11-19 20:45 ` Richard Lowe
2024-11-20 2:09 ` Alan Coopersmith via illumos-developer
2024-11-20 20:39 ` Richard Lowe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).