Opened 5 years ago
Last modified 5 years ago
#15515 new bug
deprecate tempnam, tmpnam, L_tmpnam and gets
Reported by: | korli | Owned by: | nobody |
---|---|---|---|
Priority: | normal | Milestone: | Unscheduled |
Component: | System/POSIX | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description
from https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html
The gets(), tmpnam(), and tempnam() functions and the L_tmpnam macro are marked obsolescent.
- definitions in stdio.h should be removed or protected with a macro.
- symbols should only be exported for older versions of Haiku (see https://git.haiku-os.org/haiku/tree/src/system/libroot/libroot_versions)
- release notes should be updated.
Change History (8)
comment:1 by , 5 years ago
comment:2 by , 5 years ago
C11 removed gets() entirely. For this reason: "or protected with a macro".
comment:6 by , 5 years ago
Build broken after this change on x86 native Haiku build:
C++ objects/haiku/x86/release/system/libroot/os/launch.o In file included from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/ext/string_conversions.h:43, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/bits/basic_string.h:6400, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/string:52, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/stdexcept:39, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/array:3, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/tuple:3, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/bits/stl_map.h:63, from build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/map:61, from ../headers/private/app/TokenSpace.h:13, from ../src/system/libroot/os/launch.cpp:9: build_packages/gcc_x86_syslibs_devel-8.3.0_2019_05_24-7-x86_gcc2/develop/headers/x86/c++/cstdio:141:11: error: '::tmpnam' has not been declared using ::tmpnam; ^~~~~~
comment:7 by , 5 years ago
- gcc_x86 needs to be rebuilt (develop/headers/x86/c++/i586-pc-haiku/bits/c++config.h defines
__GLIBCXX_USE_TMPNAM
) - jasper needs to be patched and rebuilt (uses L_tmpnam)
I think before doing that we need to update the haikuports builders?
Note:
See TracTickets
for help on using tickets.
I think we can mark them with
__attribute__((deprecated))
for gcc8, that will result in a compile time warning. Is there a need for hiding them more than that?