X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=test%2Ftest.priv.h;h=1f6305d9041b026e3fa34991dc88f9201940b17b;hp=50b6effbb383783f2e9f20c1820b8503ee61b9eb;hb=cf94c7485f7b40ff7870b5bf9a65e7ab87481a76;hpb=dfaa1a3001fd447819f5edc2e523acc1a04f1440 diff --git a/test/test.priv.h b/test/test.priv.h index 50b6effb..1f6305d9 100644 --- a/test/test.priv.h +++ b/test/test.priv.h @@ -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 @@ -222,6 +222,7 @@ #include #include #include +#include #if HAVE_UNISTD_H #include @@ -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 */