help-nano
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-nano] Problems compiling nano 2.2.3 in Cygwin


From: Chris Allegretta
Subject: Re: [Help-nano] Problems compiling nano 2.2.3 in Cygwin
Date: Wed, 24 Feb 2010 11:32:31 -0500

Hi Eric,

You seem a little on the defensive, you are welcome to ask for help
with compiling nano on nano's help mailing list :-)

It looks like someone else ran into this exact same problem and filed
Savannah bug 28984 (we track our bugs over at Savannah).  As the
submitted points out, LINES and COLS may be macros, but I believe we
were seeing issues where they were not being updated when the SIGWINCH
signal (which is sent when the terminal window is resized) was being
received.  It's not immediately clear to me if this mean that nano
will be unable to be resized under cygwin if these lines are disabled;
only one way to find out.

There are a couple workaround; the easy fix is to add an #ifdef for
some macro that the cygwin compiler sets (__CYGWIN__ or CYGWIN come to
mind). Alternatively I can add a check to the configure.ac script to
check whether LINES and COLS are indeed not lvalues in the
implementation and find another way around the issue if so.  If you
just need to get nano compiled ASAP you can just comment out those two
lines and deal with remaining issues.  Otherwise I'll have a look at
this issue when I have a few minutes, which should be this weekend.

Thanks much!

On Wed, Feb 24, 2010 at 11:21 AM, Eric Oliver <address@hidden> wrote:
> Hello,
>
>                 I’m attempting to compile and run nano under cygwin.  You
> may ask, why not ask the folks over at cygwin’s support.  Well I don’t
> expect anyone to fix this problem for me but I’m looking for more
> information on what is troubling the compilation so I can take this
> information to cygwin’s support.  I’ve been taking notes on the errors and
> other things of interest.  I would like some help filling in the gaps.  From
> what I understand this happens in a function that deals with the resizing of
> windows down two variables that won’t seem to take assignments.
>
>
>
>
>
> ERROR
>
> -----
>
> nano.c In fucntion 'handle_sigwinch':
>
>
>
> nano.c:1267: error: lvalue required as left operand of assignment
>
> nano.c:1268: error: lvalue required as left operand of assignment
>
> make[1]: *** [nano.o] Error 1
>
> make[1]: Leaving directory '/tmp/nano-2.2.3/src'
>
> make: *** [install-recursive] Error 1
>
> ---------------------------------------------------------------
>
>
>
> offending lines are:
>
>
>
> COLS = win.ws_col;
>
> LINES = win.ws_row;
>
>
>
> Why does it appear that win.ws_col and win.ws_row appear only in
>
>  one place and NOWHERE else?
>
>
>
> The comments say that the variables COLS and LINES "are curses global
>
> variables, and in some cases curses has already updated them. But not in
>
> all cases. Argh." What does this mean for me to port this to cygwin?
>
>
>
> What is an lvalue?
>
> ------------------
>
> An lvalue is an expression to which a value can be assigned. The lvalue
>
> expression is located on the left side of an assignment statement,
>
> whereas an rvalue is located on the right side of an assignment
>
> statement. Each assignment statement must have an lvalue and an rvalue.
>
> the lvalue expression must reference a storable variable in memory. It
>
> cannot be constant.
>
> ------------------------------------------------------------------------
>
>
>
> So does this imply that COLS and LINES are not seen as storable
>
> variables in memory?  How do I go about making them so... Why is this
>
> even happening? I've verified that I do have slcurses.h ncurses.h and
> curses.h
>
> all are in /usr/include/ folder.
>
>
>
>
>
> Thank you very much!
>
> _______________________________________________
> Help-nano mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-nano
>
>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]