Index: include/freeDiameter/freeDiameter.h
===================================================================
--- include/freeDiameter/freeDiameter.h	(revision 578)
+++ include/freeDiameter/freeDiameter.h	(revision 618)
@@ -47,4 +47,5 @@
 #endif /* GNUTLS_VERSION */
 
+#ifndef SWIG
 /* GNUTLS calls debug level */
 #ifndef GNUTLS_DBG_LEVEL
@@ -68,5 +69,5 @@
 	(__call__);							\
 }
-
+#endif /* !SWIG */
 
 /* Structure to hold the configuration of the freeDiameter daemon */
@@ -127,5 +128,11 @@
 	struct fifo	  *cnf_main_ev;	/* events for the daemon's main (struct fd_event items) */
 };
+#ifdef SWIG
+%immutable;
+#endif /* SWIG */
 extern struct fd_config *fd_g_config; /* The pointer to access the global configuration, initalized in main */
+#ifdef SWIG
+%mutable;
+#endif /* SWIG */
 
 
@@ -175,5 +182,11 @@
 	, "STATE_ZOMBIE"		\
 	};
+#ifndef SWIG
 extern const char *peer_state_str[];
+#else /* SWIG */
+%immutable;
+extern const char **peer_state_str;
+%mutable;
+#endif /* !SWIG */
 #define STATE_STR(state) \
 	(((unsigned)(state)) <= STATE_MAX ? peer_state_str[((unsigned)(state)) ] : "<Invalid>")
@@ -314,5 +327,5 @@
  * !0	: An error occurred.
  */
-int fd_peer_getbyid( char * diamid, struct peer_hdr ** peer );
+int fd_peer_getbyid( char * diamid, struct peer_hdr ** S_OUT(peer) );
 
 /*
@@ -537,5 +550,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** handler );
+int fd_rt_fwd_register ( int (*rt_fwd_cb)(void * cbdata, struct msg ** msg), void * cbdata, enum fd_rt_fwd_dir dir, struct fd_rt_fwd_hdl ** S_OUT(handler) );
 /*
  * CALLBACK:	rt_fwd_cb
@@ -611,5 +624,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** handler );
+int fd_rt_out_register ( int (*rt_out_cb)(void * cbdata, struct msg * msg, struct fd_list * candidates), void * cbdata, int priority, struct fd_rt_out_hdl ** S_OUT(handler) );
 /*
  * CALLBACK:	rt_out_cb
@@ -671,6 +684,6 @@
 
 int fd_event_send(struct fifo *queue, int code, size_t datasz, void * data);
-int fd_event_get(struct fifo *queue, int *code, size_t *datasz, void ** data);
-int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int *code, size_t *datasz, void ** data);
+int fd_event_get(struct fifo *queue, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
+int fd_event_timedget(struct fifo *queue, struct timespec * timeout, int timeoutcode, int * S_OUT(code), size_t * S_OUT(datasz), void ** S_OUT(data));
 void fd_event_destroy(struct fifo **queue, void (*free_cb)(void * data));
 const char * fd_ev_str(int event);
@@ -684,4 +697,5 @@
 	struct fd_list  chain;	/* link in cnf_endpoints list */
 	
+#ifndef SWIG
 	union {
 		sSS		ss;	/* the socket information. List is always ordered by ss value (memcmp) -- see fd_ep_add_merge */
@@ -690,4 +704,8 @@
 		sSA		sa;
 	};
+#else /* !SWIG */
+	/* SWIG does not support unions inside struct, we only define sa in this case */
+	sSA		sa;
+#endif /* !SWIG */
 	
 #define	EP_FL_CONF	(1 << 0)	/* This endpoint is statically configured in a configuration file */
@@ -726,5 +744,5 @@
 int fd_app_merge(struct fd_list * list, application_id_t aid, vendor_id_t vid, int auth, int acct);
 int fd_app_check(struct fd_list * list, application_id_t aid, struct fd_app **detail);
-int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * common_found);
+int fd_app_check_common(struct fd_list * list1, struct fd_list * list2, int * S_OUT(common_found));
 int fd_app_empty(struct fd_list * list);
 
Index: include/freeDiameter/libfreeDiameter.h
===================================================================
--- include/freeDiameter/libfreeDiameter.h	(revision 609)
+++ include/freeDiameter/libfreeDiameter.h	(revision 618)
@@ -30,5 +30,5 @@
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 	 *
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR *
-* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
+* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY S_OUT OF THE USE OF THIS SOFTWARE, EVEN IF   *
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.								 *
 *********************************************************************************************************/
