Bug 623119
| Summary: | __isoc99_sscanf is used regardless of -std option | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Stas Sergeev <stsp2> |
| Component: | glibc | Assignee: | Andreas Schwab <schwab> |
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 13 | CC: | fweimer, jakub, schwab |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-08-11 12:09:36 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Stas Sergeev
2010-08-11 11:42:20 UTC
glibc never pretended to be forward compatible, so if you want to run on system with older glibc, you should compile/link against the oldest glibc you want to support. To use the non-standard version of sscanf, you need -D_GNU_SOURCE, or e.g. -D_POSIX_C_SOURCE=199506L, as POSIX 2008 mode is now the default. Yes, I understand the forward-compat is never guaranteed, but is the use of __isoc99_sscanf really intentional when -std=gnu89 is used? Yes. -std=gnu89 doesn't have very big influence on the content of glibc headers, all it means is that __STRICT_ANSI__ isn't defined. The Feature Test Macros is what matters. And, in case of *scanf, it is actually better if the %ac/%as/%a[ GNU extensions are never used any more, and %mc/%ms/%m[ is used instead. So, the more __isoc99_*scanf is used, the better. |