This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: patch for compiles that don't define "unix"


"J.T. Conklin" wrote:
> 
> >>>>> "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.
> 

The idea is that this code is the same that is used in the ARM tools.
They were supposed to be sending us newer versions of it.
And we should be able to send fixes if we find bugs.
We have been trying to get a new version (unsuccessifuly until now,
but we keep trying).

Changes end up being made to this code.  We even added some logging
features (written by Grant) so that we can debug it.  I keep the 
patches in my disk in case the new version (if we ever get it) still
does not have something for logging that we can use.

The Cygwin changes are old and I guess were unavoidable, so we will have to
deal with any and each of them.  But the less we change the less work it
will be to get the newer rdi-shared.


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

I guess I was misunderstood on this one.  I didn't want to imply "what"
to test, but "where" to test.  I may have worded it badly and Matthew change
it because of what I said.

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

I agree that this should be the way things like this are done.  
But we would have to go and change the ARM code everywhere.  
It would be a pain to merge this.


-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]