From cbefcb9d9b85519fd1b098f622255ea318e78fd7 Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Mon, 19 Nov 2012 23:24:17 -0500 Subject: [PATCH] getting with the times, we dont need to wrap snprintf anymore --- citadel/Makefile.in | 2 +- citadel/citserver.c | 5 ---- citadel/clientsocket.c | 3 --- citadel/context.c | 4 --- citadel/control.c | 5 ---- citadel/file_ops.c | 5 ---- citadel/include/ctdl_module.h | 6 ----- citadel/internet_addressing.c | 7 ----- citadel/modules/imap/imap_tools.c | 4 --- citadel/modules/instmsg/serv_instmsg.c | 12 --------- citadel/modules/listsub/serv_listsub.c | 19 ++------------ .../modules/managesieve/serv_managesieve.c | 26 +++++-------------- citadel/modules/network/serv_netconfig.c | 13 +--------- citadel/modules/network/serv_netmail.c | 13 +--------- citadel/modules/network/serv_netspool.c | 16 +----------- citadel/modules/network/serv_network.c | 13 +--------- citadel/modules/network/serv_networkclient.c | 14 +--------- citadel/modules/roomchat/serv_roomchat.c | 13 ---------- citadel/modules/smtp/serv_smtp.c | 8 ------ citadel/serv_extensions.c | 4 --- citadel/server_main.c | 3 --- citadel/sysdep.c | 4 --- citadel/utils/aidepost.c | 5 ---- citadel/utils/citmail.c | 3 --- webcit/sysdep.c | 3 --- webcit/webserver.c | 3 --- 26 files changed, 15 insertions(+), 198 deletions(-) diff --git a/citadel/Makefile.in b/citadel/Makefile.in index e6018be85..553ea0435 100644 --- a/citadel/Makefile.in +++ b/citadel/Makefile.in @@ -81,7 +81,7 @@ SOURCES=utils/aidepost.c utils/citmail.c \ domain.c serv_extensions.c file_ops.c genstamp.c \ housekeeping.c ical_dezonify.c internet_addressing.c ecrash.c \ locate_host.c md5.c auth.c msgbase.c parsedate.c \ - room_ops.c euidindex.c server_main.c snprintf.c ldap.c \ + room_ops.c euidindex.c server_main.c ldap.c \ support.c sysdep.c user_ops.c journaling.c threads.c \ context.c event_client.c diff --git a/citadel/citserver.c b/citadel/citserver.c index 0c8955a8a..761947375 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -65,11 +65,6 @@ #include "euidindex.h" #include "context.h" #include "svn_revision.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" char *unique_session_numbers; diff --git a/citadel/clientsocket.c b/citadel/clientsocket.c index 1f163c222..ef20ac7b6 100644 --- a/citadel/clientsocket.c +++ b/citadel/clientsocket.c @@ -34,9 +34,6 @@ #include #include "citadel.h" #include "server.h" -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif #include "sysdep_decls.h" #include "config.h" #include "clientsocket.h" diff --git a/citadel/context.c b/citadel/context.c index 80c41a92a..86bf5c0d9 100644 --- a/citadel/context.c +++ b/citadel/context.c @@ -69,10 +69,6 @@ #include #endif -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" #include "threads.h" #include "user_ops.h" diff --git a/citadel/control.c b/citadel/control.c index b81526cf1..ea1591f9c 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -50,11 +50,6 @@ #include "user_ops.h" #include "database.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" struct CitControl CitControl; diff --git a/citadel/file_ops.c b/citadel/file_ops.c index a3e8d7498..b52915e70 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -37,11 +37,6 @@ #include "msgbase.h" #include "citserver.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" #include "user_ops.h" diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index 0287daa7b..129269215 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -45,12 +45,6 @@ #endif #include - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - - #include #include "server.h" diff --git a/citadel/internet_addressing.c b/citadel/internet_addressing.c index e082b13b5..3237007d6 100644 --- a/citadel/internet_addressing.c +++ b/citadel/internet_addressing.c @@ -41,14 +41,7 @@ #include "room_ops.h" #include "parsedate.h" #include "database.h" - #include "ctdl_module.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - - #ifdef HAVE_ICONV #include diff --git a/citadel/modules/imap/imap_tools.c b/citadel/modules/imap/imap_tools.c index e3cc6bffc..bced70fd1 100644 --- a/citadel/modules/imap/imap_tools.c +++ b/citadel/modules/imap/imap_tools.c @@ -34,10 +34,6 @@ #include "imap_tools.h" #include "ctdl_module.h" -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - /* String handling helpers */ /* This code uses some pretty nasty string manipulation. To make everything diff --git a/citadel/modules/instmsg/serv_instmsg.c b/citadel/modules/instmsg/serv_instmsg.c index 040c1b42e..d84ce6244 100644 --- a/citadel/modules/instmsg/serv_instmsg.c +++ b/citadel/modules/instmsg/serv_instmsg.c @@ -5,18 +5,11 @@ * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. - * - * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * - * - * - * */ #include "sysdep.h" #include @@ -51,11 +44,6 @@ #include "config.h" #include "msgbase.h" #include "user_ops.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" struct imlog { diff --git a/citadel/modules/listsub/serv_listsub.c b/citadel/modules/listsub/serv_listsub.c index a233e6c0e..8940c952e 100644 --- a/citadel/modules/listsub/serv_listsub.c +++ b/citadel/modules/listsub/serv_listsub.c @@ -3,20 +3,13 @@ * * Copyright (c) 2002-2012 by the citadel.org team * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3. + * This program is open source software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3. * - * - * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * - * - * - * */ #include "sysdep.h" @@ -56,16 +49,8 @@ #include "internet_addressing.h" #include "clientsocket.h" #include "file_ops.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - - - #include "ctdl_module.h" - /* * Generate a randomizationalisticized token to use for authentication of * a subscribe or unsubscribe request. diff --git a/citadel/modules/managesieve/serv_managesieve.c b/citadel/modules/managesieve/serv_managesieve.c index a256d3deb..4fa99a72a 100644 --- a/citadel/modules/managesieve/serv_managesieve.c +++ b/citadel/modules/managesieve/serv_managesieve.c @@ -8,19 +8,13 @@ * * Copyright (c) 2007-2012 by the citadel.org team * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3. - * - * + * This program is open source software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 3. * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * - * - * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. */ #include "sysdep.h" @@ -68,17 +62,11 @@ #include "clientsocket.h" #include "locate_host.h" #include "citadel_dirs.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - - #include "ctdl_module.h" #include "serv_sieve.h" -/** +/* * http://tools.ietf.org/html/draft-martin-managesieve-06 * * this is the draft this code tries to implement. diff --git a/citadel/modules/network/serv_netconfig.c b/citadel/modules/network/serv_netconfig.c index b250e6d72..0aed2938b 100644 --- a/citadel/modules/network/serv_netconfig.c +++ b/citadel/modules/network/serv_netconfig.c @@ -5,19 +5,13 @@ * Copyright (c) 2000-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * ** NOTE ** A word on the S_NETCONFIGS semaphore: * This is a fairly high-level type of critical section. It ensures that no * two threads work on the netconfigs files at the same time. Since we do @@ -81,11 +75,6 @@ #include "file_ops.h" #include "citadel_dirs.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "context.h" #include "netconfig.h" #include "netspool.h" diff --git a/citadel/modules/network/serv_netmail.c b/citadel/modules/network/serv_netmail.c index 4270009fa..a793c5f60 100644 --- a/citadel/modules/network/serv_netmail.c +++ b/citadel/modules/network/serv_netmail.c @@ -5,19 +5,13 @@ * Copyright (c) 2000-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * ** NOTE ** A word on the S_NETCONFIGS semaphore: * This is a fairly high-level type of critical section. It ensures that no * two threads work on the netconfigs files at the same time. Since we do @@ -81,11 +75,6 @@ #include "file_ops.h" #include "citadel_dirs.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "context.h" #include "netconfig.h" #include "netspool.h" diff --git a/citadel/modules/network/serv_netspool.c b/citadel/modules/network/serv_netspool.c index 1aeb10ffc..f333e4bb1 100644 --- a/citadel/modules/network/serv_netspool.c +++ b/citadel/modules/network/serv_netspool.c @@ -5,19 +5,13 @@ * Copyright (c) 2000-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * ** NOTE ** A word on the S_NETCONFIGS semaphore: * This is a fairly high-level type of critical section. It ensures that no * two threads work on the netconfigs files at the same time. Since we do @@ -81,20 +75,12 @@ #include "file_ops.h" #include "citadel_dirs.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "context.h" #include "netconfig.h" #include "netspool.h" #include "netmail.h" #include "ctdl_module.h" - - - int read_spoolcontrol_file(SpoolControl **scc, char *filename) { FILE *fp; diff --git a/citadel/modules/network/serv_network.c b/citadel/modules/network/serv_network.c index 9c6fb5a7b..578a8e17e 100644 --- a/citadel/modules/network/serv_network.c +++ b/citadel/modules/network/serv_network.c @@ -5,19 +5,13 @@ * Copyright (c) 2000-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * ** NOTE ** A word on the S_NETCONFIGS semaphore: * This is a fairly high-level type of critical section. It ensures that no * two threads work on the netconfigs files at the same time. Since we do @@ -81,11 +75,6 @@ #include "file_ops.h" #include "citadel_dirs.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "context.h" #include "netconfig.h" #include "netspool.h" diff --git a/citadel/modules/network/serv_networkclient.c b/citadel/modules/network/serv_networkclient.c index 105b27ab9..92ae1f78b 100644 --- a/citadel/modules/network/serv_networkclient.c +++ b/citadel/modules/network/serv_networkclient.c @@ -5,19 +5,13 @@ * Copyright (c) 2000-2012 by the citadel.org team * * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. + * it under the terms of the GNU General Public License, version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * * ** NOTE ** A word on the S_NETCONFIGS semaphore: * This is a fairly high-level type of critical section. It ensures that no * two threads work on the netconfigs files at the same time. Since we do @@ -76,13 +70,7 @@ #include "file_ops.h" #include "citadel_dirs.h" #include "threads.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "context.h" - #include "netconfig.h" #include "ctdl_module.h" diff --git a/citadel/modules/roomchat/serv_roomchat.c b/citadel/modules/roomchat/serv_roomchat.c index c153c4f11..bc2f65c27 100644 --- a/citadel/modules/roomchat/serv_roomchat.c +++ b/citadel/modules/roomchat/serv_roomchat.c @@ -5,18 +5,11 @@ * * This program is open source software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 3. - * - * * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * - * - * - * */ #include "sysdep.h" #include @@ -51,14 +44,8 @@ #include "config.h" #include "msgbase.h" #include "user_ops.h" - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" - struct chatmsg { struct chatmsg *next; time_t timestamp; diff --git a/citadel/modules/smtp/serv_smtp.c b/citadel/modules/smtp/serv_smtp.c index a4e7d75af..ff81df7de 100644 --- a/citadel/modules/smtp/serv_smtp.c +++ b/citadel/modules/smtp/serv_smtp.c @@ -77,14 +77,6 @@ #include "clientsocket.h" #include "locate_host.h" #include "citadel_dirs.h" - - - -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - - #include "ctdl_module.h" #include "smtp_util.h" diff --git a/citadel/serv_extensions.c b/citadel/serv_extensions.c index 861ecb849..dee82748d 100644 --- a/citadel/serv_extensions.c +++ b/citadel/serv_extensions.c @@ -35,10 +35,6 @@ #include "ctdl_module.h" -#ifndef HAVE_SNPRINTF -#include -#include "snprintf.h" -#endif int DebugModules = 0; diff --git a/citadel/server_main.c b/citadel/server_main.c index 7c6a46434..8f432963b 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -74,9 +74,6 @@ #include #endif -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif const char *CitadelServiceUDS="citadel-UDS"; const char *CitadelServiceTCP="citadel-TCP"; diff --git a/citadel/sysdep.c b/citadel/sysdep.c index b59445a85..6bdbac3e7 100644 --- a/citadel/sysdep.c +++ b/citadel/sysdep.c @@ -73,10 +73,6 @@ #include #endif -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - #include "ctdl_module.h" #include "threads.h" #include "user_ops.h" diff --git a/citadel/utils/aidepost.c b/citadel/utils/aidepost.c index d4446a1ef..43203a294 100644 --- a/citadel/utils/aidepost.c +++ b/citadel/utils/aidepost.c @@ -22,11 +22,6 @@ #include "citadel.h" #include "citadel_dirs.h" -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif - - /* * Simplified function to generate a message in our format */ diff --git a/citadel/utils/citmail.c b/citadel/utils/citmail.c index a7a4c9006..becdb9abc 100644 --- a/citadel/utils/citmail.c +++ b/citadel/utils/citmail.c @@ -31,9 +31,6 @@ #include #include #include "citadel.h" -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif #include "citadel_dirs.h" int serv_sock; diff --git a/webcit/sysdep.c b/webcit/sysdep.c index 5d81fe3d2..0c0ac90e2 100644 --- a/webcit/sysdep.c +++ b/webcit/sysdep.c @@ -59,9 +59,6 @@ #include #endif -#ifndef HAVE_SNPRINTF -#include "snprintf.h" -#endif #include "webserver.h" #include "modules_init.h" #if HAVE_BACKTRACE diff --git a/webcit/webserver.c b/webcit/webserver.c index c618e5402..99e457403 100644 --- a/webcit/webserver.c +++ b/webcit/webserver.c @@ -14,9 +14,6 @@ #include "webserver.h" #include "modules_init.h" -#ifndef HAVE_SNPRINTF -int vsnprintf(char *buf, size_t max, const char *fmt, va_list argp); -#endif extern int msock; /* master listening socket */ extern char static_icon_dir[PATH_MAX]; /* where should we find our mime icons */ -- 2.30.2