This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Mailutils".
http://git.savannah.gnu.org/cgit/mailutils.git/commit/?id=f84bcd99f10ab957af4c84601f9aaaeb43de98b7 The branch, master has been updated via f84bcd99f10ab957af4c84601f9aaaeb43de98b7 (commit) via 6ffef584f46e175b1ae29a1b152316dacc8a08fd (commit) from 73fe9290251b13e7e5d978a6bfbe014499f87e36 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit f84bcd99f10ab957af4c84601f9aaaeb43de98b7 Author: Sergey Poznyakoff <g...@gnu.org.ua> Date: Thu Aug 13 21:44:53 2009 +0300 Improve memory allocation in pop3d. * pop3d/pop3d.c (pop3d_alloc_die): New function. (main): Set mu_alloc_die_hook. (pop3d_mainloop): Use mu_alloc. * pop3d/pop3d.h: Include mailutils/alloc.h commit 6ffef584f46e175b1ae29a1b152316dacc8a08fd Author: Sergey Poznyakoff <g...@gnu.org.ua> Date: Thu Aug 13 21:43:03 2009 +0300 Further improvements of the configure system. * Makefile.am (MU_COND_LIBMU_CPP): New cond. (SUBDIRS): Use LIBMU_CPP_DIR * configure.ac: Rename --disable-c++ to --disable-cxx: autoconf cannot handle the former. (MU_COND_LIBMU_CPP): New cond. (AC_CONFIG_FILES): Add include/mailutils/cpp/Makefile * include/mailutils/Makefile.am (nobase_pkginclude_HEADERS): Remove (MU_COND_LIBMU_CPP): New cond. (SUBDIRS): Add CPP_DIR * include/mailutils/cpp/Makefile.am: Remove substitution vars. (cppincludedir, cppinclude_HEADERS): New variables. * include/mailutils/sys/Makefile.am (sysincludedir) (sysinclude_HEADERS): New variables. ----------------------------------------------------------------------- Summary of changes: Makefile.am | 6 +++++- configure.ac | 5 +++-- include/mailutils/Makefile.am | 9 +++++---- include/mailutils/cpp/Makefile.am | 6 ++---- include/mailutils/sys/Makefile.am | 4 ++++ pop3d/pop3d.c | 16 ++++++++++------ pop3d/pop3d.h | 1 + 7 files changed, 30 insertions(+), 17 deletions(-) diff --git a/Makefile.am b/Makefile.am index ba37745..5cabed2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -84,6 +84,10 @@ if MU_COND_LIBMU_SCM LIBMU_SCM_DIR = libmu_scm endif +if MU_COND_LIBMU_CPP + LIBMU_CPP_DIR = libmu_cpp +endif + SUBDIRS = \ mu-aux\ include\ @@ -96,7 +100,7 @@ SUBDIRS = \ lib\ libmu_argp\ libmu_cfg\ - libmu_cpp\ + $(LIBMU_CPP_DIR)\ $(LIBMU_SCM_DIR)\ libmu_sieve\ $(PYTHON_DIR)\ diff --git a/configure.ac b/configure.ac index f9ddd2e..0258618 100644 --- a/configure.ac +++ b/configure.ac @@ -1141,10 +1141,10 @@ if test "$status_python" = yes; then fi AM_CONDITIONAL([MU_COND_PYTHON], [test "$status_python" = yes]) -AC_SUBST(MU_CXX_LTLIBRARIES_BUILD) AC_SUBST(MU_CXX_EXAMPLES_BUILD) -MU_ENABLE_SUPPORT(c++, +MU_ENABLE_SUPPORT(cxx, [MU_CXX_EXAMPLES_BUILD='$(MU_CXX_EXAMPLES_LIST)']) +AM_CONDITIONAL([MU_COND_LIBMU_CPP], [test "$mu_cv_enable_cxx" = yes]) # Default mailbox record # Note: 1. Support for mbox type is always enabled. @@ -1332,6 +1332,7 @@ AC_CONFIG_FILES([ include/Makefile include/mailutils/Makefile include/mailutils/sys/Makefile + include/mailutils/cpp/Makefile lib/Makefile libmu_argp/Makefile libmu_auth/Makefile diff --git a/include/mailutils/Makefile.am b/include/mailutils/Makefile.am index b38f239..3ffda26 100644 --- a/include/mailutils/Makefile.am +++ b/include/mailutils/Makefile.am @@ -98,8 +98,9 @@ pkginclude_HEADERS = \ vartab.h\ version.h -nobase_pkginclude_HEADERS = \ - sys/nntp.h\ - sys/pop3.h -SUBDIRS = sys +if MU_COND_LIBMU_CPP + CPP_DIR = cpp +endif + +SUBDIRS = sys $(CPP_DIR) diff --git a/include/mailutils/cpp/Makefile.am b/include/mailutils/cpp/Makefile.am index 69c15b6..4438972 100644 --- a/include/mailutils/cpp/Makefile.am +++ b/include/mailutils/cpp/Makefile.am @@ -16,7 +16,8 @@ ## along with GNU Mailutils; if not, write to the Free Software ## Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -MU_CXX_INCLUDES = \ +cppincludedir=$(pkgincludedir)/cpp +cppinclude_HEADERS = \ address.h\ attribute.h\ body.h\ @@ -41,6 +42,3 @@ MU_CXX_INCLUDES = \ sieve.h\ stream.h\ url.h - -pkginclude_HEADERS = @MU_CXX_INCLUDES@ -EXTRA_HEADERS = '$(MU_CXX_INCLUDES)' diff --git a/include/mailutils/sys/Makefile.am b/include/mailutils/sys/Makefile.am index 59d3c18..75aab66 100644 --- a/include/mailutils/sys/Makefile.am +++ b/include/mailutils/sys/Makefile.am @@ -17,3 +17,7 @@ ## Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA ## 02110-1301 USA +sysincludedir=$(pkgincludedir)/sys +sysinclude_HEADERS = \ + nntp.h\ + pop3.h diff --git a/pop3d/pop3d.c b/pop3d/pop3d.c index 16fa21e..8b05ace 100644 --- a/pop3d/pop3d.c +++ b/pop3d/pop3d.c @@ -301,9 +301,7 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile) /* Prepare the shared secret for APOP. */ { char *local_hostname; - local_hostname = malloc (MAXHOSTNAMELEN + 1); - if (local_hostname == NULL) - pop3d_abquit (ERR_NO_MEM); + local_hostname = mu_alloc (MAXHOSTNAMELEN + 1); /* Get our canonical hostname. */ { @@ -317,9 +315,7 @@ pop3d_mainloop (int fd, FILE *infile, FILE *outfile) } } - md5shared = malloc (strlen (local_hostname) + 51); - if (md5shared == NULL) - pop3d_abquit (ERR_NO_MEM); + md5shared = mu_alloc (strlen (local_hostname) + 51); snprintf (md5shared, strlen (local_hostname) + 50, "<%u...@%s>", getpid (), (unsigned)time (NULL), local_hostname); @@ -388,6 +384,12 @@ pop3d_connection (int fd, struct sockaddr *sa, int salen, void *data, return 0; } +static void +pop3d_alloc_die () +{ + pop3d_abquit (ERR_NO_MEM); +} + int main (int argc, char **argv) { @@ -421,6 +423,8 @@ main (int argc, char **argv) mu_m_server_set_default_port (server, 110); mu_m_server_set_timeout (server, 600); mu_m_server_set_strexit (server, mu_strexit); + + mu_alloc_die_hook = pop3d_alloc_die; if (mu_app_init (&argp, pop3d_argp_capa, pop3d_cfg_param, argc, argv, 0, NULL, server)) diff --git a/pop3d/pop3d.h b/pop3d/pop3d.h index cadbff5..e1b3059 100644 --- a/pop3d/pop3d.h +++ b/pop3d/pop3d.h @@ -101,6 +101,7 @@ extern int expire_on_exit; #endif #include <sysexits.h> +#include <mailutils/alloc.h> #include <mailutils/cctype.h> #include <mailutils/cstr.h> #include <mailutils/attribute.h> hooks/post-receive -- GNU Mailutils _______________________________________________ Commit-mailutils mailing list Commit-mailutils@gnu.org http://lists.gnu.org/mailman/listinfo/commit-mailutils