diff options
author | Even Rouault <even.rouault@spatialys.com> | 2020-12-12 15:03:38 +0100 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2020-12-12 15:03:38 +0100 |
commit | a12d22b7b36a15e3d05052a0709b222a964fed10 (patch) | |
tree | 78570b348e2205c30ff41bd1c63183ad20da9032 | |
parent | f13cf46b6ecb97503afcfa6f41a18d6697076179 (diff) | |
download | libtiff-git-a12d22b7b36a15e3d05052a0709b222a964fed10.tar.gz |
tiffio.h: do not define __attribute__ but defines TIFF_ATTRIBUTE instead (fixes #221)
-rw-r--r-- | libtiff/tiffio.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libtiff/tiffio.h b/libtiff/tiffio.h index 221dfa5a..6274f098 100644 --- a/libtiff/tiffio.h +++ b/libtiff/tiffio.h @@ -261,8 +261,10 @@ typedef struct { #define LOGLUV_PUBLIC 1 #endif -#if !defined(__GNUC__) && !defined(__attribute__) -# define __attribute__(x) /*nothing*/ +#if defined(__GNUC__) || defined(__attribute__) +# define TIFF_ATTRIBUTE(x) __attribute__(x) +#else +# define TIFF_ATTRIBUTE(x) /*nothing*/ #endif #if defined(c_plusplus) || defined(__cplusplus) @@ -452,10 +454,10 @@ extern TIFF* TIFFClientOpen(const char*, const char*, TIFFMapFileProc, TIFFUnmapFileProc); extern const char* TIFFFileName(TIFF*); extern const char* TIFFSetFileName(TIFF*, const char *); -extern void TIFFError(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3))); -extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4))); -extern void TIFFWarning(const char*, const char*, ...) __attribute__((__format__ (__printf__,2,3))); -extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) __attribute__((__format__ (__printf__,3,4))); +extern void TIFFError(const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,2,3))); +extern void TIFFErrorExt(thandle_t, const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,3,4))); +extern void TIFFWarning(const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,2,3))); +extern void TIFFWarningExt(thandle_t, const char*, const char*, ...) TIFF_ATTRIBUTE((__format__ (__printf__,3,4))); extern TIFFErrorHandler TIFFSetErrorHandler(TIFFErrorHandler); extern TIFFErrorHandlerExt TIFFSetErrorHandlerExt(TIFFErrorHandlerExt); extern TIFFErrorHandler TIFFSetWarningHandler(TIFFErrorHandler); |