You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Igor Galić <i....@brainsware.org> on 2013/05/07 00:30:15 UTC

Re: git commit: Try to fix Solaris wclear macro build breakage


----- Original Message -----
> Updated Branches:
>   refs/heads/master c4815b077 -> da413c514
> 
> 
> Try to fix Solaris wclear macro build breakage
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
> Commit:
> http://git-wip-us.apache.org/repos/asf/trafficserver/commit/da413c51
> Tree:
> http://git-wip-us.apache.org/repos/asf/trafficserver/tree/da413c51
> Diff:
> http://git-wip-us.apache.org/repos/asf/trafficserver/diff/da413c51
> 
> Branch: refs/heads/master
> Commit: da413c5140e33d52866f64757c374257116548ab
> Parents: c4815b0
> Author: James Peach <jp...@apache.org>
> Authored: Mon May 6 14:56:23 2013 -0700
> Committer: James Peach <jp...@apache.org>
> Committed: Mon May 6 14:56:23 2013 -0700
> 
> ----------------------------------------------------------------------
>  tools/tstop/tstop.cc |    5 +++++
>  1 files changed, 5 insertions(+), 0 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/da413c51/tools/tstop/tstop.cc
> ----------------------------------------------------------------------
> diff --git a/tools/tstop/tstop.cc b/tools/tstop/tstop.cc
> index 7828c61..0626764 100644
> --- a/tools/tstop/tstop.cc
> +++ b/tools/tstop/tstop.cc
> @@ -46,6 +46,11 @@
>  #  error "SysV or X/Open-compatible Curses header file required"
>  #endif
>  
> +// Solaris curses #defines wclear, which breaks
> std::string::wclear().
> +#ifndef wclear
> +#undef wclear
> +#endif
> +
>  #include "stats.h"
>  
>  using namespace std;
> 
> 

