Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't compile on Cygwin windows #13

Open
duckpuppy opened this issue Nov 6, 2012 · 4 comments
Open

Can't compile on Cygwin windows #13

duckpuppy opened this issue Nov 6, 2012 · 4 comments
Labels

Comments

@duckpuppy
Copy link

In the ncurses_init method in tasknc.c, there's an attempt to assign to stdscr:

if ((stdscr = initscr()) == NULL )

This won't work, as stdscr is #defined to a function in the current ncurses implementation in Cygwin, which is not a valid lvalue (and the resulting error is a complaint that the left side of an assignment is not an lvalue).

@mjheagle8
Copy link
Collaborator

Hi,
At the moment, I cannot test in cygwin. Hopefully I will be able to soon.
Would you be able to create a patch that would fix this?
Thanks for trying tasknc!
-mjheagle
On Nov 6, 2012 3:36 PM, "Patrick Aikens" [email protected] wrote:

In the ncurses_init method in tasknc.c, there's an attempt to assign to
stdscr:

if ((stdscr = initscr()) == NULL )

This won't work, as stdscr is #defined to a function in the current
ncurses implementation in Cygwin, which is not a valid lvalue (and the
resulting error is a complaint that the left side of an assignment is not
an lvalue).


Reply to this email directly or view it on GitHubhttps://github.com//issues/13.

@realchrisolin
Copy link

I was able to fix this in Cygwin by simply changing the variable name and declaring it. I want to test these changes on my laptop running Arch Linux first before submitting a patch (I want to make sure this doesn't unintentionally break something else on a non-Cygwin system, but I doubt it will).

In the meantime, git diff between my local branch and the remote branch is below:

diff --git a/src/tasknc.c b/src/tasknc.c
index d0c83bd..0f1479b 100644
--- a/src/tasknc.c
+++ b/src/tasknc.c
@@ -590,8 +590,8 @@ void ncurses_init() /* {{{ */

        /* initialize screen */
        tnc_fprintf(stdout, LOG_DEBUG, "starting ncurses...");
-       stdscr = initscr();
-       if (stdscr == NULL )
+       int stdscrn = initscr();
+       if (stdscrn == NULL )
        {
            fprintf(stderr, "Error initialising ncurses.\n");
            exit(EXIT_FAILURE);

@realchrisolin
Copy link

I take this back. It will compile successfully, but the program itself isn't working. It keeps 'ending abnormally'. I think this is happening somewhere in configure().

I'll try to keep working on this and if I can fix it, I'll submit a patch.

@lharding
Copy link
Owner

lharding commented Oct 5, 2015

With mjheagle8's blessing, I'm taking over maintenance of this project. If you still care about this issue, please reopen it over at my fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants