From d361f9cca01a815951340a8d6a541d68f3800fb2 Mon Sep 17 00:00:00 2001 From: Glenn Strauss Date: Fri, 29 Oct 2021 10:15:02 -0400 Subject: [PATCH] [core] clean up fdlog_st and log_error_st decls typedef redefinitions may cause issues with older compilers (The intention behind the decls and defines were done to reduce the number of unrelated lines modified for the transition to fdlog_st) x-ref: https://trac.macports.org/ticket/63667 https://github.com/macports/macports-ports/pull/12658 --- src/chunk.h | 3 ++- src/fdevent.h | 6 ++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/chunk.h b/src/chunk.h index 5beb7e4d..c99ebe88 100644 --- a/src/chunk.h +++ b/src/chunk.h @@ -8,12 +8,13 @@ #include "buffer.h" #include "array.h" +#include "fdlog.h" /* both should be way smaller than SSIZE_MAX :) */ #define MAX_READ_LIMIT (256*1024) #define MAX_WRITE_LIMIT (256*1024) -struct fdlog_st; /*(declaration)*/ +/*(needed until 'struct log_error_st' below replaced with 'log_error_st')*/ #define log_error_st fdlog_st typedef struct chunk { diff --git a/src/fdevent.h b/src/fdevent.h index b2f3da48..2a080d03 100644 --- a/src/fdevent.h +++ b/src/fdevent.h @@ -4,8 +4,6 @@ #include "base_decls.h" /* handler_t */ -struct fdlog_st; /*(declaration)*/ -#define log_error_st fdlog_st struct fdevents; /* declaration */ typedef struct fdevents fdevents; @@ -48,7 +46,7 @@ struct fdnode_st { #define FDEVENT_STREAM_RESPONSE_POLLRDHUP BV(15) __attribute_cold__ -int fdevent_config(const char **event_handler_name, struct log_error_st *errh); +int fdevent_config(const char **event_handler_name, log_error_st *errh); __attribute_cold__ __attribute_const__ @@ -56,7 +54,7 @@ __attribute_returns_nonnull__ const char * fdevent_show_event_handlers(void); __attribute_cold__ -fdevents * fdevent_init(const char *event_handler, int *max_fds, int *cur_fds, struct log_error_st *errh); +fdevents * fdevent_init(const char *event_handler, int *max_fds, int *cur_fds, log_error_st *errh); __attribute_cold__ int fdevent_reset(fdevents *ev); /* "init" after fork() */