Subject: Re: adding TOOL_SED
To: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-toolchain
Date: 06/19/2006 07:56:05
Izumi Tsutsui wrote:
> garrett_damore@tadpole.com wrote:
>
>   
>> 1) should I commit this, or does someone want to review diffs first? 
>> (and if so, who?)
>>     
>
> Posting diffs here is good enough, I think.
> (lukem is one of toolchain guys, but if no one responds it you could say
>  "I'll commit it in the next week if there is no objection" or so.)
>   

I had some conversation with others, including phone, that indicated to
me that just committing should be okay.  This occurred after no other
response for ~24 hours.

>   
>> 2) sed wants to be able to use TIOCGWINSIZE to get the window size.  Of
>> course, the struct winsize is not in the same place on all OS'.  I don't
>> think this is useful for cross-compiling, and I've just wrapped the code
>> with #ifndef HAVE_NBTOOL_CONFIG_H.   Is this acceptable, or should I go
>> and add the brains to configure.ac to actually figure out if the struct
>> is there and if so in which header?
>>     
>
> It's acceptable for me to disable unused functions during build,
> but it's better to use HOST_CPPFLAGS in src/tools/sed/Makefile
> to define some appropriate macro like NO_WINSIZE as tools/sunlabel
> does, rather than #ifndef HAVE_NBTOOLS_CONFIG_H.
>   

I'm not sure I agree with this.  The problem is to do this "properly",
what I should do is add something to configure.ac to test for this. 
Since we don't need it during cross-build, the informal consensus I
received (granted, from a small sample set) was that it was okay to just
turn that code off during cross building.

HAVE_NBTOOL_CONFIG_H is the easiest way to know that you are building
cross- tools, so that's what I used.

If anyone else feels more strongly about this, I (or they) can certainly
change it, since what I did has been committed to -current for a couple
of days now. :-)

    -- Garrett
> ---
> Izumi Tsutsui
>   


-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191