mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 13:13:21 +00:00
Provide a better way to include system's <errno.h> for errno + error numbers (LWIP_ERRNO_INCLUDE can't be defined to <errno.h> at least on GCC/linux)
This commit is contained in:
parent
239498f37c
commit
b9e66bfcfb
@ -296,7 +296,8 @@ extern "C" {
|
||||
#endif /* LWIP_UNUSED_ARG */
|
||||
|
||||
/** LWIP_PROVIDE_ERRNO==1: Let lwIP provide ERRNO values and the 'errno' variable.
|
||||
* If this is disabled, cc.h must either define 'errno', include <errno.h> or
|
||||
* If this is disabled, cc.h must either define 'errno', include <errno.h>,
|
||||
* define LWIP_ERRNO_STDINCLUDE to get <errno.h> included or
|
||||
* define LWIP_ERRNO_INCLUDE to <errno.h> or equivalent.
|
||||
*/
|
||||
#if defined __DOXYGEN__
|
||||
|
@ -179,10 +179,15 @@ extern int errno;
|
||||
|
||||
#else /* LWIP_PROVIDE_ERRNO */
|
||||
|
||||
/* Define LWIP_ERRNO_INCLUDE to <errno.h> to include the error defines here */
|
||||
/* Define LWIP_ERRNO_STDINCLUDE if you want to include <errno.h> here */
|
||||
#ifdef LWIP_ERRNO_STDINCLUDE
|
||||
#include <errno.h>
|
||||
#else /* LWIP_ERRNO_STDINCLUDE */
|
||||
/* Define LWIP_ERRNO_INCLUDE to an equivalent of <errno.h> to include the error defines here */
|
||||
#ifdef LWIP_ERRNO_INCLUDE
|
||||
#include LWIP_ERRNO_INCLUDE
|
||||
#endif /* LWIP_ERRNO_INCLUDE */
|
||||
#endif /* LWIP_ERRNO_STDINCLUDE */
|
||||
|
||||
#endif /* LWIP_PROVIDE_ERRNO */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user