Thread: [srvx-commits] CVS: services/src config.h.in,1.25,1.26 main.c,1.112,1.113
Brought to you by:
entrope
From: Entrope <en...@us...> - 2001-09-28 15:18:22
|
Update of /cvsroot/srvx/services/src In directory usw-pr-cvs1:/tmp/cvs-serv15382/src Modified Files: config.h.in main.c Log Message: clean up some defines Index: config.h.in =================================================================== RCS file: /cvsroot/srvx/services/src/config.h.in,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -r1.25 -r1.26 *** config.h.in 2001/09/27 21:58:07 1.25 --- config.h.in 2001/09/28 15:18:20 1.26 *************** *** 15,18 **** --- 15,21 ---- #undef C_ALLOCA + /* Define to enable various debug behaviors. */ + #undef DEBUG + /* Define to 1 if translation of program messages to the user's native language is requested. */ Index: main.c =================================================================== RCS file: /cvsroot/srvx/services/src/main.c,v retrieving revision 1.112 retrieving revision 1.113 diff -C2 -r1.112 -r1.113 *** main.c 2001/09/27 21:58:07 1.112 --- main.c 2001/09/28 15:18:20 1.113 *************** *** 20,23 **** --- 20,25 ---- #define PID_FILE "srvx.pid" + /* Stupid glibc !#@^*%& freaks and their hidden declarations of strsignal() */ + #define _GNU_SOURCE 1 #include "config.h" *************** *** 91,98 **** void write_databases(void); ! #ifndef HAVE_STRSIGNAL ! log(MAIN_LOG, LOG_INFO, "Signal %d -- writing databases.\n", x); ! #else log(MAIN_LOG, LOG_INFO, "%s -- writing databases.\n", strsignal(x)); #endif write_databases(); --- 93,100 ---- void write_databases(void); ! #if defined(HAVE_STRSIGNAL) log(MAIN_LOG, LOG_INFO, "%s -- writing databases.\n", strsignal(x)); + #else + log(MAIN_LOG, LOG_INFO, "Signal %d -- writing databases.\n", x); #endif write_databases(); *************** *** 101,108 **** void sigaction_rehash(int x) { ! #ifndef HAVE_STRSIGNAL ! log(MAIN_LOG, LOG_INFO, "Signal %d -- rehashing.\n", x); ! #else log(MAIN_LOG, LOG_INFO, "%s -- rehashing.\n", strsignal(x)); #endif conf_read(services_config); --- 103,110 ---- void sigaction_rehash(int x) { ! #if defined(HAVE_STRSIGNAL) log(MAIN_LOG, LOG_INFO, "%s -- rehashing.\n", strsignal(x)); + #else + log(MAIN_LOG, LOG_INFO, "Signal %d -- rehashing.\n", x); #endif conf_read(services_config); *************** *** 223,227 **** } ! #ifdef HAVE_SYS_RESOURCE_H static int --- 225,229 ---- } ! #if defined(HAVE_SYS_RESOURCE_H) static int *************** *** 262,272 **** dict_insert(values, "data", (void*)RLIMIT_DATA); dict_insert(values, "stack", (void*)RLIMIT_STACK); ! #ifdef RLIMIT_VMEM dict_insert(values, "vmem", (void*)RLIMIT_VMEM); ! #else ! #ifdef RLIMIT_AS dict_insert(values, "vmem", (void*)RLIMIT_AS); #endif - #endif if ((rd = conf_get_node("rlimits")) && (dict = GET_RECORD_OBJECT(rd))) { --- 264,272 ---- dict_insert(values, "data", (void*)RLIMIT_DATA); dict_insert(values, "stack", (void*)RLIMIT_STACK); ! #if defined(RLIMIT_VMEM) dict_insert(values, "vmem", (void*)RLIMIT_VMEM); ! #elif defined(RLIMIT_AS) dict_insert(values, "vmem", (void*)RLIMIT_AS); #endif if ((rd = conf_get_node("rlimits")) && (dict = GET_RECORD_OBJECT(rd))) { *************** *** 367,376 **** break; case 'k': ! if(conf_read(services_config)) ! { printf("%s appears to be a valid configuration file.\n", services_config); ! } ! else ! { printf("%s is an invalid configuration file.\n", services_config); } --- 367,373 ---- break; case 'k': ! if (conf_read(services_config)) { printf("%s appears to be a valid configuration file.\n", services_config); ! } else { printf("%s is an invalid configuration file.\n", services_config); } *************** *** 404,416 **** version(); ! #ifdef __CYGWIN__ ! if(daemon) ! { fprintf(stderr, "Daemon mode not supported under Cygwin.\n"); daemon = 0; ! } #endif ! ! if (daemon) silent = 1; if (replay_file) { --- 401,412 ---- version(); ! if (daemon) { ! #if defined(__CYGWIN__) fprintf(stderr, "Daemon mode not supported under Cygwin.\n"); daemon = 0; ! #else ! silent = 1; #endif ! } if (replay_file) { *************** *** 464,477 **** reg_exit_func(conf_close); tools_init(); - tmp = conf_server_ping_freq(); - if (tmp != -1) ping_freq = tmp; - tmp = conf_server_ping_timeout(); - if (tmp != -1) ping_timeout = tmp; timeq_init(); gline_init(); ! sockcheck_init(); init_structs(); - modules_init(); proto_init(); alias_init(); --- 460,471 ---- reg_exit_func(conf_close); + if ((tmp = conf_server_ping_freq()) != -1) ping_freq = tmp; + if ((tmp = conf_server_ping_timeout()) != -1) ping_timeout = tmp; + modules_init(); tools_init(); timeq_init(); gline_init(); ! sockcheck_init(); /* could be modularized */ init_structs(); proto_init(); alias_init(); |