X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=include%2Fidzebra%2Futil.h;h=1e3516481a24740cabf660419b31a157d7c178bb;hp=2abf9cf4b932671ae0c5210386d46dd0bbd545a6;hb=0f78f3fe78e859d9f0d3f0d3e13fcd28085dd427;hpb=91500c092797da8e769f1e63ff0c6bd67aad0fc8 diff --git a/include/idzebra/util.h b/include/idzebra/util.h index 2abf9cf..1e35164 100644 --- a/include/idzebra/util.h +++ b/include/idzebra/util.h @@ -1,4 +1,4 @@ -/* $Id: util.h,v 1.9 2006-10-10 14:45:42 adam Exp $ +/* $Id: util.h,v 1.10 2006-11-14 08:12:07 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -28,6 +28,24 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #include +/** + expand GCC_ATTRIBUTE if GCC is in use. See : + http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html + + To see gcc pre-defines for c: + gcc -E -dM -x c /dev/null +*/ + +#ifdef __GNUC__ +#if __GNUC__ >= 4 +#define ZEBRA_GCC_ATTR(x) __attribute__ (x) +#endif +#endif + +#ifndef ZEBRA_GCC_ATTR +#define ZEBRA_GCC_ATTR(x) +#endif + /* check that we don't have all too old yaz */ #ifndef YLOG_ERRNO #error Need a modern yaz with YLOG_ defines @@ -84,6 +102,9 @@ void zebra_zint_encode(char **dst, zint pos); YAZ_EXPORT void zebra_zint_decode(const char **src, zint *pos); +YAZ_EXPORT +void zebra_exit(const char *msg); + YAZ_END_CDECL #define CAST_ZINT_TO_INT(x) (int)(x)