Ticket #1757 (closed enhancement: fixed)

Opened 11 months ago

Last modified 11 months ago

Symbol 'gcvt' not found

Reported by: andreasf Owned by: axeld
Priority: normal Milestone: R1
Component: System/libroot.so Version: R1 development
Cc: Blocked By:
Platform: x86 Blocking:

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;
}

http://www.thinkage.ca/english/gcos/expl/c/lib/gcvt.html

Change History

Changed 11 months ago by axeld

  • status changed from new to assigned

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.

Changed 11 months ago by axeld

  • status changed from assigned to closed
  • resolution set to fixed

Fixed in r23896.

Changed 11 months ago by andreasf

Works for me, thanks.

Note: See TracTickets for help on using tickets.