]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - test/test.priv.h
ncurses 5.7 - patch 20100403
[ncurses.git] / test / test.priv.h
index 50b6effbb383783f2e9f20c1820b8503ee61b9eb..1f6305d9041b026e3fa34991dc88f9201940b17b 100644 (file)
@@ -1,5 +1,5 @@
 /****************************************************************************
- * Copyright (c) 1998-2008,2009 Free Software Foundation, Inc.              *
+ * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc.              *
  *                                                                          *
  * Permission is hereby granted, free of charge, to any person obtaining a  *
  * copy of this software and associated documentation files (the            *
@@ -29,7 +29,7 @@
 /****************************************************************************
  *  Author: Thomas E. Dickey                    1996-on                     *
  ****************************************************************************/
-/* $Id: test.priv.h,v 1.91 2009/07/18 12:19:23 tom Exp $ */
+/* $Id: test.priv.h,v 1.94 2010/03/28 19:51:16 tom Exp $ */
 
 #ifndef __TEST_PRIV_H
 #define __TEST_PRIV_H 1
 #include <stdarg.h>
 #include <string.h>
 #include <sys/types.h>
+#include <errno.h>
 
 #if HAVE_UNISTD_H
 #include <unistd.h>
@@ -318,7 +319,7 @@ extern int optind;
 #endif
 
 #ifndef USE_WIDEC_SUPPORT
-#if defined(_XOPEN_SOURCE_EXTENDED) && defined(WACS_ULCORNER)
+#if (defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5)) && defined(WACS_ULCORNER)
 #define USE_WIDEC_SUPPORT 1
 #else
 #define USE_WIDEC_SUPPORT 0
@@ -643,6 +644,15 @@ typedef int (*NCURSES_SCREEN_CB)(SCREEN *, void *);
 #define USE_TRACE 0
 #endif
 
+/*
+ * Workaround for defective implementation of gcc attribute warn_unused_result
+ */
+#if defined(__GNUC__) && defined(_FORTIFY_SOURCE)
+#define IGNORE_RC(func) errno = func
+#else
+#define IGNORE_RC(func) (void) func
+#endif /* gcc workarounds */
+
 #define init_mb(state) memset(&state, 0, sizeof(state))
 
 #endif /* __TEST_PRIV_H */