From: Pietro Cerutti Date: Mon, 6 Mar 2017 11:07:06 +0000 (+0000) Subject: Use static inlines to make gcc 4.2.1 happy X-Git-Tag: neomutt-20170306~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=refs%2Fpull%2F456%2Fhead;p=neomutt Use static inlines to make gcc 4.2.1 happy Closes: #432 --- diff --git a/mutt.h b/mutt.h index a867ead67..7f54cfead 100644 --- a/mutt.h +++ b/mutt.h @@ -651,17 +651,17 @@ typedef struct replace_list_t struct replace_list_t *next; } REPLACE_LIST; -inline LIST *mutt_new_list() +static inline LIST *mutt_new_list() { return safe_calloc (1, sizeof (LIST)); } -inline RX_LIST *mutt_new_rx_list() +static inline RX_LIST *mutt_new_rx_list() { return safe_calloc (1, sizeof (RX_LIST)); } -inline REPLACE_LIST *mutt_new_replace_list() +static inline REPLACE_LIST *mutt_new_replace_list() { return safe_calloc (1, sizeof (REPLACE_LIST)); } @@ -733,7 +733,7 @@ typedef struct envelope unsigned int refs_changed : 1; /* References changed to break thread */ } ENVELOPE; -inline ENVELOPE *mutt_new_envelope() +static inline ENVELOPE *mutt_new_envelope() { return safe_calloc (1, sizeof (ENVELOPE)); } @@ -745,7 +745,7 @@ typedef struct parameter struct parameter *next; } PARAMETER; -inline PARAMETER *mutt_new_parameter() +static inline PARAMETER *mutt_new_parameter() { return safe_calloc (1, sizeof (PARAMETER)); } @@ -929,7 +929,7 @@ typedef struct header char *maildir_flags; /* unknown maildir flags */ } HEADER; -inline HEADER *mutt_new_header() +static inline HEADER *mutt_new_header() { return safe_calloc (1, sizeof (HEADER)); } @@ -1131,7 +1131,7 @@ typedef struct int tabs; } ENTER_STATE; -inline ENTER_STATE *mutt_new_enter_state() +static inline ENTER_STATE *mutt_new_enter_state() { return safe_calloc (1, sizeof (ENTER_STATE)); } diff --git a/muttlib.c b/muttlib.c index 04884c55f..5dd8fdc8e 100644 --- a/muttlib.c +++ b/muttlib.c @@ -53,17 +53,6 @@ #include #include -/* - * External definitions for inline functions in mutt.h - */ -extern LIST *mutt_new_list(); -extern RX_LIST *mutt_new_rx_list(); -extern REPLACE_LIST *mutt_new_replace_list(); -extern PARAMETER *mutt_new_parameter(); -extern HEADER *mutt_new_header(); -extern ENVELOPE *mutt_new_envelope(); -extern ENTER_STATE *mutt_new_enter_state(); - static const char *xdg_env_vars[] = { [kXDGConfigHome] = "XDG_CONFIG_HOME",