@@ -78,8 +78,17 @@
 #endif /* DEBUG */
 
+#ifdef SWIG
+#define S_INOUT(_p_) INOUT
+#define S_OUT(_p_) OUTPUT
+#else /* SWIG */
+#define S_INOUT(_p_) _p_
+#define S_OUT(_p_) _p_
+#endif /* SWIG */
 
 /*============================================================*/
 /*                          INIT                              */
 /*============================================================*/
+#ifndef SWIG  /* This section is not included in wrapper */
+
 
 /* This function must be called first, before any call to another library function */
@@ -92,9 +101,9 @@
 
 
-
-
+#endif /* !SWIG */
 /*============================================================*/
 /*                          DEBUG                             */
 /*============================================================*/
+
 
 /*
@@ -117,5 +126,7 @@
  */
 void fd_log_debug ( char * format, ... );
+#ifndef SWIG
 extern pthread_mutex_t	fd_log_lock;
+#endif /* !SWIG */
 extern char * fd_debug_one_function;
 extern char * fd_debug_one_file;
@@ -136,6 +147,8 @@
  *  None.
  */
+#ifndef SWIG 
 void fd_log_threadname ( char * name );
 extern pthread_key_t	fd_log_thname;
+#endif /* !SWIG */
 
 /*
@@ -160,7 +173,9 @@
 /*============================================================*/
 
+#ifndef SWIG 
 #ifndef ASSERT
 #define ASSERT(x) assert(x)
 #endif /* ASSERT */
+#endif /* !SWIG */
 
 /* levels definitions */
@@ -173,10 +188,14 @@
 
 /* Default level is INFO */
+#ifndef SWIG 
 #ifndef TRACE_LEVEL 
 #define TRACE_LEVEL INFO
 #endif /* TRACE_LEVEL */
+#endif /* !SWIG */
 
 /* The level of the file being compiled. */
+#ifndef SWIG 
 static int local_debug_level = TRACE_LEVEL;
+#endif /* !SWIG */
 
 /* A global level, changed by configuration or cmd line for example. default is 0. */
@@ -184,4 +203,5 @@
 
 /* Some portability code to get nice function name in __PRETTY_FUNCTION__ */
+#ifndef SWIG 
 #if __STDC_VERSION__ < 199901L
 # if __GNUC__ >= 2
@@ -194,11 +214,15 @@
 #define __PRETTY_FUNCTION__ __func__
 #endif /* __PRETTY_FUNCTION__ */
+#endif /* !SWIG */
 
 /* A version of __FILE__ without the full path */
+#ifndef SWIG 
 static char * file_bname = NULL;
 #define __STRIPPED_FILE__	(file_bname ?: (file_bname = basename(__FILE__)))
+#endif /* !SWIG */
 
 
 /* Boolean for tracing at a certain level */
+#ifndef SWIG 
 #ifdef DEBUG
 #define TRACE_BOOL(_level_) ( ((_level_) <= local_debug_level + fd_g_debug_lvl) 					\
@@ -208,4 +232,5 @@
 #define TRACE_BOOL(_level_) ((_level_) <= local_debug_level + fd_g_debug_lvl)
 #endif /* DEBUG */
+#endif /* !SWIG */
 
 
@@ -213,4 +238,5 @@
  The general debug macro, each call results in two lines of debug messages (change the macro for more compact output) 
  *************/
+#ifndef SWIG 
 #ifdef DEBUG
 /* In DEBUG mode, we add (a lot of) meta-information along each trace. This makes multi-threading problems easier to debug. */
@@ -242,8 +268,10 @@
 }
 #endif /* DEBUG */
+#endif /* !SWIG */
 
 /*************
  Derivatives from this macro 
  ************/
+#ifndef SWIG 
 /* Helper for function entry -- for very detailed trace of the execution */
 #define TRACE_ENTRY(_format,_args... ) \
@@ -377,4 +405,5 @@
 #endif /* STRIP_DEBUG_CODE */
 
+#endif /* !SWIG */
 
 /*============================================================*/
@@ -385,4 +414,5 @@
  * These macro should be used only when errors are improbable, not for expected errors.
  */
+#ifndef SWIG 
 
 /* Check the return value of a system function and execute fallback in case of error */
@@ -478,8 +508,12 @@
 }
 
+#endif /* !SWIG */
+
 
 /*============================================================*/
 /*                  OTHER MACROS                              */
 /*============================================================*/
