]> granicus.if.org Git - neomutt/commitdiff
Use static inlines to make gcc 4.2.1 happy 456/head
authorPietro Cerutti <gahr@gahr.ch>
Mon, 6 Mar 2017 11:07:06 +0000 (11:07 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 6 Mar 2017 12:51:38 +0000 (12:51 +0000)
Closes: #432
mutt.h
muttlib.c

diff --git a/mutt.h b/mutt.h
index a867ead670adbe46eed77d25b2234f0b36dc76af..7f54cfeadaf9fdc303fef0bb524ff54a75d9f830 100644 (file)
--- 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));
 }
index 04884c55f74097fc65782bbe02a93bc30106aee6..5dd8fdc8e97df859cb33f7c31c1ec6a606e00840 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
 #include <sys/types.h>
 #include <utime.h>
 
-/*
- * 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",