This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: patch for compiles that don't define "unix"
- To: Fernando Nasser <fnasser at redhat dot com>
- Subject: Re: patch for compiles that don't define "unix"
- From: jtc at redback dot com (J.T. Conklin)
- Date: 16 Jan 2001 14:59:37 -0800
- Cc: matthew green <mrg at cygnus dot com>, gdb-patches at sources dot redhat dot com
- References: <22097.979473536@cygnus.com> <3A61CF62.34A9FFE2@redhat.com>
- Reply-To: jtc at redback dot com
>>>>> "Fernando" == Fernando Nasser <fnasser@redhat.com> writes:
Fernando> This is not the proper fix though. The rdi-share
Fernando> subdirectory is supposed to contain code shared with ARM, so
Fernando> we shouldn't make local modifications in there (unless
Fernando> absolutely necessary).
Doesn't "sharing" imply something more than just importing third party
code? There should be a mechanism where we can at least advocate that
a change be made to shared source.
I note that there are a lot of __CYGWIN32__ conditionals. How did they
get into rdi-share? Unfortunately there is no documentation within rdi-
share that says how to obtain the master copy so I can compare, but it
ultimately doesn't matter. Either there is a mechanism to get these
changes incorporated, or the rule about making local changes is flexible.
Fernando> In this case we are better off with a more general fix that
Fernando> will solve all possible occurrences of the lack of "unix"
Fernando> problem.
While mrg came up with an alternate patch, I'm not convinced it's
better than his original. The original patch made defined __unix if
either "unix" or "__unix__" is defined. IMO, this makes a lot more
sense than the alternate solution where __unix is defined if unix is
defined in host.h, but __unix is defined if __unix__ is defined via
autoconf & makefiles.
But if you take a look at how __unix is used, you'll see that it is
used to determine whether the host is a "fairly recent" UN*X-ish host.
It's used to determine whether to use sigaction() or signal(), whether
the host has gettimeofday(), etc. IMO, these are should be replaced
by specific feature tests. I suspect that a lot of older UN*X systems
that define unix will not build rdi-share sources as is.
--jtc
--
J.T. Conklin
RedBack Networks