+
+#ifndef SWIG 
 
 /* helper macros (pre-processor hacks to allow macro arguments) */
@@ -565,4 +599,5 @@
 #endif /* BUFSIZ */
 
+#endif /* !SWIG */
 
 
@@ -570,5 +605,5 @@
 /*                          THREADS                           */
 /*============================================================*/
-#ifndef SWIG
+#ifndef SWIG 
 
 /* Terminate a thread */
@@ -633,6 +668,5 @@
 	}
 }
-
-#endif /* SWIG */
+#endif /* !SWIG */
 
 /*============================================================*/
@@ -643,5 +677,7 @@
 /* EALREADY will be returned if there is already a callback registered on this signal */
 /* NOTE: the signal handler will be called from a new detached thread */
+#ifndef SWIG 
 int fd_sig_register(int signal, char * modname, void (*callback)(int signal));
+#endif /* !SWIG */
 
 /* Remove the handler for a given signal */
@@ -672,5 +708,11 @@
 #define FD_LIST_INITIALIZER_O( _list_name, _obj ) \
 	{ .next = & _list_name, .prev = & _list_name, .head = & _list_name, .o = _obj }
-void fd_list_init ( struct fd_list * list, void *obj );
+#ifdef SWIG
+%apply struct fd_list * OUTPUT { struct fd_list * list };
+void fd_list_init ( struct fd_list * list, void * obj );
+%clear struct fd_list * list;
+#else
+void fd_list_init ( struct fd_list * list, void * obj );
+#endif
 
 /* Return boolean, true if the list is empty */
@@ -704,4 +746,5 @@
 /*                        DICTIONARY                          */
 /*============================================================*/
+
 /* Structure that contains the complete dictionary definitions */
 struct dictionary;
@@ -750,5 +793,5 @@
  *    ENOMEM 	: Memory allocation for the new object element failed.)
  */
-int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object **ref );
+int fd_dict_new ( struct dictionary * dict, enum dict_object_type type, void * data, struct dict_object * parent, struct dict_object ** S_OUT(ref) );
 
 /*
@@ -775,8 +818,8 @@
  *  ENOENT	: No matching object has been found, and result was NULL.
  */
-int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object **result, int retval );
+int fd_dict_search ( struct dictionary * dict, enum dict_object_type type, int criteria, void * what, struct dict_object ** S_OUT(result), int retval );
 
 /* Special case: get the generic error command object */
-int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object **obj);
+int fd_dict_get_error_cmd(struct dictionary * dict, struct dict_object ** S_OUT(obj));
 
 /*
@@ -796,7 +839,7 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_dict_getval ( struct dict_object * object, void * val);
-int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * type);
-int fd_dict_getdict ( struct dict_object * object, struct dictionary ** dict);
+int fd_dict_getval ( struct dict_object * object, void * S_INOUT(val));
+int fd_dict_gettype ( struct dict_object * object, enum dict_object_type * S_OUT(type));
+int fd_dict_getdict ( struct dict_object * object, struct dictionary ** S_OUT(dict));
 
 /* Debug functions */
@@ -1553,5 +1596,7 @@
 
 /* The following function must be called to activate the session expiry mechanism */
+#ifndef SWIG 
 int fd_sess_start(void);
+#endif /* !SWIG */
 
 /*
@@ -1572,5 +1617,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_sess_handler_create_internal ( struct session_handler ** handler, void (*cleanup)(session_state * state, char * sid) );
+int fd_sess_handler_create_internal ( struct session_handler ** S_OUT(handler), void (*cleanup)(session_state * state, char * sid) );
 /* Macro to avoid casting everywhere */
 #define fd_sess_handler_create( _handler, _cleanup ) \
@@ -1620,5 +1665,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_sess_new ( struct session ** session, char * diamId, char * opt, size_t optlen );
+int fd_sess_new ( struct session ** S_OUT(session), char * diamId, char * opt, size_t optlen );
 
 /*
@@ -1640,5 +1685,5 @@
  *  ENOMEM	: Not enough memory to complete the operation
  */
-int fd_sess_fromsid ( char * sid, size_t len, struct session ** session, int * new);
+int fd_sess_fromsid ( char * sid, size_t len, struct session ** S_OUT(session), int * S_OUT(new));
 
 /*
@@ -1659,5 +1704,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_sess_getsid ( struct session * session, char ** sid );
+int fd_sess_getsid ( struct session * session, char ** S_OUT(sid) );
 
 /*
@@ -1760,5 +1805,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** state ); 
+int fd_sess_state_retrieve_internal ( struct session_handler * handler, struct session * session, session_state ** S_OUT(state) ); 
 #define fd_sess_state_retrieve( _handler, _session, _state ) \
 	fd_sess_state_retrieve_internal( (_handler), (_session), (void *)(_state) )
@@ -1769,5 +1814,4 @@
 void fd_sess_dump_hdl(int level, struct session_handler * handler);
 
-
 /*============================================================*/
 /*                         ROUTING                            */
