Commit 3f6afc1e authored by Lev Walkin's avatar Lev Walkin

gcc 2.95.x does not like __attribute__ on typedefs

parent afda1a50
...@@ -36,8 +36,7 @@ typedef int (asn_app_consume_bytes_f)(const void *buffer, size_t size, ...@@ -36,8 +36,7 @@ typedef int (asn_app_consume_bytes_f)(const void *buffer, size_t size,
typedef void (asn_app_constraint_failed_f)(void *application_specific_key, typedef void (asn_app_constraint_failed_f)(void *application_specific_key,
struct asn_TYPE_descriptor_s *type_descriptor_which_failed, struct asn_TYPE_descriptor_s *type_descriptor_which_failed,
const void *structure_which_failed_ptr, const void *structure_which_failed_ptr,
const char *error_message_format, ...) const char *error_message_format, ...) GCC_PRINTFLIKE(4, 5);
__attribute__((format(printf, 4, 5)));
#ifdef __cplusplus #ifdef __cplusplus
} }
......
...@@ -78,8 +78,14 @@ typedef unsigned int uint32_t; ...@@ -78,8 +78,14 @@ typedef unsigned int uint32_t;
#endif /* WIN32 */ #endif /* WIN32 */
#ifndef __GNUC__ #if __GNUC__ >= 3
#define __attribute__(ignore) #ifndef GCC_PRINTFLIKE
#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
#endif
#else
#ifndef GCC_PRINTFLIKE
#define GCC_PRINTFLIKE(fmt,var) /* nothing */
#endif
#endif #endif
#ifndef offsetof /* If not defined by <stddef.h> */ #ifndef offsetof /* If not defined by <stddef.h> */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment