gdb: fix dwarf2/read.c build on solaris
When building on solaris (gcc farm machine gcc211), I get:
CXX dwarf2/read.o
/export/home/simark/src/binutils-gdb/gdb/dwarf2/read.c: In function 'void finish_fixed_point_type(type*, die_info*, dwarf2_cu*)':
/export/home/simark/src/binutils-gdb/gdb/dwarf2/read.c:18204:42: error: call of overloaded 'abs(LONGEST&)' is ambiguous
*num_or_denom = 1 << abs (scale_exp);
^
In file included from /usr/include/stdlib.h:11:0,
from ../gnulib/import/stdlib.h:36,
from /opt/csw/include/c++/5.5.0/cstdlib:72,
from /export/home/simark/src/binutils-gdb/gdb/../gdbsupport/common-defs.h:90,
from /export/home/simark/src/binutils-gdb/gdb/defs.h:28,
from /export/home/simark/src/binutils-gdb/gdb/dwarf2/read.c:31:
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/iso/stdlib_iso.h:163:16: note: candidate: long int std::abs(long int)
inline long abs(long _l) { return labs(_l); }
^
/opt/csw/lib/gcc/sparc-sun-solaris2.10/5.5.0/include-fixed/iso/stdlib_iso.h:117:12: note: candidate: int std::abs(int)
extern int abs(int);
^
I don't know why, but using std::abs instead of just abs fixes it.
gdb/ChangeLog:
* dwarf2/read.c (finish_fixed_point_type): Use std::abs instead
of abs.
Change-Id: I57b9098351f2a8b2d2f61e848b97f7b2dfe55908