patch for compiles that don't define "unix"

J.T. Conklin jtc@redback.com
Tue Jan 16 14:59:00 GMT 2001


>>>>> "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


More information about the Gdb-patches mailing list