Mon 22 Feb 2010 10:06:43 PM UTC, original submission:
Hi, I tried to compile nano configured with --enable-utf8 on Cygwin 1.7.1, and got a couple of errors. This is with ncursesw 5.7 and gcc 4.3.4, on nano trunk.
First issue:
gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -DSYSCONFDIR=\"/usr/local/etc\" -I/usr/include/ncursesw -g -O2 -MT nano.o -MD -MP -MF .deps/nano.Tpo -c -o nano.o ../../src/nano.c
../../src/nano.c: In function ‘handle_sigwinch’:
../../src/nano.c:1266: error: lvalue required as left operand of assignment
../../src/nano.c:1267: error: lvalue required as left operand of assignment
This concerns these lines:
/* We could check whether the COLS or LINES changed, and return
* otherwise. However, COLS and LINES are curses global variables,
* and in some cases curses has already updated them. But not in
* all cases. Argh. */
COLS = win.ws_col;
LINES = win.ws_row;
COLS and LINES are actually defined as macros that expand to function calls in curses.h, hence the errors. Removing them makes it compile and resizes seem to work ok, but of course I don't know what cases the comment refers to. Perhaps resizeterm() or is_term_resized() would be useful here?
Second issue:
gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -DLOCALEDIR=\"/usr/local/share/locale\" -DSYSCONFDIR=\"/usr/local/etc\" -I/usr/include/ncursesw -g -O2 -MT winio.o -MD -MP -MF .deps/winio.Tpo -c -o winio.o ../../src/winio.c
../../src/winio.c: In function ‘get_mouseinput’:
../../src/winio.c:1749: warning: passing argument 1 of ‘sc_seq_or’ makes integer from pointer without a cast
../../src/winio.c:1749: error: expected ‘)’ before ‘;’ token
This is due to a stray semicolon.
|