/*  ANSI-C prototypes for Zmailer  libc.a -library */

#ifndef __
# ifdef __STDC__
#  define __(x) x
# else
#  define __(x) ()
# endif
#endif
#ifndef ___
# ifdef __STDC__
#  define ___(x) x
# else
#  define ___(x) 
# endif
#endif

/* fullname.c */
extern char *fullname __((char *s, char buf[], int buflen, char *up));

/* getopt.c */
extern int getopt __((int argc, char * ___(const) *argv, const char *optstring));

/* getzenv.c */
extern int   readzenv __((char *file));
extern char *getzenv  __((char *variable));

/* mail.c */
extern char *postoffice;
extern FILE * _mail_fopen __((char **filenamep));
extern int    mail_link __((char *from, char **tonamep));
extern FILE * mail_open __((char *type));
extern int mail_abort __((FILE *fp));
extern int mail_close __((FILE *fp));
extern int mail_close_alternate __((FILE *fp, char *where, char *suffix));

/* mail_alloc.c */
extern char *mail_alloc __((unsigned int nbytes));
extern int mail_free __((char *s));

/* mail_host.c */
extern char *mail_host __((void));

/* myhostname.c */
extern int getmyhostname __((char *namebuf, int len));

/* setreuid ?? SysV beastie.. */

/* setvbuf.c */
#ifndef HAVE_SETVBUF
exten int setvbuf __((FILE *fp, char *buf, int type, int size));
#endif

/* inet_ntop() & inet_pton() */
extern const char *inet_ntop __((const int, const u_char *, char *, size_t));
extern       int   inet_pton __((const int, const void *, u_char *));
extern       int   getaddrinfo __((const char *, const char *, const struct addrinfo *, struct addrinfo **));
extern       int   getnameinfo __((const struct sockaddr *, size_t, char *, size_t, char *, size_t, int));
extern       void  freeaddrinfo __((struct addrinfo *));
extern       char *gai_strerror __((int));
extern struct hostent *gethostbyname2 __((const char *, int));
