/*
 *
 * Copyright (C) 1993 Swedish University Network (SUNET)
 *
 *
 * This program is developed by UDAC, Uppsala University by commission
 * of the Swedish University Network (SUNET). 
 * 
 * This program is free 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 2 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITTNESS 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., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *
 *                                          Martin.Wendel@udac.uu.se
 *
 *                                          Martin Wendel
 *                                          UDAC	
 *                                          Box 174
 *                                          S-751 04 Uppsala
 *                                          Sweden
 */




#ifdef SENDMAIL_8
#ifndef SENDMAIL
#define SENDMAIL
#endif
#endif /* SENDMAIL_8 */
#include "config.h"

#if STDC_HEADERS || HAVE_STRING_H
#include <string.h>
#if !STDC_HEADERS && HAVE_MEMORY_H
#include <memory.h>
#endif
#ifndef _ALL_SOURCE
#define index strchr
#define rindex strrchr
#endif
#define bcopy(s, d, n)  memcpy((d), (s), (n))
#define bcmp(s1, s2, n) memcmp((s1), (s2), (n))
#define bzero(s, n) memset((s), 0, (n))
#else
#include <strings.h>
#endif


#ifndef SENDMAIL

# ifdef _DEFINE
#  define EXTERN
#   ifndef lint
static char MkSccsId[] =      "@(#)mk.h 0.1                12/2/93";
static char MkRcsId[] =       "@(#)$Id: mk.h,v 0.1         1993/02/12";
#   endif /* lint */
#  else /* !_DEFINE */
#   define EXTERN extern
# endif /* _DEFINE */

# include <stdio.h>
# include <errno.h>
# include <stdlib.h>
# include <syslog.h>
# include "charset/iso646.h"
# include "charset/charset.h"

# if defined(__STDC__)
#  include <stdarg.h>
# else
#  include <varargs.h>
# endif /* __STDC__ */

# define sfgets fgets
# define syserr printf
typedef char MAILER;
# include "mkcdefs.h"
# define newstr(s)  strcpy((char *)xalloc((int)strlen(s) + 1), s);
#include "mkspec.h"

#else /* SENDMAIL */

# include "sendmail.h"
# define HAS_XALLOC
#endif /* ! SENDMAIL */