should(n't) this be in ink_defs.h?

-- 
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: i.galic@brainsware.org
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE


Re: git commit: Try to fix Solaris wclear macro build breakage

Posted by James Peach <jp...@apache.org>.
On May 8, 2013, at 7:08 AM, Leif Hedstrom <zw...@apache.org> wrote:

> On 5/7/13 4:18 AM, Daniel Gruno wrote:
>> 
>> Nah it's too ugly for that ... and of course I spelled "ifdef" wrong :(
>> 
>> J
>> 
>> Isn't the real problem that curses.h defines clear as wclear??
>> std::string has no such thing as wclear as far as I can tell, but it
>> does have a clear() function, which curses.h steals:
>> 
>> curses.h:#define clear()                   wclear(stdscr)
>> 
> 
> 
> I could have sworn I tried the #undef clear path, but it broke ncurses later. Maybe you can restore the clear after calling the std::string clear? Or, maybe I was just smoking crack.

The fix was #define NOMACROS. The trick part was figuring out which curses.h we were using and what the right macro for that was.


> I have another fix for Solaris / FreeBSD, to get jtest to compile properly, will commit it as soon as I get to civilized networks.
> 
> -- Leif
> 


Re: git commit: Try to fix Solaris wclear macro build breakage

Posted by Leif Hedstrom <zw...@apache.org>.
On 5/7/13 4:18 AM, Daniel Gruno wrote:
>
> Nah it's too ugly for that ... and of course I spelled "ifdef" wrong :(
>
> J
>
> Isn't the real problem that curses.h defines clear as wclear??
> std::string has no such thing as wclear as far as I can tell, but it
> does have a clear() function, which curses.h steals:
>
> curses.h:#define clear()                   wclear(stdscr)
>


I could have sworn I tried the #undef clear path, but it broke ncurses 
later. Maybe you can restore the clear after calling the std::string 
clear? Or, maybe I was just smoking crack.

I have another fix for Solaris / FreeBSD, to get jtest to compile 
properly, will commit it as soon as I get to civilized networks.

-- Leif


Re: git commit: Try to fix Solaris wclear macro build breakage

Posted by Leif Hedstrom <zw...@apple.com>.
On 5/7/13 4:18 AM, Daniel Gruno wrote:
> On 05/07/2013 05:37 AM, James Peach wrote:
>> On May 6, 2013, at 3:30 PM, Igor Galić <i....@brainsware.org> wrote:
>>
>>>
>>> ----- Original Message -----
>>>> Updated Branches:
>>>>   refs/heads/master c4815b077 -> da413c514
>>>>
>>>>
>>>> Try to fix Solaris wclear macro build breakage
>>>>
>>>>
>>>> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
>>>> Commit:
>>>> http://git-wip-us.apache.org/repos/asf/trafficserver/commit/da413c51
>>>> Tree:
>>>> http://git-wip-us.apache.org/repos/asf/trafficserver/tree/da413c51
>>>> Diff:
>>>> http://git-wip-us.apache.org/repos/asf/trafficserver/diff/da413c51
>>>>
>>>> Branch: refs/heads/master
>>>> Commit: da413c5140e33d52866f64757c374257116548ab
>>>> Parents: c4815b0
>>>> Author: James Peach <jp...@apache.org>
>>>> Authored: Mon May 6 14:56:23 2013 -0700
>>>> Committer: James Peach <jp...@apache.org>
>>>> Committed: Mon May 6 14:56:23 2013 -0700
>>>>
>>>> ----------------------------------------------------------------------
>>>> tools/tstop/tstop.cc |    5 +++++
>>>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>>> ----------------------------------------------------------------------
>>>>
>>>>
>>>> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/da413c51/tools/tstop/tstop.cc
>>>> ----------------------------------------------------------------------
>>>> diff --git a/tools/tstop/tstop.cc b/tools/tstop/tstop.cc
>>>> index 7828c61..0626764 100644
>>>> --- a/tools/tstop/tstop.cc
>>>> +++ b/tools/tstop/tstop.cc
>>>> @@ -46,6 +46,11 @@
>>>> #  error "SysV or X/Open-compatible Curses header file required"
>>>> #endif
>>>>
>>>> +// Solaris curses #defines wclear, which breaks
>>>> std::string::wclear().
>>>> +#ifndef wclear
>>>> +#undef wclear
>>>> +#endif
>>>> +
>>>> #include "stats.h"
>>>>
>>>> using namespace std;
>>>>
>>>>
>>> should(n't) this be in ink_defs.h?
>> Nah it's too ugly for that ... and of course I spelled "ifdef" wrong :(
>>
>> J
>>
> Isn't the real problem that curses.h defines clear as wclear??
> std::string has no such thing as wclear as far as I can tell, but it
> does have a clear() function, which curses.h steals:
>
> curses.h:#define clear()                   wclear(stdscr)


I could have sworn I tried the #undef clear , but it broke things in 
curses later. So you might have to "redo" the #define after calling the 
std::string clear? But, I might also have been smoking crack.

-- Leif


Re: git commit: Try to fix Solaris wclear macro build breakage

Posted by Daniel Gruno <ru...@cord.dk>.
On 05/07/2013 05:37 AM, James Peach wrote:
> On May 6, 2013, at 3:30 PM, Igor Galić <i....@brainsware.org> wrote:
> 
>>
>>
>> ----- Original Message -----
>>> Updated Branches:
>>>  refs/heads/master c4815b077 -> da413c514
>>>
>>>
>>> Try to fix Solaris wclear macro build breakage
>>>
>>>
>>> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
>>> Commit:
>>> http://git-wip-us.apache.org/repos/asf/trafficserver/commit/da413c51
>>> Tree:
>>> http://git-wip-us.apache.org/repos/asf/trafficserver/tree/da413c51
>>> Diff:
>>> http://git-wip-us.apache.org/repos/asf/trafficserver/diff/da413c51
>>>
>>> Branch: refs/heads/master
>>> Commit: da413c5140e33d52866f64757c374257116548ab
>>> Parents: c4815b0
>>> Author: James Peach <jp...@apache.org>
>>> Authored: Mon May 6 14:56:23 2013 -0700
>>> Committer: James Peach <jp...@apache.org>
>>> Committed: Mon May 6 14:56:23 2013 -0700
>>>
>>> ----------------------------------------------------------------------
>>> tools/tstop/tstop.cc |    5 +++++
>>> 1 files changed, 5 insertions(+), 0 deletions(-)
>>> ----------------------------------------------------------------------
>>>
>>>
>>> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/da413c51/tools/tstop/tstop.cc
>>> ----------------------------------------------------------------------
>>> diff --git a/tools/tstop/tstop.cc b/tools/tstop/tstop.cc
>>> index 7828c61..0626764 100644
>>> --- a/tools/tstop/tstop.cc
>>> +++ b/tools/tstop/tstop.cc
>>> @@ -46,6 +46,11 @@
>>> #  error "SysV or X/Open-compatible Curses header file required"
>>> #endif
>>>
>>> +// Solaris curses #defines wclear, which breaks
>>> std::string::wclear().
>>> +#ifndef wclear
>>> +#undef wclear
>>> +#endif
>>> +
>>> #include "stats.h"
>>>
>>> using namespace std;
>>>
>>>
>>
>> should(n't) this be in ink_defs.h?
> 
> Nah it's too ugly for that ... and of course I spelled "ifdef" wrong :(
> 
> J
> 
Isn't the real problem that curses.h defines clear as wclear??
std::string has no such thing as wclear as far as I can tell, but it
does have a clear() function, which curses.h steals:

curses.h:#define clear()                   wclear(stdscr)

Just my two cents.

With regards,
Daniel.

Re: git commit: Try to fix Solaris wclear macro build breakage

Posted by James Peach <ja...@me.com>.
On May 6, 2013, at 3:30 PM, Igor Galić <i....@brainsware.org> wrote:

> 
> 
> ----- Original Message -----
>> Updated Branches:
>>  refs/heads/master c4815b077 -> da413c514
>> 
>> 
>> Try to fix Solaris wclear macro build breakage
>> 
>> 
>> Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
>> Commit:
>> http://git-wip-us.apache.org/repos/asf/trafficserver/commit/da413c51
>> Tree:
>> http://git-wip-us.apache.org/repos/asf/trafficserver/tree/da413c51
>> Diff:
>> http://git-wip-us.apache.org/repos/asf/trafficserver/diff/da413c51
>> 
>> Branch: refs/heads/master
>> Commit: da413c5140e33d52866f64757c374257116548ab
>> Parents: c4815b0
>> Author: James Peach <jp...@apache.org>
>> Authored: Mon May 6 14:56:23 2013 -0700
>> Committer: James Peach <jp...@apache.org>
>> Committed: Mon May 6 14:56:23 2013 -0700
>> 
>> ----------------------------------------------------------------------
>> tools/tstop/tstop.cc |    5 +++++
>> 1 files changed, 5 insertions(+), 0 deletions(-)
>> ----------------------------------------------------------------------
>> 
>> 
>> http://git-wip-us.apache.org/repos/asf/trafficserver/blob/da413c51/tools/tstop/tstop.cc
>> ----------------------------------------------------------------------
>> diff --git a/tools/tstop/tstop.cc b/tools/tstop/tstop.cc
>> index 7828c61..0626764 100644
>> --- a/tools/tstop/tstop.cc
>> +++ b/tools/tstop/tstop.cc
>> @@ -46,6 +46,11 @@
>> #  error "SysV or X/Open-compatible Curses header file required"
>> #endif
>> 
>> +// Solaris curses #defines wclear, which breaks
>> std::string::wclear().
>> +#ifndef wclear
>> +#undef wclear
>> +#endif
>> +
>> #include "stats.h"
>> 
>> using namespace std;
>> 
>> 
> 
> should(n't) this be in ink_defs.h?

Nah it's too ugly for that ... and of course I spelled "ifdef" wrong :(

J