RDI on OpenBSD

Daniel Néri
2002-04-04T00:51:39Z

[-- Attachment #1: Type: text/plain, Size: 261 bytes --]

Hello,

Building an arm-elf cross-debugging gdb 5.1.1 on OpenBSD breaks
because of the "unix vs. __unix__ issue". This, I note, has been
discussed before, but the fix ended up being NetBSD specific. Attached
are my changes.

Best wishes,
--Daniel

[-- Attachment #2: ChangeLog --]
[-- Type: text/plain, Size: 208 bytes --]

2002-04-04 Daniel NÃ©ri <dne@mayonnaise.net>

* hostchan.h (__unix): Define when __unix__ (e.g. works on
OpenBSD too).
* unixcomm.c: Provide default serial/parallel device names for
OpenBSD and NetBSD.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: RDI patch --]
[-- Type: text/x-patch, Size: 1076 bytes --]

diff -u -r1.1 gdb/rdi-share/hostchan.h
--- gdb/rdi-share/hostchan.h 2002/04/03 01:32:26 1.1
+++ gdb/rdi-share/hostchan.h 2002/04/04 00:04:51
@@ -24,7 +24,7 @@
#endif

/* A temporary sop to older compilers */
-#if defined (__NetBSD__) || defined (unix)
+#if defined (__unix__) || defined (unix)
# ifndef __unix /* (good for long-term portability?) */
# define __unix 1
# endif
diff -u -r1.1 gdb/rdi-share/unixcomm.c
--- gdb/rdi-share/unixcomm.c 2002/04/03 21:59:45 1.1
+++ gdb/rdi-share/unixcomm.c 2002/04/04 00:02:39
@@ -94,6 +94,22 @@
#define SERPORT2 "/dev/ttyS1"
#define PARPORT1 "/dev/par0"
#define PARPORT2 "/dev/par1"
+#endif
+
+#ifdef __OpenBSD__
+#define SERIAL_PREFIX "/dev/cua"
+#define SERPORT1 "/dev/cua00"
+#define SERPORT2 "/dev/cua01"
+#define PARPORT1 "/dev/lpt0"
+#define PARPORT2 "/dev/lpt1"
+#endif
+
+#ifdef __NetBSD__
+#define SERIAL_PREFIX "/dev/dty"
+#define SERPORT1 "/dev/dty00"
+#define SERPORT2 "/dev/dty01"
+#define PARPORT1 "/dev/lpt0"
+#define PARPORT2 "/dev/lpt1"
#endif

[-- Attachment #4: Type: text/plain, Size: 36 bytes --]

--
Daniel Neri
dne@mayonnaise.net