@@ -1781,5 +1825,5 @@
 
 /* Following functions are helpers to create the routing data of a message */
-int  fd_rtd_init(struct rt_data ** rtd);
+int  fd_rtd_init(struct rt_data ** S_OUT(rtd));
 void fd_rtd_free(struct rt_data ** rtd);
 
@@ -1791,5 +1835,5 @@
 
 /* Extract the list of valid candidates, and initialize their scores to 0 */
-void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** candidates, int ini_score);
+void fd_rtd_candidate_extract(struct rt_data * rtd, struct fd_list ** S_OUT(candidates), int ini_score);
 
 /* If a peer returned a protocol error for this message, save it so that we don't try to send it there again */
@@ -1905,5 +1949,5 @@
  *    ENOMEM 	: Memory allocation for the new avp failed.)
  */
-int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** avp );
+int fd_msg_avp_new ( struct dict_object * model, int flags, struct avp ** S_OUT(avp) );
 
 /*
@@ -1924,5 +1968,5 @@
  *    ENOMEM 	: Memory allocation for the new message failed.)
  */
-int fd_msg_new ( struct dict_object * model, int flags, struct msg ** msg );
+int fd_msg_new ( struct dict_object * model, int flags, struct msg ** S_OUT(msg) );
 
 /*
@@ -1945,5 +1989,5 @@
  *  !0      	: an error occurred.
  */
-int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** msg, int flag );
+int fd_msg_new_answer_from_req ( struct dictionary * dict, struct msg ** S_INOUT(msg), int flag );
 
 /*
@@ -1969,5 +2013,5 @@
  *  ENOENT	: No element has been found where requested, and "found" was NULL (otherwise, *found is set to NULL and 0 is returned). 
  */
-int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** found, int * depth );
+int fd_msg_browse_internal ( msg_or_avp * reference, enum msg_brw_dir dir, msg_or_avp ** S_OUT(found), int * S_INOUT(depth) );
 /* Macro to avoid having to cast the third parameter everywhere */
 #define fd_msg_browse( ref, dir, found, depth )	\
@@ -2013,5 +2057,5 @@
  *  ENOENT	: No AVP has been found, and "avp" was NULL (otherwise, *avp is set to NULL and 0 returned).
  */
-int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** avp );
+int fd_msg_search_avp ( struct msg * msg, struct dict_object * what, struct avp ** S_OUT(avp) );
 
 /*
@@ -2070,5 +2114,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_model ( msg_or_avp * reference, struct dict_object ** model );
+int fd_msg_model ( msg_or_avp * reference, struct dict_object ** S_OUT(model) );
 
 /*
@@ -2086,5 +2130,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_hdr ( struct msg *msg, struct msg_hdr **pdata );
+int fd_msg_hdr ( struct msg *msg, struct msg_hdr ** S_OUT(pdata) );
 
 /*
@@ -2102,5 +2146,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr **pdata );
+int fd_msg_avp_hdr ( struct avp *avp, struct avp_hdr ** S_OUT(pdata) );
 
 /*
@@ -2123,5 +2167,5 @@
  */
 int fd_msg_answ_associate( struct msg * answer, struct msg * query );
-int fd_msg_answ_getq     ( struct msg * answer, struct msg ** query );
+int fd_msg_answ_getq     ( struct msg * answer, struct msg ** S_OUT(query) );
 int fd_msg_answ_detach   ( struct msg * answer );
 
@@ -2142,6 +2186,8 @@
  *  EINVAL: a parameter is invalid
  */
+#ifndef SWIG
 int fd_msg_anscb_associate( struct msg * msg, void ( *anscb)(void *, struct msg **), void  * data );
 int fd_msg_anscb_get      ( struct msg * msg, void (**anscb)(void *, struct msg **), void ** data );
+#endif /* !SWIG */
 
 /*
@@ -2160,6 +2206,8 @@
  *  EINVAL: a parameter is invalid
  */
+#ifndef SWIG
 int fd_msg_rt_associate( struct msg * msg, struct rt_data ** rtd );
