#1757 closed enhancement (fixed)
Symbol 'gcvt' not found
Reported by: | andreasf | Owned by: | axeld |
---|---|---|---|
Priority: | normal | Milestone: | R1 |
Component: | System/libroot.so | Version: | R1/pre-alpha1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | x86 |
Description
The gcvt function is obsolete but apparently available and in use on R5.
Copying Perl 5.8.8 compiled on R5 over to Haiku complains about the symbol:
elf_resolve_symbol: could not resolve symbol 'gcvt' resolve symbol: "gcvt" returned: -2147478780 runtime_loader: troubles relocating: 0x80001304 (image: libperl.so)
Should we add the gcvt function to libroot without adding it to Haiku's headers? That way it would not be picked up by Haiku apps but would provide compatibility with R5; an implementation like this might work:
char* gcvt(double value, int length, char* buf) { sprintf(buf, "%.*g", length, value); return buf; }
Note:
See TracTickets
for help on using tickets.
Even though gcvt() (together with ecvt(), and fcvt()) is marked legacy, it's still part of the current POSIX standard, so we should add it to our headers as well.