aboutsummaryrefslogtreecommitdiff
path: root/gdb/defs.h
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1993-05-29 01:33:36 +0000
committerStu Grossman <grossman@cygnus>1993-05-29 01:33:36 +0000
commit38dc5e123ff76ec9c9b58a780c84e74226374b83 (patch)
treec41438ce57feef0d0b4719e8981abfa3bd3959c0 /gdb/defs.h
parent633c8b0a9d08b46a792cb99441f288d405e69633 (diff)
downloadgdb-38dc5e123ff76ec9c9b58a780c84e74226374b83.zip
gdb-38dc5e123ff76ec9c9b58a780c84e74226374b83.tar.gz
gdb-38dc5e123ff76ec9c9b58a780c84e74226374b83.tar.bz2
* Makefile.in: Add new file ser-tcp.c.
* defs.h (memcmp): Add decl for memcmp to #ifndef MEM_FNS_DECLARED. * findvar.c (write_register): See if we are writing back the same value that's already in the register. If so, don't bother. * remote.c (putpkt, getpkt): Improve handling of communication problems. * ser-go32.c: Prototype it to death. Update serial_ops and add dummy routines where appropriate. * ser-tcp.c: New module to implement serial I/O via TCP connections. * ser-unix.c: Clean up getting/setting of tty state. Get rid of SERIAL_RESTORE, add SERIAL_{GET|SET}_TTY_STATE interfaces. * serial.c: Add start of support for connect command. (serial_open): Distinguish between tcp and local devices. * serial.h (struct serial_ops): Get rid of restore, add get_tty_state and set_tty_state. Define protoypes and macros for this mess. * gdbserver/remote-utils.c: Add tcp support. (readchar): Do some real buffering. Handle error conditions gracefully. * gdbserver/remote-inflow-sparc.c: Update to remote-inflow.c (Lynx), remove lots of cruft.
Diffstat (limited to 'gdb/defs.h')
-rw-r--r--gdb/defs.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/gdb/defs.h b/gdb/defs.h
index 3d03b9a..031f2be 100644
--- a/gdb/defs.h
+++ b/gdb/defs.h
@@ -434,20 +434,23 @@ enum val_prettyprint
/* Defaults for system-wide constants (if not defined by xm.h, we fake it). */
#if !defined (UINT_MAX)
-#define UINT_MAX 0xffffffff
-#endif
-
-#if !defined (LONG_MAX)
-#define LONG_MAX 0x7fffffff
+#define UINT_MAX ((unsigned int)(~0)) /* 0xFFFFFFFF for 32-bits */
#endif
#if !defined (INT_MAX)
-#define INT_MAX 0x7fffffff
+#define INT_MAX (UINT_MAX >> 1) /* 0x7FFFFFFF for 32-bits */
#endif
#if !defined (INT_MIN)
-/* Two's complement, 32 bit. */
-#define INT_MIN -0x80000000
+#define INT_MIN (-INT_MAX - 1) /* 0x80000000 for 32-bits */
+#endif
+
+#if !defined (ULONG_MAX)
+#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF for 32-bits */
+#endif
+
+#if !defined (LONG_MAX)
+#define LONG_MAX ((long)(ULONG_MAX >> 1)) /* 0x7FFFFFFF for 32-bits */
#endif
/* Number of bits in a char or unsigned char for the target machine.
@@ -722,10 +725,10 @@ qsort PARAMS ((void *base, size_t nmemb, /* 4.10.5.2 */
#ifndef MEM_FNS_DECLARED /* Some non-ANSI use void *, not char *. */
extern PTR
memcpy PARAMS ((void *, const void *, size_t)); /* 4.11.2.1 */
-#endif
extern int
memcmp PARAMS ((const void *, const void *, size_t)); /* 4.11.4.1 */
+#endif
extern char *
strchr PARAMS ((const char *, int)); /* 4.11.5.2 */