X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: sourceware.org Message-ID: <4B565125.9010708@cwilson.fastmail.fm> Date: Tue, 19 Jan 2010 19:41:09 -0500 From: Charles Wilson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Problem with compiling Perl Curses.pm References: <6910a61001190636y6fd704f7p57af4260f2fd31fb AT mail DOT gmail DOT com> In-Reply-To: <6910a61001190636y6fd704f7p57af4260f2fd31fb@mail.gmail.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reini Urban wrote: > Then CursesVar.c is regenerated by gen\make.CursesVar.c > It looks like this generation got triggered somehow and gets it wrong. > Because the DLL exporting part of ncurses/ncurses_dll.h does: > > /* > * For reentrant code, we map the various global variables into SCREEN by > * using functions to access them. > */ > #define NCURSES_PUBLIC_VAR(name) ncwrap_##name > #define NCURSES_WRAPPED_VAR(type,name) extern type > NCURSES_PUBLIC_VAR(name)(void) Uhm no, that's not wrong. That's correct. It's a consequence of cygwin finally moving from what upstream ncurses calls "ABI 5" to what they call "ABI 6" [*]. We now build with support for re-entrancy, which requires a few ABI changes of this sort. Which means that you really can't change the value of LINES in this way -- there may be another way, but I'm not sure what it is. Besides, I don't think changing the value of the LINES "C" variable outside of curses was ever really supposed to work. The documentation says that LINES will be "populated" by initscr() using the value of the *environment variable* LINES, or if that's empty, then it will be populated from the terminfo description. But the docs are silent as to what happens if you manually modify that "C" variable after initscr(). Anyway, I looked at the bug report thread, and I think your Tue Jan 19 11:16:23 2010 response is the correct one. You just shouldn't write to those variables, AFAICT. Maybe there is some set_FOO() function that could be used, but I don't know what it is; and for /some/ of these particular variables it just conceptually doesn't really make sense to change them once initscr() is complete. (You should be able to update COLORS and COLOR_PAIRS...I think there are accessor functions for that.) You're also right that this will affect more platforms than just cygwin, once they start enabling re-entrancy -- which is slated to be the default when ncurses-6 is released upstream. 'Course, that may not happen for a year. Or two or three. [*] cygwin *used* be be at ABI 5 -- actually, because of issues with DLLs and exported "complex" data structures in the historical absence of pseudo-reloc support, we were really using a somewhat bastardized form of ABI "5.5". Furthermore, because of certain other historical changes -- ABI jumps required by new compilers, the cygwin-1.3 to -1.5 transition, and ABI-breaking bugfixes -- our ABI "5" or "5.5" was actually cygncurses-9. Well, now, we're actually using the true upstream ABI 6. Only, we have to call it cygncurses-10. Isn't this fun? -- Chuck -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple