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 53 typedef int mode_t; 54 #else 55 # include <sys/types.h> 56 #endif 57 58 #if defined(__STDC__) || defined(__cplusplus) 59 extern string *abspath(char *path, char *dot, string *to); 60 extern int casncmp(char *s1, char *s2, ssize_t n); 61 extern int copystream(FILE *infp, FILE *outfp); 62 extern int delempty(mode_t m, char *mailname); 63 extern char *maildomain(void); 64 extern void notify(char *user, char *msg, int check_mesg_y, char *etcdir); 65 extern int pclosevp(FILE *fp); 66 extern FILE *popenvp(char *file, char **argv, char *mode, int resetid); 67 extern char **setup_exec(char *s); 68 extern char *skipspace(char *p); 69 extern int substr(char *string1, char *string2); 70 extern void strmove(char *from, char *to); 71 extern pid_t systemvp(char *file, char **argv, int resetid); 72 extern void trimnl(char *s); 73 extern char *Xgetenv(char *env); 74 extern char *xgetenv(char *env); 75 extern int xsetenv(char *file); 76 #else 77 extern string *abspath(); 78 extern int casncmp(); 79 extern int copystream(); 80 extern int delempty(); 81 extern char *maildomain(); 82 extern void notify(); 83 extern int pclosevp(); 84 extern FILE *popenvp(); 85 extern char **setup_exec(); 86 extern char *skipspace(); 87 extern void strmove(); 88 extern int substr(); 89 extern pid_t systemvp(); 90 extern void trimnl(); 91 extern char *Xgetenv(); 92 extern char *xgetenv(); 93 extern int xsetenv(); 94 #endif 95 96 #endif /* _LIBMAIL_H */ 97