-int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** rtd );
+#endif /* !SWIG */
+int fd_msg_rt_get      ( struct msg * msg, struct rt_data ** S_OUT(rtd) );
 
 /*
@@ -2198,6 +2246,8 @@
  *  !0      	: an error occurred.
  */
+#ifndef SWIG
 int fd_msg_source_set( struct msg * msg, char * diamid, int add_rr, struct dictionary * dict );
-int fd_msg_source_get( struct msg * msg, char ** diamid );
+#endif /* !SWIG */
+int fd_msg_source_get( struct msg * msg, char ** S_OUT(diamid) );
 
 /*
@@ -2234,5 +2284,5 @@
  * !0 : standard error code.
  */
-int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** session, int * new);
+int fd_msg_sess_get(struct dictionary * dict, struct msg * msg, struct session ** S_OUT(session), int * S_OUT(new));
 
 /***************************************/
@@ -2274,6 +2324,7 @@
  *  ENOTSUP 	: There is no appropriate callback registered with this AVP's type.
  */
+#ifndef SWIG
 int fd_msg_avp_value_encode ( void *data, struct avp *avp );
-
+#endif /* !SWIG */
 /*
  * FUNCTION:	fd_msg_avp_value_interpret
@@ -2293,5 +2344,7 @@
  *  ENOTSUP 	: There is no appropriate callback registered with this AVP's type.
  */
+#ifndef SWIG
 int fd_msg_avp_value_interpret ( struct avp *avp, void *data );
+#endif /* !SWIG */
 
 
@@ -2317,5 +2370,5 @@
  *  ENOMEM	: Unable to allocate enough memory to create the buffer object.
  */
-int fd_msg_bufferize ( struct msg * msg, unsigned char ** buffer, size_t * len );
+int fd_msg_bufferize ( struct msg * msg, unsigned char ** S_OUT(buffer), size_t * S_OUT(len) );
 
 /*
@@ -2339,5 +2392,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** msg );
+int fd_msg_parse_buffer ( unsigned char ** buffer, size_t buflen, struct msg ** S_OUT(msg) );
 
 /* Parsing Error Information structure */
@@ -2373,5 +2426,5 @@
  *  ENOTSUP	: No dictionary definition for the command or one of the mandatory AVP was found.
  */
-int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info );
+int fd_msg_parse_dict ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info) );
 
 /*
@@ -2392,5 +2445,5 @@
  *  ENOMEM	: Unable to allocate enough memory to complete the operation.
  */
-int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei *error_info);
+int fd_msg_parse_rules ( msg_or_avp * object, struct dictionary * dict, struct fd_pei * S_OUT(error_info));
 
 
@@ -2571,5 +2624,5 @@
  */
 int fd_disp_register ( int (*cb)( struct msg **, struct avp *, struct session *, enum disp_action *), 
-			enum disp_how how, struct disp_when * when, struct disp_hdl ** handle );
+			enum disp_how how, struct disp_when * when, struct disp_hdl ** S_OUT(handle) );
 
 /*
@@ -2637,5 +2690,5 @@
  *  ENOMEM	: Not enough memory to complete the creation.  
  */
-int fd_fifo_new ( struct fifo ** queue );
+int fd_fifo_new ( struct fifo ** S_OUT(queue) );
 
 /*
@@ -2758,5 +2811,5 @@
  *  EINVAL 	: A parameter is invalid.
  */
-int fd_fifo_get_int ( struct fifo * queue, void ** item );
+int fd_fifo_get_int ( struct fifo * queue, void ** S_OUT(item) );
 #define fd_fifo_get(queue, item) \
 	fd_fifo_get_int((queue), (void *)(item))
@@ -2778,5 +2831,5 @@
  *  EWOULDBLOCK : The queue was empty.
  */
-int fd_fifo_tryget_int ( struct fifo * queue, void ** item );
+int fd_fifo_tryget_int ( struct fifo * queue, void ** S_OUT(item) );
 #define fd_fifo_tryget(queue, item) \
 	fd_fifo_tryget_int((queue), (void *)(item))
@@ -2800,5 +2853,5 @@
  *  ETIMEDOUT   : The time out has passed and no item has been received.
  */
-int fd_fifo_timedget_int ( struct fifo * queue, void ** item, const struct timespec *abstime );
+int fd_fifo_timedget_int ( struct fifo * queue, void ** S_OUT(item), const struct timespec *abstime );
 #define fd_fifo_timedget(queue, item, abstime) \
 	fd_fifo_timedget_int((queue), (void *)(item), (abstime))
