This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [patch] to gas: portability fix


Hi Michael,

: Below is an obvious portability patch for gas.
:
: Tue Dec 12 22:40:26 PST 2000  Michael Sokolov  <msokolov@ivan.Harhan.ORG>
: 
: 	* dwarf2dbg.c: #include <limits.h> only if it exists.

Approved and applied.

There seems to be one problem though - if limits.h is not included
then INT_MAX will not be defined, which will prevent dwarf2dbg.c from
being compiled.  I added the following lines to your patch as a
workaround for this potential problem, although I am not sure if this
is the best way to solve the problem:

  #ifdef HAVE_LIMITS_H
  #include <limits.h>
+ #else
+ #ifndef INT_MAX
+ #define INT_MAX (int) (((unsigned)(-1)) >> 1)
+ #endif
  #endif

Cheers
	Nick

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]