comparison include/freeDiameter/libfdproto.h @ 810:85b3d7c8bf60

Fix a few compilation errors on NetBSD -- reported by Thomas Klausner (thanks\!)
author Sebastien Decugis <sdecugis@freediameter.net>
date Fri, 24 Aug 2012 21:22:41 +0200
parents c5b7d4a2cc77
children da97a5aa7976
comparison
equal deleted inserted replaced
809:3753d7145da1 810:85b3d7c8bf60
71 #include <sys/socket.h> 71 #include <sys/socket.h>
72 #include <netdb.h> 72 #include <netdb.h>
73 #include <stdio.h> 73 #include <stdio.h>
74 #include <stdlib.h> 74 #include <stdlib.h>
75 #include <unistd.h> 75 #include <unistd.h>
76 #include <stdarg.h>
76 77
77 #ifdef DEBUG 78 #ifdef DEBUG
78 #include <libgen.h> /* for basename if --dbg_file is specified */ 79 #include <libgen.h> /* for basename if --dbg_file is specified */
79 #endif /* DEBUG */ 80 #endif /* DEBUG */
80 81
157 /* 158 /*
158 * FUNCTION: fd_log_handler_register 159 * FUNCTION: fd_log_handler_register
159 * MACRO: 160 * MACRO:
160 * 161 *
161 * PARAMETERS: 162 * PARAMETERS:
162 * fstr : Stream where the text will be sent (default: stdout) 163 * fstr : Stream where the text will be sent to (default: stdout)
163 * format : Same format string as in the printf function 164 * format : Same format string as in the printf function
164 * va_list : Argument list 165 * va_list : Argument list
165 * 166 *
166 * DESCRIPTION: 167 * DESCRIPTION:
167 * Register an external method for logging purposes. 168 * Register an external method for logging purposes.
212 213
213 /* A global level, changed by configuration or cmd line for example. Default is INFO (in libfdproto/log.c). */ 214 /* A global level, changed by configuration or cmd line for example. Default is INFO (in libfdproto/log.c). */
214 extern int fd_g_debug_lvl; 215 extern int fd_g_debug_lvl;
215 216
216 /* Some portability code to get nice function name in __PRETTY_FUNCTION__ */ 217 /* Some portability code to get nice function name in __PRETTY_FUNCTION__ */
217 #if __STDC_VERSION__ < 199901L 218 #if (!defined( __func__)) && (__STDC_VERSION__ < 199901L)
218 # if __GNUC__ >= 2 219 # if __GNUC__ >= 2
219 # define __func__ __FUNCTION__ 220 # define __func__ __FUNCTION__
220 # else /* __GNUC__ >= 2 */ 221 # else /* __GNUC__ >= 2 */
221 # define __func__ "<unknown>" 222 # define __func__ "<unknown>"
222 # endif /* __GNUC__ >= 2 */ 223 # endif /* __GNUC__ >= 2 */
223 #endif /* __STDC_VERSION__ < 199901L */ 224 #endif /*(!defined( __func__)) && (__STDC_VERSION__ < 199901L) */
224 #ifndef __PRETTY_FUNCTION__ 225 #ifndef __PRETTY_FUNCTION__
225 #define __PRETTY_FUNCTION__ __func__ 226 #define __PRETTY_FUNCTION__ __func__
226 #endif /* __PRETTY_FUNCTION__ */ 227 #endif /* __PRETTY_FUNCTION__ */
227 228
228 /* A version of __FILE__ without the full path */ 229 /* A version of __FILE__ without the full path */
"Welcome to our mercurial repository"