1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License").  You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*	Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T	*/
23/*	  All Rights Reserved  	*/
24
25
26/*
27 * Copyright (c) 1999, by Sun Microsystems, Inc.
28 * All rights reserved.
29 */
30
31/* This is a private header file.				*/
32
33#ifndef _LIBMAIL_H
34#define _LIBMAIL_H
35
36#pragma ident	"%Z%%M%	%I%	%E% SMI" 	/* SVr4.0 1.4	*/
37
38#include <stdio.h>
39#include <maillock.h>
40#include "s_string.h"
41
42#ifndef	MFMODE
43#define	MFMODE		0660		/* create mode for `/var/mail' files */
44#endif
45#ifdef	FILENAME_MAX
46#define	MAXFILENAME	FILENAME_MAX	/* max length of a filename */
47#else
48#define	MAXFILENAME	512		/* max length of a filename */
49#endif
50
51/* The following typedefs must be used in SVR4 */
52#ifdef SVR3
53typedef int mode_t;
54#else
55# include <sys/types.h>
56#endif
57
58#if defined(__STDC__) || defined(__cplusplus)
59extern	string *abspath(char *path, char *dot, string *to);
60extern	int casncmp(char *s1, char *s2, ssize_t n);
61extern	int copystream(FILE *infp, FILE *outfp);
62extern	int delempty(mode_t m, char *mailname);
63extern	char *maildomain(void);
64extern	void notify(char *user, char *msg, int check_mesg_y, char *etcdir);
65extern	int pclosevp(FILE *fp);
66extern	FILE *popenvp(char *file, char **argv, char *mode, int resetid);
67extern	char **setup_exec(char *s);
68extern	char *skipspace(char *p);
69extern	int substr(char *string1, char *string2);
70extern	void strmove(char *from, char *to);
71extern	pid_t systemvp(char *file, char **argv, int resetid);
72extern	void trimnl(char *s);
73extern	char *Xgetenv(char *env);
74extern	char *xgetenv(char *env);
75extern	int xsetenv(char *file);
76#else
77extern	string *abspath();
78extern	int casncmp();
79extern	int copystream();
80extern	int delempty();
81extern	char *maildomain();
82extern	void notify();
83extern	int pclosevp();
84extern	FILE *popenvp();
85extern	char **setup_exec();
86extern	char *skipspace();
87extern	void strmove();
88extern	int substr();
89extern	pid_t systemvp();
90extern	void trimnl();
91extern	char *Xgetenv();
92extern	char *xgetenv();
93extern	int xsetenv();
94#endif
95
96#endif /* _LIBMAIL_H */
97