X-Git-Url: https://ncurses.scripts.mit.edu/?a=blobdiff_plain;ds=sidebyside;f=test%2Ftest.priv.h;h=58f79e00125cb778df48eecf099b4f847c783bb1;hb=95bcbd4bb8e933c86e6fc4aba9ea1c7fd3d30e3d;hp=3b88de13be59b93fa442e45ae9e6f0e22b776624;hpb=1f7a36fe16b11bb4aab51be89bbc1b0f75936b78;p=ncurses.git diff --git a/test/test.priv.h b/test/test.priv.h index 3b88de13..58f79e00 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright 2018-2019,2020 Thomas E. Dickey * + * Copyright 2018-2020,2021 Thomas E. Dickey * * Copyright 1998-2017,2018 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * @@ -30,7 +30,7 @@ /**************************************************************************** * Author: Thomas E. Dickey 1996-on * ****************************************************************************/ -/* $Id: test.priv.h,v 1.190 2020/08/29 21:08:12 tom Exp $ */ +/* $Id: test.priv.h,v 1.197 2021/04/25 00:00:24 tom Exp $ */ #ifndef __TEST_PRIV_H #define __TEST_PRIV_H 1 @@ -243,6 +243,10 @@ #define HAVE_STDINT_H 0 #endif +#ifndef HAVE_STDNORETURN_H +#define HAVE_STDNORETURN_H 0 +#endif + #ifndef HAVE_STRSTR #define HAVE_STRSTR 0 #endif @@ -391,6 +395,12 @@ #include #endif +#if HAVE_STDNORETURN_H && !defined(NCURSES_VERSION) +#include +#undef GCC_NORETURN +#define GCC_NORETURN _Noreturn +#endif + #if !(defined(NCURSES_WGETCH_EVENTS) && defined(NEED_KEY_EVENT)) #undef KEY_EVENT /* reduce compiler-warnings with Visual C++ */ #endif @@ -738,10 +748,10 @@ extern "C" { #endif #if USE_STRING_HACKS && HAVE_SNPRINTF -#define _nc_SPRINTF NCURSES_VOID snprintf +#define _nc_SPRINTF NCURSES_VOID (snprintf) #define _nc_SLIMIT(n) NCURSES_CAST(size_t,n), #else -#define _nc_SPRINTF NCURSES_VOID sprintf +#define _nc_SPRINTF NCURSES_VOID (sprintf) #define _nc_SLIMIT(n) /* nothing */ #endif @@ -914,11 +924,14 @@ extern int TABSIZE; #if defined(NCURSES_VERSION) && HAVE_NC_ALLOC_H #include -#if HAVE_EXIT_TERMINFO && defined(USE_TINFO) +#if HAVE_EXIT_TERMINFO && (defined(USE_TERMINFO) || defined(USE_TINFO)) #undef ExitProgram #define ExitProgram(code) exit_terminfo(code) +#elif HAVE_EXIT_CURSES +#undef ExitProgram +#define ExitProgram(code) exit_curses(code) #endif -#else +#else /* not ncurses-tree */ #define typeMalloc(type,n) (type *) malloc((size_t)(n) * sizeof(type)) #define typeCalloc(type,elts) (type *) calloc((size_t)(elts), sizeof(type)) #define typeRealloc(type,n,p) (type *) realloc(p, (size_t)(n) * sizeof(type)) @@ -941,6 +954,7 @@ extern int TABSIZE; #endif #if defined(_NC_WINDOWS) || defined(USE_WIN32CON_DRIVER) + #if defined(PDCURSES) #ifdef WINVER # if WINVER < 0x0501 @@ -958,9 +972,18 @@ extern int TABSIZE; #define getlogin() "username" #elif defined(EXP_WIN32_DRIVER) -/* ignore the mingw headers */ -#elif defined(HAVE_NCURSESW_NCURSES_H) +#if defined(HAVE_NCURSESW_NCURSES_H) +#include +#elif defined(HAVE_NCURSES_NCURSES_H) +#include +#else +#include +#endif + +#else + +#if defined(HAVE_NCURSESW_NCURSES_H) #include #elif defined(HAVE_NCURSES_NCURSES_H) #include @@ -968,6 +991,8 @@ extern int TABSIZE; #include #endif +#endif + /* conflicts in test/firstlast.c */ #undef large #undef small