Make some ELL headers completely self-contained.
cover Make some ELL headers completely self-contained.
These patches address some compile-time errors encountered when attempting to use functions and macros declared in installed ELL headers. The headers in question were not completely self-contained.
Ossama Othman (2):
main: Fixed missing uint32_t typedef error
log: Fixed missing L_STRINGIFY macro definition
ell/log.c | 1 - ell/log.h | 2 ++ ell/main.h | 1 + 3 files changed, 3 insertions(+), 1 deletion(-)
Signature · 1 line
2.7.4
PATCH 1/2 main: Fixed missing uint32_t typedef error
Include <stdint.h> in <ell/main.h> to address a compile-time error that occurred when including the latter header alone.
--- ell/main.h | 1 + 1 file changed, 1 insertion(+)
ell/main.h +1 -0
@@ -24,6 +24,7 @@#define __ELL_MAIN_H#include <stdbool.h> +#include <stdint.h> #ifdef __cplusplusextern "C" {
Signature · 1 line
2.7.4
PATCH 2/2 log: Fixed missing L_STRINGIFY macro definition
In reply to Ossama OthmanThe l_log() macro in the <ell/log.h> header uses the L_STRINGIFY macro defined in <ell/util.h> but doesn't include that header. That triggered a compile-time error in some cases where <ell/util.h> was not indirectly pulled in before <ell/log.h>.
--- ell/log.c | 1 - ell/log.h | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-)
ell/log.c +0 -1
@@ -34,7 +34,6 @@#include <sys/socket.h> #include <sys/un.h> -#include "util.h" #include "log.h" #include "private.h"
ell/log.h +2 -0
@@ -26,6 +26,8 @@#include <stdarg.h> #include <stdbool.h> +#include <ell/util.h> +#ifdef __cplusplusextern "C" {#endif
Signature · 1 line
2.7.4
Hi Ossama,
Quoted 8 lines · Ossama Othman
These patches address some compile-time errors encountered when attempting to use functions and macros declared in installed ELL headers. The headers in question were not completely self-contained.
Ossama Othman (2):
main: Fixed missinguint32_ttypedef error
log: Fixed missingL_STRINGIFYmacro definition
Both applied. Though I wonder why you're not including ell/ell.h and including these headers individually.
Regards,
-Denis
Othman
Hi Denis,
Quoted 7 lines · Denis Kenzior
Quoted 4 lines · Ossama Othman
These patches address some compile-time errors encountered when attempting to use functions and macros declared in installed ELL headers. The headers in question were not completely self-contained.
Quoted 7 lines
Quoted 5 lines
Ossama Othman (2):
main: Fixed missinguint32_ttypedef error
log: Fixed missingL_STRINGIFYmacro definitionBoth applied. Though I wonder why you're not including
ell/ell.hand including these headers individually.
Honestly, I had not noticed that header until you mentioned it. Now I see that the ELL examples include that header, too. I'll use it instead. Thanks for correcting my usage. :)
-Ossama