Skip to content

Commit

Permalink
Fixed __ATTR_PROGMEM__ by utilizing the variant available in clang (l…
Browse files Browse the repository at this point in the history
  • Loading branch information
KOLANICH committed Jul 26, 2022
1 parent 55e8cac commit b920e31
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/avr/pgmspace.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,16 @@
#endif

#ifndef __ATTR_PROGMEM__
#if __has_attribute(__progmem__)
#define __ATTR_PROGMEM__ __attribute__((__progmem__))
#endif
#endif

#ifndef __ATTR_PROGMEM__
#ifdef __clang_version__
#define __ATTR_PROGMEM__ __flash // not really an attr
#endif
#endif

#ifndef __ATTR_PURE__
#define __ATTR_PURE__ __attribute__((__pure__))
Expand Down

0 comments on commit b920e31

Please sign in to comment.