mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
Remove replacements for libgpg-error < 1.21.
* common/util.h: Remove replacement macros for libgpg-error<1.21.
* common/types.h: Ditto.
* common/mischelp.h: Ditto.
* common/t-mapstrings.c: Include t-support.h before stringhelp.h
* common/t-stringhelp.c: Ditto.
* common/t-support.h: Always include gpg-error.h.
* kbx/keybox-search.c: Do not include stringhelp.h so that keybox-defs
comes first.
--
This patch enhances commit d6e0149
from Dec 10.
Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
1605e34fc3
commit
f0ae40b0c9
7 changed files with 5 additions and 166 deletions
|
@ -47,34 +47,6 @@ time_t timegm (struct tm *tm);
|
|||
#define DIM(v) (sizeof(v)/sizeof((v)[0]))
|
||||
#define DIMof(type,member) DIM(((type *)0)->member)
|
||||
|
||||
|
||||
/* Replacements for macros not available with libgpg-error < 1.20. */
|
||||
#ifndef GPGRT_GCC_VERSION
|
||||
|
||||
# undef GPGRT_HAVE_PRAGMA_GCC_PUSH
|
||||
# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
|
||||
# define GPGRT_HAVE_MACRO_FUNCTION 1 /* __FUNCTION__ macro is available. */
|
||||
# define GPGRT_ATTR_NORETURN __attribute__ ((noreturn))
|
||||
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
|
||||
# define GPGRT_HAVE_PRAGMA_GCC_PUSH 1
|
||||
# define GPGRT_ATTR_PRINTF(f,a) \
|
||||
__attribute__ ((format (__gnu_printf__,f,a)))
|
||||
# define GPGRT_ATTR_NR_PRINTF(f,a) \
|
||||
__attribute__ ((noreturn, format (__gnu_printf__,f,a)))
|
||||
# else
|
||||
# define GPGRT_ATTR_PRINTF(f, a) \
|
||||
__attribute__ ((format (printf,f,a)))
|
||||
# define GPGRT_ATTR_NR_PRINTF(f, a) \
|
||||
__attribute__ ((noreturn, format (printf,f,a)))
|
||||
# endif
|
||||
# else
|
||||
# define GPGRT_ATTR_NORETURN
|
||||
# define GPGRT_ATTR_PRINTF( f, a )
|
||||
# define GPGRT_ATTR_NR_PRINTF( f, a )
|
||||
# endif
|
||||
|
||||
#endif /*Older libgpg-error. */
|
||||
|
||||
/* To avoid that a compiler optimizes certain memset calls away, these
|
||||
macros may be used instead. */
|
||||
#define wipememory2(_ptr,_set,_len) do { \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue