From 94cd14e90de2545423b7793826884b84e30124e3 Mon Sep 17 00:00:00 2001 From: goldsimon Date: Tue, 17 Jun 2008 20:27:31 +0000 Subject: [PATCH] patch #6459: Made err_t overridable to use a more efficient type (define LWIP_ERR_T in cc.h) --- CHANGELOG | 4 ++++ src/include/lwip/err.h | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 3c587366..0b0dd39a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -19,6 +19,10 @@ HISTORY ++ New features: + 2008-06-17 Simon Goldschmidt + * err.h: patch #6459: Made err_t overridable to use a more efficient type + (define LWIP_ERR_T in cc.h) + 2008-06-17 Simon Goldschmidt * slipif.c: patch #6480: Added a configuration option for slipif for symmetry to loopif diff --git a/src/include/lwip/err.h b/src/include/lwip/err.h index 1d6383e7..69676445 100644 --- a/src/include/lwip/err.h +++ b/src/include/lwip/err.h @@ -33,12 +33,19 @@ #define __LWIP_ERR_H__ #include "lwip/opt.h" +#include "lwip/arch.h" #ifdef __cplusplus extern "C" { #endif -typedef s8_t err_t; +/** Define LWIP_ERR_T in cc.h if you want to use + * a different type for your platform (must be signed). */ +#ifdef LWIP_ERR_T +typedef LWIP_ERR_T err_t; +#else /* LWIP_ERR_T */ + typedef s8_t err_t; +#endif /* LWIP_ERR_T*/ /* Definitions for error constants. */