Skip to content

Commit

Permalink
Fix symbol clash after ncurses introduced format attributes.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Jul 4, 2023
1 parent d7507a5 commit 2dd208e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gui_ncurses.c
Expand Up @@ -19,6 +19,9 @@ MOJOGUI_PLUGIN(ncurses)
CREATE_MOJOGUI_ENTRY_POINT(ncurses)
#endif

// ncurses headers use 'format' in an __attribute__, undefine ours for now.
#undef format

#include <unistd.h>
#include <ctype.h>
// CMake searches for a whole bunch of different possible curses includes
Expand All @@ -36,6 +39,10 @@ CREATE_MOJOGUI_ENTRY_POINT(ncurses)

#include <locale.h>

// restore the format define from gui.h now that the ncurses headers are done.
#define format entry->format


// This was built to look roughly like dialog(1), but it's not nearly as
// robust. Also, I didn't use any of dialog's code, as it is GPL/LGPL,
// depending on what version you start with. There _is_ a libdialog, but
Expand Down

0 comments on commit 2dd208e

Please sign in to comment.