Test for C99 only once.

This commit is contained in:
William McBrine
2018-12-31 00:09:48 -05:00
parent e30cbe2754
commit 2faa14187f
2 changed files with 7 additions and 13 deletions

View File

@@ -46,8 +46,11 @@ PDCurses portable platform definitions list:
# include <wchar.h>
#endif
#if defined(__STDC_VERSION__) && __STDC_VERSION >= 199901L && \
!defined(__bool_true_false_are_defined)
#if defined(__STDC_VERSION__) && __STDC_VERSION >= 199901L
# define PDC_99 1
#endif
#if defined(PDC_99) && !defined(__bool_true_false_are_defined)
# include <stdbool.h>
#endif

View File

@@ -10,27 +10,18 @@
#include <curses.h>
#if defined(__TURBOC__) || defined(__EMX__) || defined(__DJGPP__) || \
defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__)
defined(PDC_99) || defined(__WATCOMC__)
# ifndef HAVE_VSSCANF
# define HAVE_VSSCANF /* have vsscanf() */
# endif
#endif
#if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__WATCOMC__)
#if defined(PDC_99) || defined(__WATCOMC__)
# ifndef HAVE_VSNPRINTF
# define HAVE_VSNPRINTF /* have vsnprintf() */
# endif
#endif
#if defined(__STDC_VERSION__) && __STDC_VERSION >= 199901L
# ifndef HAVE_VSSCANF
# define HAVE_VSSCANF
# endif
# ifndef HAVE_VSNPRINTF
# define HAVE_VSNPRINTF
# endif
#endif
/*----------------------------------------------------------------------*/
typedef struct /* structure for ripped off lines */