/* initializes ACLs by resolving the sample fetch names they rely upon.
* Returns 0 on success, otherwise an error.
*/
-int init_acl();
+int init_acl(void);
void free_acl_cond(struct acl_cond *cond);
#ifdef DEBUG_USE_ABORT
/* abort() is better recognized by code analysis tools */
-#define ABORT_NOW() do { extern void ha_backtrace_to_stderr(); ha_backtrace_to_stderr(); abort(); } while (0)
+#define ABORT_NOW() do { extern void ha_backtrace_to_stderr(void); ha_backtrace_to_stderr(); abort(); } while (0)
#else
/* More efficient than abort() because it does not mangle the
* stack and stops at the exact location we need.
*/
-#define ABORT_NOW() do { extern void ha_backtrace_to_stderr(); ha_backtrace_to_stderr(); (*(volatile int*)1=0); } while (0)
+#define ABORT_NOW() do { extern void ha_backtrace_to_stderr(void); ha_backtrace_to_stderr(); (*(volatile int*)1=0); } while (0)
#endif
/* BUG_ON: complains if <cond> is true when DEBUG_STRICT or DEBUG_STRICT_NOCRASH
*
* Returns 0 if no diagnostic message has been found else 1.
*/
-int cfg_run_diagnostics();
+int cfg_run_diagnostics(void);
#endif /* _HAPROXY_CFGDIAG_H */
int readcfgfile(const char *file);
void cfg_register_keywords(struct cfg_kw_list *kwl);
void cfg_unregister_keywords(struct cfg_kw_list *kwl);
-int check_config_validity();
+int check_config_validity(void);
int str2listener(char *str, struct proxy *curproxy, struct bind_conf *bind_conf, const char *file, int line, char **err);
int str2receiver(char *str, struct proxy *curproxy, struct bind_conf *bind_conf, const char *file, int line, char **err);
int cfg_register_section(char *section_name,
/* mworker proxy functions */
-int mworker_cli_proxy_create();
+int mworker_cli_proxy_create(void);
int mworker_cli_proxy_new_listener(char *line);
int mworker_cli_sockpair_new(struct mworker_proc *mworker_proc, int proc);
-void mworker_cli_proxy_stop();
+void mworker_cli_proxy_stop(void);
/* proxy mode cli functions */
/* Returns the biggest index plus one usable on the platform.
*/
-int ha_cpuset_size();
+int ha_cpuset_size(void);
#endif /* _HAPROXY_CPUSET_H */
void ha_task_dump(struct buffer *buf, const struct task *task, const char *pfx);
void ha_thread_dump(struct buffer *buf, int thr, int calling_tid);
void ha_dump_backtrace(struct buffer *buf, const char *prefix, int dump);
-void ha_backtrace_to_stderr();
-void ha_thread_dump_all_to_trash();
-void ha_panic();
+void ha_backtrace_to_stderr(void);
+void ha_thread_dump_all_to_trash(void);
+void ha_panic(void);
#endif /* _HAPROXY_DEBUG_H */
extern struct pool_head *pool_head_buffer;
-int init_buffer();
+int init_buffer(void);
void buffer_dump(FILE *o, struct buffer *b, int from, int to);
/*****************************************************************/
* If none works, returns 0, otherwise 1.
* The pollers register themselves just before main() is called.
*/
-int init_pollers();
+int init_pollers(void);
/*
* Deinitialize the pollers.
*/
-void deinit_pollers();
+void deinit_pollers(void);
/*
* Some pollers may lose their connection after a fork(). It may be necessary
* the the current poller is destroyed and the caller is responsible for trying
* another one by calling init_pollers() again.
*/
-int fork_poller();
+int fork_poller(void);
/*
* Lists the known pollers on <out>.
int compare_current_version(const char *version);
void mworker_accept_wrapper(int fd);
-void mworker_reload();
+void mworker_reload(void);
/* to be used with warned and WARN_* */
static inline int already_warned(unsigned int warning)
TAINTED_CLI_EXPERIMENTAL_MODE = 0x8,
};
void mark_tainted(const enum tainted_flags flag);
-unsigned int get_tainted();
+unsigned int get_tainted(void);
extern unsigned int experimental_directives_allowed;
void enable_listener(struct listener *listener);
/* Dequeues all listeners waiting for a resource the global wait queue */
-void dequeue_all_listeners();
+void dequeue_all_listeners(void);
/* Dequeues all listeners waiting for a resource in proxy <px>'s queue */
void dequeue_proxy_listeners(struct proxy *px);
void syslog_fd_handler(int fd);
/* Initialize/Deinitialize log buffers used for syslog messages */
-int init_log_buffers();
-void deinit_log_buffers();
+int init_log_buffers(void);
+void deinit_log_buffers(void);
/* build a log line for the session and an optional stream */
int sess_build_logline(struct session *sess, struct stream *s, char *dst, size_t maxsize, struct list *list_format);
extern struct mworker_proc *proc_self;
-void mworker_proc_list_to_env();
-int mworker_env_to_proc_list();
+void mworker_proc_list_to_env(void);
+int mworker_env_to_proc_list(void);
-void mworker_block_signals();
-void mworker_unblock_signals();
+void mworker_block_signals(void);
+void mworker_unblock_signals(void);
void mworker_broadcast_signal(struct sig_handler *sh);
void mworker_catch_sighup(struct sig_handler *sh);
void mworker_accept_wrapper(int fd);
-void mworker_cleanlisteners();
+void mworker_cleanlisteners(void);
-int mworker_child_nb();
+int mworker_child_nb(void);
-int mworker_ext_launch_all();
+int mworker_ext_launch_all(void);
void mworker_kill_max_reloads(int sig);
void pool_put_to_os(struct pool_head *pool, void *ptr);
void *pool_alloc_nocache(struct pool_head *pool);
void pool_free_nocache(struct pool_head *pool, void *ptr);
-void dump_pools_to_trash();
+void dump_pools_to_trash(void);
void dump_pools(void);
-int pool_total_failures();
-unsigned long pool_total_allocated();
-unsigned long pool_total_used();
+int pool_total_failures(void);
+unsigned long pool_total_allocated(void);
+unsigned long pool_total_used(void);
void pool_flush(struct pool_head *pool);
void pool_gc(struct pool_head *pool_ctx);
struct pool_head *create_pool(char *name, unsigned int size, unsigned int flags);
void create_pool_callback(struct pool_head **ptr, char *name, unsigned int size);
void *pool_destroy(struct pool_head *pool);
-void pool_destroy_all();
+void pool_destroy_all(void);
int mem_should_fail(const struct pool_head *pool);
extern THREAD_LOCAL size_t pool_cache_count; /* #cache objects */
void pool_evict_from_local_cache(struct pool_head *pool);
-void pool_evict_from_local_caches();
+void pool_evict_from_local_caches(void);
void pool_put_to_cache(struct pool_head *pool, void *ptr);
/* returns true if the pool is considered to have too many free objects */
void proxy_preset_defaults(struct proxy *defproxy);
void proxy_free_defaults(struct proxy *defproxy);
void proxy_destroy_defaults(struct proxy *px);
-void proxy_destroy_all_defaults();
+void proxy_destroy_all_defaults(void);
struct proxy *alloc_new_proxy(const char *name, unsigned int cap,
char **errmsg);
struct proxy *parse_new_proxy(const char *name, unsigned int cap,
unsigned int buf_out, unsigned int err_pos,
const union error_snapshot_ctx *ctx,
void (*show)(struct buffer *, const struct error_snapshot *));
-void proxy_adjust_all_maxconn();
+void proxy_adjust_all_maxconn(void);
struct proxy *cli_find_frontend(struct appctx *appctx, const char *arg);
struct proxy *cli_find_frontend(struct appctx *appctx, const char *arg);
__decl_thread(extern HA_SPINLOCK_T signals_lock);
void signal_handler(int sig);
-void __signal_process_queue();
-void deinit_signals();
+void __signal_process_queue(void);
+void deinit_signals(void);
struct sig_handler *signal_register_fct(int sig, void (*fct)(struct sig_handler *), int arg);
struct sig_handler *signal_register_task(int sig, struct task *task, int reason);
void signal_unregister_handler(struct sig_handler *handler);
void signal_unregister_target(int sig, void *target);
void signal_unregister(int sig);
-void haproxy_unblock_signals();
+void haproxy_unblock_signals(void);
static inline void signal_process_queue()
{
* - return the date of next event in <next> or eternity.
*/
-void process_runnable_tasks();
+void process_runnable_tasks(void);
/*
* Extract all expired timers from the timer queue, and wakes up all
* associated tasks.
*/
-void wake_expired_tasks();
+void wake_expired_tasks(void);
/* Checks the next timer for the current thread by looking into its own timer
* list and the global one. It may return TICK_ETERNITY if no timer is present.
* Note that the next timer might very well be slightly in the past.
*/
-int next_timer_expiry();
+int next_timer_expiry(void);
/*
* Delete every tasks before running the master polling loop
*/
-void mworker_cleantasks();
+void mworker_cleantasks(void);
/* returns the number of running tasks+tasklets on the whole process. Note
* that this *is* racy since a task may move from the global to a local
#include <string.h>
#include <import/plock.h>
-void thread_harmless_till_end();
-void thread_isolate();
-void thread_isolate_full();
-void thread_release();
-void thread_sync_release();
+void thread_harmless_till_end(void);
+void thread_isolate(void);
+void thread_isolate_full(void);
+void thread_release(void);
+void thread_sync_release(void);
void ha_tkill(unsigned int thr, int sig);
void ha_tkillall(int sig);
void ha_spin_init(HA_SPINLOCK_T *l);
/* Returns 1 if the cpu set is currently restricted for the process else 0.
* Currently only implemented for the Linux platform.
*/
-int thread_cpu_mask_forced();
+int thread_cpu_mask_forced(void);
#if !defined(DEBUG_THREAD) && !defined(DEBUG_FULL)
* timeout).
*/
void tv_update_date(int max_wait, int interrupted);
-void tv_init_process_date();
-void tv_init_thread_date();
+void tv_init_process_date(void);
+void tv_init_thread_date(void);
char *timeofday_as_iso_us(int pad);
void dump_hex(struct buffer *out, const char *pfx, const void *buf, int len, int unsafe);
int may_access(const void *ptr);
const void *resolve_sym_name(struct buffer *buf, const char *pfx, const void *addr);
-const char *get_exec_path();
+const char *get_exec_path(void);
void *get_sym_curr_addr(const char *name);
void *get_sym_next_addr(const char *name);
void ha_generate_uuid(struct buffer *output);
void ha_random_seed(const unsigned char *seed, size_t len);
void ha_random_jump96(uint32_t dist);
-uint64_t ha_random64();
+uint64_t ha_random64(void);
static inline uint32_t ha_random32()
{