diff options
Diffstat (limited to 'c++/etip.h.in')
| -rw-r--r-- | c++/etip.h.in | 41 |
1 files changed, 32 insertions, 9 deletions
diff --git a/c++/etip.h.in b/c++/etip.h.in index 70842ef6b4c6..193c298750e2 100644 --- a/c++/etip.h.in +++ b/c++/etip.h.in @@ -1,6 +1,6 @@ // * This makes emacs happy -*-Mode: C++;-*- /**************************************************************************** - * Copyright 2018-2021,2022 Thomas E. Dickey * + * Copyright 2018-2024,2025 Thomas E. Dickey * * Copyright 1998-2012,2017 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -32,7 +32,7 @@ * Author: Juergen Pfeifer, 1997 * ****************************************************************************/ -// $Id: etip.h.in,v 1.50 2022/08/20 20:50:00 tom Exp $ +// $Id: etip.h.in,v 1.55 2025/02/08 23:39:52 tom Exp $ #ifndef NCURSES_ETIP_H_incl #define NCURSES_ETIP_H_incl 1 @@ -42,6 +42,10 @@ #define HAVE_BUILTIN_H 0 #endif +#ifndef HAVE_EXCEPTION +#define HAVE_EXCEPTION 0 +#endif + #ifndef HAVE_GXX_BUILTIN_H #define HAVE_GXX_BUILTIN_H 0 #endif @@ -54,6 +58,10 @@ #define HAVE_IOSTREAM 0 #endif +#ifndef HAVE_NEW +#define HAVE_NEW 0 +#endif + #ifndef HAVE_TYPEINFO #define HAVE_TYPEINFO 0 #endif @@ -94,6 +102,8 @@ # endif #endif +#include <exception> + #if defined(__GNUG__) # if HAVE_BUILTIN_H || HAVE_GXX_BUILTIN_H || HAVE_GPP_BUILTIN_H # if ETIP_NEEDS_MATH_H @@ -118,7 +128,16 @@ # include <generic.h> #endif -#include <curses.h> +#if HAVE_EXCEPTION +# include <exception> +#endif +#if HAVE_NEW +# include <new> +#endif + +// This used to include <curses.h>, but Apple's configuration as of 2024 +// provides only a broken version of ncurses's header, which interferes +// with the configure script. extern "C" { #if HAVE_VALUES_H @@ -128,6 +147,10 @@ extern "C" { #include <assert.h> #include <eti.h> #include <errno.h> + +#ifndef HAVE_CONFIG_H +int endwin(void); // needed for the configure check +#endif } // Language features @@ -200,7 +223,7 @@ public: NCursesPanelException (const char *msg, int err) : NCursesException (msg, err), - p (0) + p (NULL) {}; NCursesPanelException (const NCursesPanel* panel, @@ -212,7 +235,7 @@ public: explicit NCursesPanelException (int err) : NCursesException ("panel library error", err), - p (0) + p (NULL) {}; NCursesPanelException (const NCursesPanel* panel, @@ -251,7 +274,7 @@ public: NCursesMenuException (const char *msg, int err) : NCursesException (msg, err), - m (0) + m (NULL) {}; NCursesMenuException (const NCursesMenu* menu, @@ -263,7 +286,7 @@ public: explicit NCursesMenuException (int err) : NCursesException ("menu library error", err), - m (0) + m (NULL) {}; NCursesMenuException (const NCursesMenu* menu, @@ -302,7 +325,7 @@ public: NCursesFormException (const char *msg, int err) : NCursesException (msg, err), - f (0) + f (NULL) {}; NCursesFormException (const NCursesForm* form, @@ -314,7 +337,7 @@ public: explicit NCursesFormException (int err) : NCursesException ("form library error", err), - f (0) + f (NULL) {}; NCursesFormException (const NCursesForm* form, |
