#ifndef _SUNOS_H
#define _SUNOS_H

#ifndef pid_t
#ifdef sun386
typedef int pid_t;
#endif
#endif

#ifndef W_OK
# include <sys/file.h>
#endif

#ifndef STDIN_FILENO
# define STDIN_FILENO 0
# define STDOUT_FILENO 1
# define STDERR_FILENO 2
#endif
#ifndef _PATH_NOLOGIN
# define _PATH_NOLOGIN "/etc/no.login"
# define _PATH_BSHELL "/bin/sh"
# define _PATH_DEFPATH "/usr/bin:/usr/ucb:."
#endif
#include <sys/cdefs.h>

extern int optind, opterr, getopt();
extern char *optarg;
extern char *strerror();
	
/*
 * memmove() does not handle overlaps
 */
#define memmove(d, s, n) bcopy(s, d, n)

#ifdef S_IFMT
/* not everyone has these */
#ifndef S_ISREG
# define S_ISREG(m) ((m & S_IFMT) == S_IFREG)
#endif
#ifndef S_ISDIR
# define S_ISDIR(m) ((m & S_IFMT) == S_IFDIR)
#endif
#ifndef S_ISLNK
# define S_ISLNK(m) ((m & S_IFMT) == S_IFLNK)
#endif
#endif

#endif
