rogerclarkmelbourne / Arduino_STM32

Arduino STM32. Hardware files to support STM32 boards, on Arduino IDE 1.8.x including LeafLabs Maple and other generic STM32F103 boards
Other
2.53k stars 1.26k forks source link

Missing strncpy_P in pgmspace.h #852

Closed ArminJo closed 3 years ago

ArminJo commented 3 years ago

Is there any reason, that the definition of strncpy_P is missing in your pgmspace.h?

For example here and here is is included.

So I must include

#if defined(__STM32F1__) || defined(ARDUINO_ARCH_STM32F1) // Recommended original Arduino_STM32 by Roger Clark.
#  if !defined(strncpy_P)
// this define is not included in the pgmspace.h file :-(
#define strncpy_P(dest, src, size) strncpy((dest), (src), (size))
#  endif
#endif

in my library to make it compile 😞

stevstrong commented 3 years ago

Commit bab4fda should have fix it.

ArminJo commented 3 years ago

Thanks!