mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-17 07:53:51 +08:00
* defs.h (alloca): Declare as void *, not char *, on hpux.
Don't prototype it, just declare the return type.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
Sun Feb 6 06:55:15 1994 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
|
* defs.h (alloca): Declare as void *, not char *, on hpux.
|
||||||
|
Don't prototype it, just declare the return type.
|
||||||
|
|
||||||
Sun Feb 6 03:25:41 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
Sun Feb 6 03:25:41 1994 Peter Schauer (pes@regent.e-technik.tu-muenchen.de)
|
||||||
|
|
||||||
* config/i386/tm-sun386.h, config/i386/tm-symmetry.h
|
* config/i386/tm-sun386.h, config/i386/tm-symmetry.h
|
||||||
|
55
gdb/defs.h
55
gdb/defs.h
@ -27,12 +27,16 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
|
|||||||
|
|
||||||
#include "ansidecl.h"
|
#include "ansidecl.h"
|
||||||
|
|
||||||
/* An address in the program being debugged. Host byte order. */
|
/* For BFD64 and bfd_vma. */
|
||||||
#ifndef CORE_ADDR_TYPE
|
#include "bfd.h"
|
||||||
typedef unsigned int CORE_ADDR;
|
|
||||||
#else
|
/* An address in the program being debugged. Host byte order. Rather
|
||||||
typedef CORE_ADDR_TYPE CORE_ADDR;
|
than duplicate all the logic in BFD which figures out what type
|
||||||
#endif
|
this is (long, long long, etc.) and whether it needs to be 64
|
||||||
|
bits (the host/target interactions are subtle), we just use
|
||||||
|
bfd_vma. */
|
||||||
|
|
||||||
|
typedef bfd_vma CORE_ADDR;
|
||||||
|
|
||||||
#define min(a, b) ((a) < (b) ? (a) : (b))
|
#define min(a, b) ((a) < (b) ? (a) : (b))
|
||||||
#define max(a, b) ((a) > (b) ? (a) : (b))
|
#define max(a, b) ((a) > (b) ? (a) : (b))
|
||||||
@ -508,6 +512,14 @@ enum val_prettyprint
|
|||||||
#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */
|
#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef BFD64
|
||||||
|
|
||||||
|
/* This is to make sure that LONGEST is at least as big as CORE_ADDR. */
|
||||||
|
|
||||||
|
#define LONGEST BFD_HOST_64_TYPE
|
||||||
|
|
||||||
|
#else /* No BFD64 */
|
||||||
|
|
||||||
/* Default to support for "long long" if the host compiler being used is gcc.
|
/* Default to support for "long long" if the host compiler being used is gcc.
|
||||||
Config files must define CC_HAS_LONG_LONG to use other host compilers
|
Config files must define CC_HAS_LONG_LONG to use other host compilers
|
||||||
that are capable of supporting "long long", and to cause gdb to use that
|
that are capable of supporting "long long", and to cause gdb to use that
|
||||||
@ -538,19 +550,14 @@ enum val_prettyprint
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#endif /* No BFD64 */
|
||||||
|
|
||||||
/* Convert a LONGEST to an int. This is used in contexts (e.g. number of
|
/* Convert a LONGEST to an int. This is used in contexts (e.g. number of
|
||||||
arguments to a function, number in a value history, register number, etc.)
|
arguments to a function, number in a value history, register number, etc.)
|
||||||
where the value must not be larger than can fit in an int. */
|
where the value must not be larger than can fit in an int. */
|
||||||
|
|
||||||
#ifndef longest_to_int
|
#define longest_to_int(x) (((x) > INT_MAX || (x) < INT_MIN) \
|
||||||
# ifdef CC_HAS_LONG_LONG
|
? (error ("Value out of range."),0) : (int) (x))
|
||||||
# define longest_to_int(x) (((x) > INT_MAX || (x) < INT_MIN) \
|
|
||||||
? (error ("Value out of range."),0) : (int) (x))
|
|
||||||
# else
|
|
||||||
/* Assume sizeof (int) == sizeof (long). */
|
|
||||||
# define longest_to_int(x) ((int) (x))
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Assorted functions we can declare, now that const and volatile are
|
/* Assorted functions we can declare, now that const and volatile are
|
||||||
defined. */
|
defined. */
|
||||||
@ -767,17 +774,21 @@ strerror PARAMS ((int)); /* 4.11.6.2 */
|
|||||||
#ifndef alloca
|
#ifndef alloca
|
||||||
# ifdef __GNUC__
|
# ifdef __GNUC__
|
||||||
# define alloca __builtin_alloca
|
# define alloca __builtin_alloca
|
||||||
# else
|
# else /* Not GNU C */
|
||||||
# ifdef sparc
|
# ifdef sparc
|
||||||
# include <alloca.h> /* NOTE: Doesn't declare alloca() */
|
# include <alloca.h> /* NOTE: Doesn't declare alloca() */
|
||||||
# endif
|
# endif
|
||||||
# ifdef __STDC__
|
|
||||||
extern void *alloca (size_t);
|
/* We need to be careful not to declare this in a way which conflicts with
|
||||||
# else /* __STDC__ */
|
bison. Bison never declares it as char *, but under various circumstances
|
||||||
|
(like __hpux) we need to use void *. */
|
||||||
|
# if defined (__STDC__) || defined (__hpux)
|
||||||
|
extern void *alloca ();
|
||||||
|
# else /* Don't use void *. */
|
||||||
extern char *alloca ();
|
extern char *alloca ();
|
||||||
# endif
|
# endif /* Don't use void *. */
|
||||||
# endif
|
# endif /* Not GNU C */
|
||||||
#endif
|
#endif /* alloca not defined */
|
||||||
|
|
||||||
/* TARGET_BYTE_ORDER and HOST_BYTE_ORDER must be defined to one of these. */
|
/* TARGET_BYTE_ORDER and HOST_BYTE_ORDER must be defined to one of these. */
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user