Summary: | [build] [patch] Compilation failure with _DONT_USE_CTYPE_INLINE_ defined | ||
---|---|---|---|
Product: | Base System | Reporter: | Mike Gelfand <mike> |
Component: | misc | Assignee: | Bugmeister <bugmeister> |
Status: | Closed Overcome By Events | ||
Severity: | Affects Only Me | CC: | theraven |
Priority: | Normal | Keywords: | patch |
Version: | Unspecified | ||
Hardware: | Any | ||
OS: | Any |
Description
Mike Gelfand
2013-07-09 13:10:00 UTC
I am not sure what the bug is here. We do not guarantee forward compatibility, only backward compatibility. Code compiled on 8.3 should run on 9.1, but not the converse. In particular, in 9.x we added a (POSIX2008-compilant) per-thread locale and explicit locales. For efficiency, various ctype.h functions are inlines. When compiled on 8.x, these will always refer to the global locale. When compiled with 9.x, they will refer to the thread-local locale if one is set or the global locale if not. If you want to target 8.x, then you should use the headers from 8.x (ideally, we'd add visibility attributes to all of the headers to allow you to target older versions, but we have not done this for any other system headers and so there should be no expectation that this will work in the general case). Ah, I see, the running on 8.3 was a red herring. This looks like a real issue. I'll take a look. The _ctype.h header needs to be modified to provide non-inline definitions of the functions and we'll need to add them to libc. batch change: For bugs that match the following - Status Is In progress AND - Untouched since 2018-01-01. AND - Affects Base System OR Documentation DO: Reset to open status. Note: I did a quick pass but if you are getting this email it might be worthwhile to double check to see if this bug ought to be closed. Keyword: patch or patch-ready – in lieu of summary line prefix: [patch] * bulk change for the keyword * summary lines may be edited manually (not in bulk). Keyword descriptions and search interface: <https://bugs.freebsd.org/bugzilla/describekeywords.cgi> ^Triage: this PR is probably long overcome by events. If this is not the case, please let us know. |