xref: /illumos-gate/usr/src/lib/libmail/inc/libmail.h (revision 1da57d55)
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 #include <stdio.h>
37 #include <maillock.h>
38 #include "s_string.h"
39 
40 #ifndef	MFMODE
41 #define	MFMODE		0660		/* create mode for `/var/mail' files */
42 #endif
43 #ifdef	FILENAME_MAX
44 #define	MAXFILENAME	FILENAME_MAX	/* max length of a filename */
45 #else
46 #define	MAXFILENAME	512		/* max length of a filename */
47 #endif
48 
49 /* The following typedefs must be used in SVR4 */
50 #ifdef SVR3
51 typedef int mode_t;
52 #else
53 # include <sys/types.h>
54 #endif
55 
56 #if defined(__STDC__) || defined(__cplusplus)
57 extern	string *abspath(char *path, char *dot, string *to);
58 extern	int casncmp(char *s1, char *s2, ssize_t n);
59 extern	int copystream(FILE *infp, FILE *outfp);
60 extern	int delempty(mode_t m, char *mailname);
61 extern	char *maildomain(void);
62 extern	void notify(char *user, char *msg, int check_mesg_y, char *etcdir);
63 extern	int pclosevp(FILE *fp);
64 extern	FILE *popenvp(char *file, char **argv, char *mode, int resetid);
65 extern	char **setup_exec(char *s);
66 extern	char *skipspace(char *p);
67 extern	int substr(char *string1, char *string2);
68 extern	void strmove(char *from, char *to);
69 extern	pid_t systemvp(char *file, char **argv, int resetid);
70 extern	void trimnl(char *s);
71 extern	char *Xgetenv(char *env);
72 extern	char *xgetenv(char *env);
73 extern	int xsetenv(char *file);
74 #else
75 extern	string *abspath();
76 extern	int casncmp();
77 extern	int copystream();
78 extern	int delempty();
79 extern	char *maildomain();
80 extern	void notify();
81 extern	int pclosevp();
82 extern	FILE *popenvp();
83 extern	char **setup_exec();
84 extern	char *skipspace();
85 extern	void strmove();
86 extern	int substr();
87 extern	pid_t systemvp();
88 extern	void trimnl();
89 extern	char *Xgetenv();
90 extern	char *xgetenv();
91 extern	int xsetenv();
92 #endif
93 
94 #endif /* _LIBMAIL_H */
95