Skip to content

Commit

Permalink
Preliminarily begin using function attributes (while remaining portable)
Browse files Browse the repository at this point in the history
  • Loading branch information
halosghost committed Sep 7, 2016
1 parent e58e573 commit e8a4bfb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@
#include <stdnoreturn.h>
#include <jansson.h>

#if !defined(__has_attribute)
# define __has_attribute(x) 0
#endif

#if __has_attribute(pure)
# define ATTR_PURE __attribute__((pure))
#else
# define ATTR_PURE
#endif

/* Configuration */
#define FALLBACK_PROVIDER "https://ptpb.pw/"

Expand Down Expand Up @@ -163,7 +173,7 @@ extern struct pbpst_state {
prog: 8, llex: 8, lthm: 8, lfrm: 8, lspv: 8;
} state;

bool
bool ATTR_PURE
pbpst_test_options (const struct pbpst_state *);

signed
Expand Down

0 comments on commit e8a4bfb

Please sign in to comment.