* RDI on OpenBSD
@ 2002-04-03 16:51 Daniel Néri
2002-04-04 1:54 ` Richard Earnshaw
0 siblings, 1 reply; 5+ messages in thread
From: Daniel Néri @ 2002-04-03 16:51 UTC (permalink / raw)
To: gdb-patches
[-- 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RDI on OpenBSD
2002-04-03 16:51 RDI on OpenBSD Daniel Néri
@ 2002-04-04 1:54 ` Richard Earnshaw
2002-04-04 2:00 ` Richard Earnshaw
0 siblings, 1 reply; 5+ messages in thread
From: Richard Earnshaw @ 2002-04-04 1:54 UTC (permalink / raw)
To: Daniel Néri; +Cc: gdb-patches, Richard.Earnshaw
/* A temporary sop to older compilers */
-#if defined (__NetBSD__) || defined (unix)
+#if defined (__unix__) || defined (unix)
# ifndef __unix /* (good for long-term portability?) */
This is wrong. NetBSD doesn't define "__unix__" or "unix". Hence the
original test.
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RDI on OpenBSD
2002-04-04 1:54 ` Richard Earnshaw
@ 2002-04-04 2:00 ` Richard Earnshaw
2002-04-04 3:03 ` Richard Earnshaw
0 siblings, 1 reply; 5+ messages in thread
From: Richard Earnshaw @ 2002-04-04 2:00 UTC (permalink / raw)
To: Daniel Néri; +Cc: gdb-patches, Richard.Earnshaw
> /* A temporary sop to older compilers */
> -#if defined (__NetBSD__) || defined (unix)
> +#if defined (__unix__) || defined (unix)
> # ifndef __unix /* (good for long-term portability?) */
>
> This is wrong. NetBSD doesn't define "__unix__" or "unix". Hence the
> original test.
Ok, forget that. The compiler defines "unix" (and hence, "__unix__"), so
that isn't a problem.
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RDI on OpenBSD
2002-04-04 2:00 ` Richard Earnshaw
@ 2002-04-04 3:03 ` Richard Earnshaw
2002-04-07 14:08 ` Daniel Néri
0 siblings, 1 reply; 5+ messages in thread
From: Richard Earnshaw @ 2002-04-04 3:03 UTC (permalink / raw)
To: Daniel Néri; +Cc: gdb-patches, Richard.Earnshaw
> > /* A temporary sop to older compilers */
> > -#if defined (__NetBSD__) || defined (unix)
> > +#if defined (__unix__) || defined (unix)
> > # ifndef __unix /* (good for long-term portability?) */
> >
> > This is wrong. NetBSD doesn't define "__unix__" or "unix". Hence the
> > original test.
>
> Ok, forget that. The compiler defines "unix" (and hence, "__unix__"), so
> that isn't a problem.
Hmm, this is getting silly :-)
It turns out that I was more right the first time, than the second.
Some NetBSD platforms (in particular, those that are ELF) do not define
either "unix" or "__unix__". So we really do need that test for
__NetBSD__ there.
R.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: RDI on OpenBSD
2002-04-04 3:03 ` Richard Earnshaw
@ 2002-04-07 14:08 ` Daniel Néri
0 siblings, 0 replies; 5+ messages in thread
From: Daniel Néri @ 2002-04-07 14:08 UTC (permalink / raw)
To: Richard.Earnshaw; +Cc: gdb-patches
Richard Earnshaw <rearnsha@arm.com> writes:
> So we really do need that test for __NetBSD__ there.
Yep, it seems you're right. Anyway, I'll be happy if either __unix__
or __OpenBSD__ gets added to the condition in question.
Regards,
--Daniel
--
Daniel Neri
dne@mayonnaise.net
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2002-04-07 21:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 16:51 RDI on OpenBSD Daniel Néri
2002-04-04 1:54 ` Richard Earnshaw
2002-04-04 2:00 ` Richard Earnshaw
2002-04-04 3:03 ` Richard Earnshaw
2002-04-07 14:08 ` Daniel Néri
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox