-
Notifications
You must be signed in to change notification settings - Fork 3k
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
mbed_retarget: enable IAR build #14935
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,7 +37,7 @@ | |
#endif | ||
#include <errno.h> | ||
|
||
#if !defined(__ARMCC_VERSION) | ||
#if !defined(__ARMCC_VERSION) && defined(__GNUC__) | ||
#include <fcntl.h> | ||
#endif | ||
|
||
|
@@ -468,9 +468,16 @@ typedef struct DIR_impl DIR; | |
#ifndef ELIBEXEC | ||
#define ELIBEXEC 83 /* Cannot exec a shared library directly */ | ||
#endif | ||
|
||
#if defined ( __ICCARM__ ) | ||
#undef EILSEQ /* defined in IAR arm/inc/c/errno.h: #define EILSEQ 36 */ | ||
#define EILSEQ 84 /* Illegal byte sequence */ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think we want to add this. From the discussion, I was questioning our earlier approach with undef like here (see #14751). The goal was to provide default values only if they are not defined. if IAR defines it, we should leave it as it is. a program should not use value 36 or 84 directly but rather use EILSEQ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But this can't compile as value 36 is already used.... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is failing at https://github.com/ARMmbed/mbed-os/blob/master/platform/source/mbed_retarget.cpp#L2102 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good test ! @kjbracey-arm what do to in this case ? fix it as it is here ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. or @pan- but I think both are OoO these days. Lets get back to this one the next week. |
||
#else | ||
#ifndef EILSEQ | ||
#define EILSEQ 84 /* Illegal byte sequence */ | ||
#endif | ||
#endif | ||
|
||
#ifndef ERESTART | ||
#define ERESTART 285 /* Interrupted system call should be restarted */ | ||
#endif | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this addition needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#14751 (comment)