macOS compilation error

macOS compilation error

From: Kevin Sjöberg
To: list
I just tried to build the latest version (commit c273621244156b351468e3c928387166b24f5ff4) of catgirl on macOS but the compilation failed. Unfortunately, I was greeted with the following error.

ui.c:160:7: error: implicit declaration of function 'tiparm' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        putp(tiparm(to_status_line, 0));
             ^
ui.c:160:7: note: did you mean 'tparm'?
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/curses.h:802:31: note: 'tparm' declared here
extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);        /* special */
                              ^
ui.c:160:7: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
        putp(tiparm(to_status_line, 0));
             ^~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/curses.h:799:46: note: passing argument to parameter here
extern NCURSES_EXPORT(int) putp (const char *);                         /* implemented */
                                             ^
1 warning and 1 error generated.

This is running macOS 12.4 using Apple clang version 13.1.6. I've managed to compile catgirl in the past, so I assume this is a regression introduced in 563ac9e. Looking at the curs_terminfo man page, it looks like only tparm is present and the newer form is not.

Thanks,
Kevin

macOS compilation error

From: Kevin Sjöberg

> Begin forwarded message:
> 
> From: Kevin Sjöberg <mail@kevinsjoberg.com>
> Subject: macOS compilation error
> Date: 17 August 2022 at 15:30:31 CEST
> To: list@causal.agency
> 
> I just tried to build the latest version (commit c273621244156b351468e3c928387166b24f5ff4) of catgirl on macOS but the compilation failed. Unfortunately, I was greeted with the following error.
> 
> ui.c:160:7: error: implicit declaration of function 'tiparm' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
>         putp(tiparm(to_status_line, 0));
>              ^
> ui.c:160:7: note: did you mean 'tparm'?
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/curses.h:802:31: note: 'tparm' declared here
> extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);        /* special */
>                               ^
> ui.c:160:7: warning: incompatible integer to pointer conversion passing 'int' to parameter of type 'const char *' [-Wint-conversion]
>         putp(tiparm(to_status_line, 0));
>              ^~~~~~~~~~~~~~~~~~~~~~~~~
> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/curses.h:799:46: note: passing argument to parameter here
> extern NCURSES_EXPORT(int) putp (const char *);                         /* implemented */
>                                              ^
> 1 warning and 1 error generated.
> 
> This is running macOS 12.4 using Apple clang version 13.1.6. I've managed to compile catgirl in the past, so I assume this is a regression introduced in 563ac9e. Looking at the curs_terminfo man page, it looks like only tparm is present and the newer form is not.
> 
> Thanks,
> Kevin

Re: macOS compilation error

From: june
Thanks for the report, it's been fixed.