Skip to content

Commit

Permalink
platform.h: add __printflike
Browse files Browse the repository at this point in the history
  • Loading branch information
yamt committed Aug 12, 2024
1 parent 49f8fcf commit b08e8fe
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,14 @@
#endif
#endif /* !defined(__noinline) */

#if !defined(__printflike)
#if __has_attribute(__format__)
#define __printflike(a, b) __attribute__((__format__(__printf__, a, b)))
#else
#define __printflike(a, b)
#endif
#endif /* !defined(__printflike) */

#if __has_builtin(__builtin_add_overflow)
#define ADD_U32_OVERFLOW(a, b, c) __builtin_add_overflow(a, b, c)
#else
Expand Down

0 comments on commit b08e8fe

Please sign in to comment.