Hallo,
I'm running make check right now and I'm getting a problem with crtc.c. Several hundred lines warnings and errors, in several tests. E.g. the last lines: ... .../gcc/p/units/crtc.c: In function `crt_GetShiftState': .../gcc/p/units/crtc.c:894: warning: implicit declaration of function `PDC_get_key_modifiers' .../gcc/p/units/crtc.c:895: error: `PDC_KEY_MODIFIER_SHIFT' undeclared (first use in this function) .../gcc/p/units/crtc.c:895: error: (Each undeclared identifier is reported only once .../gcc/p/units/crtc.c:895: error: for each function it appears in.) .../gcc/p/units/crtc.c:896: error: `PDC_KEY_MODIFIER_CONTROL' undeclared (first use in this function) .../gcc/p/units/crtc.c:897: error: `PDC_KEY_MODIFIER_ALT' undeclared (first use in this function) .../gcc/p/units/crtc.c:902: error: `PDC_KEY_MODIFIER_NUMLOCK' undeclared (first use in this function) .../gcc/p/units/crtc.c: In function `crt_RawOut': .../gcc/p/units/crtc.c:1571: warning: implicit declaration of function `raw_output' .../gcc/p/units/crtc.c: In function `crt_Init': .../gcc/p/units/crtc.c:1649: warning: implicit declaration of function `PDC_save_key_modifiers' .../gcc/p/units/crtc.c: In function `adjust_panel': .../gcc/p/units/crtc.c:1846: warning: implicit declaration of function `resize_window' .../gcc/p/units/crtc.c:1846: warning: assignment makes pointer from integer without a cast .../gcc/p/units/crtc.c: In function `crt_Check_WinChanged': .../gcc/p/units/crtc.c:1866: warning: implicit declaration of function `is_termresized' .../gcc/p/units/crtc.c:1881: error: structure has no member named `wendy' .../gcc/p/units/crtc.c:1882: error: structure has no member named `wendx'
The failing tests (all because of crtc.c) so far are:
TEST aturbo3test.pas: TEST crttest.pas: TEST dialec3.pas: TEST dialec5.pas: TEST dialec6.pas: TEST dialec7.pas:
Is there something known to do about this?
Thanks, Gerrit
Gerrit P. Haase wrote:
I'm running make check right now and I'm getting a problem with crtc.c. Several hundred lines warnings and errors, in several tests. E.g. the last lines:
As a general rule, the first lines of errors (from the failed command) are usually more important, since the cascading errors may just be consequences of the first.
In this case, I suppose you don't have PDCurses installed (you can get it under "Libraries" on our web site). Unfortunately (IMHO) GCC continues even if the #included curses.h is not found, resulting of course in a lot of missing declarations and "hiding" the real problem ...
If you have ncurses installed instead, define `USE_NCURSES'. Perhaps we should try to automate this in test/units.cmp (but it's not easy for me to test it).
Frank
Hallo Frank,
Ok, my first patch.
There is no PDCurses for Cygwin (not that I know of) but ncurses is in the Cygwin packages netrelease included:
$ diff -urd p/units/crt.inc~ p/units/crt.inc --- p/units/crt.inc~ 2003-10-07 22:56:39.884168000 +0200 +++ p/units/crt.inc 2003-10-07 22:56:45.512260800 +0200 @@ -449,7 +449,7 @@ #define X11 #endif #if !defined (USE_PDCURSES) && !defined (USE_NCURSES) -#if defined (MSDOS) || defined (_WIN32) || defined (__CYGWIN__) || defined (__EMX__) || defined (XCURSES) +#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__) || defined (XCURSES) && !defined(__CYGWIN__) #define USE_PDCURSES #else #define USE_NCURSES
# END
Gerrit
On 7 Oct 2003 at 22:59, Gerrit P. Haase wrote:
Hallo Frank,
Ok, my first patch.
There is no PDCurses for Cygwin (not that I know of)
[...]
There are Cygwin PDCurses binaries on the gpc website. They are old (v2.4, I think). I have binaries for v2.6. If anyone is interested, I can put them on the gpc website - but that will have to be during the coming weekend ...
That being said, it is quite straightforward to build PDCurses for Cygwin and Mingw.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Hallo Prof,
Am Dienstag, 7. Oktober 2003 um 23:12 schriebst du:
On 7 Oct 2003 at 22:59, Gerrit P. Haase wrote:
There is no PDCurses for Cygwin (not that I know of)
[...]
There are Cygwin PDCurses binaries on the gpc website. They are old (v2.4, I think). I have binaries for v2.6. If anyone is interested, I can put them on the gpc website - but that will have to be during the coming weekend ...
Would be better to include them in the netrelease. You'll just have to maintain it. That means: monitor the cygwin list, act like a maintainer if there are bugs reported (push bugreports or fixes upstream, fix cygwin related bugs etc.).
That being said, it is quite straightforward to build PDCurses for Cygwin and Mingw.
Then there should be an option for the user to decide whether she wants to use PD- or Ncurses.
Gerrit
Gerrit P. Haase wrote:
That being said, it is quite straightforward to build PDCurses for Cygwin and Mingw.
Then there should be an option for the user to decide whether she wants to use PD- or Ncurses.
Well, this option is just `USE_NCURSES'/`USE_PDCURSES' which I mentioned.
So, what your patch does is just to change the default under Cygwin from PDCurses to ncurses. I'd accept it if it's widely preferred (by Cygwin/GPC users), and/or ncurses is objectively better than PDCurses under Cygwin (less bugs, better performance, better support of special features, see comment in crt.pas, etc.).
I'll wait to hear of such preferences or evidence until I change anything.
What I meant in a previous mail is to automate this setting in the test suite. The affected test programs use a "curses detection" script, anyway, so it could set the respective flag. This will take a little effort (but probably not too much) in the scripts (crt.cmp etc.). Then at least the tests would work regardless of the default setting.
(BTW, your patch has a little problem: Due to the higher precedence of `&&' vs. `||' the `__CYGWIN__' test would only refer to `XCURSES'. And in fact the `&& !defined(__CYGWIN__)' is redundant since none of the other symbols should be defined on Cygwin, anyway.)
--- p/units/crt.inc~ 2003-10-07 22:56:39.884168000 +0200 +++ p/units/crt.inc 2003-10-07 22:56:45.512260800 +0200 @@ -449,7 +449,7 @@ #define X11 #endif #if !defined (USE_PDCURSES) && !defined (USE_NCURSES) -#if defined (MSDOS) || defined (_WIN32) || defined (__CYGWIN__) || defined (__EMX__) || defined (XCURSES) +#if defined (MSDOS) || defined (_WIN32) || defined (__EMX__) || defined (XCURSES) && !defined(__CYGWIN__) #define USE_PDCURSES #else #define USE_NCURSES
Frank
Hallo Frank,
Am Freitag, 10. Oktober 2003 um 01:13 schriebst du:
Gerrit P. Haase wrote:
That being said, it is quite straightforward to build PDCurses for Cygwin and Mingw.
Then there should be an option for the user to decide whether she wants to use PD- or Ncurses.
Well, this option is just `USE_NCURSES'/`USE_PDCURSES' which I mentioned.
So, what your patch does is just to change the default under Cygwin from PDCurses to ncurses. I'd accept it if it's widely preferred (by Cygwin/GPC users), and/or ncurses is objectively better than PDCurses under Cygwin (less bugs, better performance, better support of special features, see comment in crt.pas, etc.).
It is included in the netrelease and distributed through the mirrors. But wait until I finished the build and have the testsummary.
I'll wait to hear of such preferences or evidence until I change anything.
See above.
What I meant in a previous mail is to automate this setting in the test suite. The affected test programs use a "curses detection" script, anyway, so it could set the respective flag. This will take a little effort (but probably not too much) in the scripts (crt.cmp etc.). Then at least the tests would work regardless of the default setting.
(BTW, your patch has a little problem: Due to the higher precedence of `&&' vs. `||' the `__CYGWIN__' test would only refer to `XCURSES'. And in fact the `&& !defined(__CYGWIN__)' is redundant since none of the other symbols should be defined on Cygwin, anyway.)
Yes of course, but we need to be sure, sometimes some weird things happen here on cygwin and suddenly you have defined WIN32 and don't know about it. We make it always bulletproof, that is: never trust the user and never define WIN32 && CYGWIN together or always use WIN32 and __CYGWIN__ exclusively.
Gerrit
On 7 Oct 2003 at 8:16, Gerrit P. Haase wrote:
Hallo,
I'm running make check right now and I'm getting a problem with crtc.c. Several hundred lines warnings and errors, in several tests. E.g. the last lines: ... .../gcc/p/units/crtc.c: In function `crt_GetShiftState': .../gcc/p/units/crtc.c:894: warning: implicit declaration of function `PDC_get_key_modifiers' .../gcc/p/units/crtc.c:895: error: `PDC_KEY_MODIFIER_SHIFT' undeclared (first use in this function) .../gcc/p/units/crtc.c:895: error: (Each undeclared identifier is reported only once .../gcc/p/units/crtc.c:895: error: for each function it appears in.) .../gcc/p/units/crtc.c:896:
[...]
I remember having seen this problem before, but I can't remember how I solved it. I suspect that it is an ncurses problem (I had all sorts of problems with Cygwin ncurses, which I eventually dumped in favour of PDCurses). My conclusion was that ncurses is broken under Cygwin. Perhaps that is still the case.
Try PDCurses (pass "-DUSE_PDCURSES" at the command line) and see whether you still get the same problem. Running the testsuite, I don't get any of these problems that you report. If you reverse your patch to use ncurses, you may well find that this is the case as well.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
On 7 Oct 2003 at 8:16, Gerrit P. Haase wrote:
I'm running make check right now and I'm getting a problem with crtc.c. Several hundred lines warnings and errors, in several tests. E.g. the last lines: ... .../gcc/p/units/crtc.c: In function `crt_GetShiftState': .../gcc/p/units/crtc.c:894: warning: implicit declaration of function `PDC_get_key_modifiers' .../gcc/p/units/crtc.c:895: error: `PDC_KEY_MODIFIER_SHIFT' undeclared (first use in this function) .../gcc/p/units/crtc.c:895: error: (Each undeclared identifier is reported only once .../gcc/p/units/crtc.c:895: error: for each function it appears in.) .../gcc/p/units/crtc.c:896:
[...]
I remember having seen this problem before, but I can't remember how I solved it. I suspect that it is an ncurses problem (I had all sorts of problems with Cygwin ncurses, which I eventually dumped in favour of PDCurses). My conclusion was that ncurses is broken under Cygwin.
I don't think so. The offending block is enclosed in `#ifdef USE_PDCURSES', so this "cannot" happen unless `USE_PDCURSES' is defined and ncurses used -- which in turn should not happen unless you define both `USE_PDCURSES' and `USE_NCURSES' explicitly (which is nonsense, of course), since crtc.h sets one of these only if none was already set.
Gerrit's problem may just be that it tried to use PDCurses (by default) which wasn't installed, but if you, Chief, have PDCurses installed, I'm surprised if you get such an error ...
Frank
On 10 Oct 2003 at 22:01, Frank Heckenbach wrote:
[...]
I remember having seen this problem before, but I can't remember how I solved it. I suspect that it is an ncurses problem (I had all sorts of problems with Cygwin ncurses, which I eventually dumped in favour of PDCurses). My conclusion was that ncurses is broken under Cygwin.
I don't think so. The offending block is enclosed in `#ifdef USE_PDCURSES', so this "cannot" happen unless `USE_PDCURSES' is defined and ncurses used -- which in turn should not happen unless you define both `USE_PDCURSES' and `USE_NCURSES' explicitly (which is nonsense, of course), since crtc.h sets one of these only if none was already set.
Gerrit's problem may just be that it tried to use PDCurses (by default) which wasn't installed, but if you, Chief, have PDCurses installed, I'm surprised if you get such an error ...
No, I don't get such an error. But if you remember, I had lots of problems with ncurses under Cygwin (this is quite a while ago now - probably 2 years or more). Since I discovered PDCurses, I have not bothered with ncurses again. Perhaps ncurses is fixed under Cygwin now. I personally won't bother to find out. Perhaps Gerrit's problem may be solved if the correct curses library is called - or perhaps not. I know for certain that there is no problem with GPC and PDCurses under Cygwin and Mingw. As for ncurses, I am sure Gerrit will let us know in due course ;)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/