Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add functions stub for compatibility with very minimal libc #188

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api/Print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
using namespace arduino;

// Public Methods //////////////////////////////////////////////////////////////
#ifdef __VERY_MINIMAL_LIBC__
// These functions should be implemented in the user code (C++)
bool isnan(float x);
bool isinf(float x);
#endif

/* default implementation: may be overridden */
size_t Print::write(const uint8_t *buffer, size_t size)
Expand Down
6 changes: 6 additions & 0 deletions api/String.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@

#include <float.h>

#ifdef __VERY_MINIMAL_LIBC__
// These functions should be implemented in the user code (C++)
long atol(char* c);
float atof(char* c);
#endif

namespace arduino {

/*********************************************/
Expand Down