From 3dc53f9d41240124245e49e6f3b26e5df730896c Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Thu, 25 Jul 2002 20:33:31 +0000 Subject: [PATCH] * mcserv.c [HAVE_MAD]: Include "../src/mad.c" at the end of file to fix compilation. (main): Add mad_init() and mad_finalize(). --- vfs/ChangeLog | 6 ++++++ vfs/mcserv.c | 13 ++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/vfs/ChangeLog b/vfs/ChangeLog index 65a46f72f..5dba9bfe8 100644 --- a/vfs/ChangeLog +++ b/vfs/ChangeLog @@ -1,3 +1,9 @@ +2002-07-25 Andrew V. Samoilov + + * mcserv.c [HAVE_MAD]: Include "../src/mad.c" at the end of + file to fix compilation. + (main): Add mad_init() and mad_finalize(). + 2002-07-19 Pavel Roskin * ftpfs.c: Don't use SUP.home, use SUP.cwdir. diff --git a/vfs/mcserv.c b/vfs/mcserv.c index bf4df2d26..62bf8bb13 100644 --- a/vfs/mcserv.c +++ b/vfs/mcserv.c @@ -1225,6 +1225,9 @@ int main (int argc, char *argv []) extern char *optarg; int c; +#ifdef HAVE_MAD + mad_init (); +#endif while ((c = getopt (argc, argv, "fdiqp:v")) != -1){ switch (c){ case 'd': @@ -1288,12 +1291,20 @@ int main (int argc, char *argv []) pmap_unset (RPC_PROGNUM, RPC_PROGVER); #endif } +#ifdef HAVE_MAD + mad_finalize (__FILE__, __LINE__); +#endif exit (return_code); } /* FIXME: This function should not be used in mcserv */ void vfs_die( char *m ) { - fprintf (stderr, m); + fputs (m, stderr); exit (1); } + +/* Here to avoid undefining of malloc and family */ +#ifdef HAVE_MAD +#include "../src/mad.c" +#endif