% /usr/local/src/mm-0.91/mm/README.POSIX, Mon Jul 18 16:14:39 1994
% Edit by Nelson H. F. Beebe <beebe@eve.math.utah.edu>

I have made experiments on several systems to see whether or not ccmd
and mm can be compiled under a pure POSIX.1 environment.  The reason
that this is of interest is that POSIX is a portable operating system
environment that is supported by some compilers on other operating
systems, including IBM PC DOS, IBM mainframe MVS, and DEC VAX VMS and
Open VMS.

With some small loss in functionality, I believe that POSIX compliance
of ccmd and mm could be obtained.

Hewlett-Packard 9000/7xx HP-UX 9.0:
	Compilation with -D_POSIX_SOURCE forces undefinition of unix,
	even if it was defined on the command line.  Since the symbol
	unix is tested in many places, I added code in osfiles.h to
	define it if __unix or __unix__ are defined, solving this
	particular problem.

	Use of gethostbyname() and struct hostent in mm/compat.c is
	only possible if _HPUX_SOURCE is defined, which if full HP
	UNIX; thus, one would have to give up hostname access in POSIX
	on this system by undefining HAVE_GETHOSTBYNAME.

	"union wait" needed in mm/exit.c is only available in the
	_HPUX_SOURCE environment; POSIX would require undefining
	HAVE_WAIT3.

	ETXTBSY in mm/file.c is only available in the _XOPEN_SOURCE
	environment, a subset of _HPUX_SOURCE; presumably some other
	errno number could be substituted here instead.

	Tests in mm/file.c using code of the type ((xxx.st_mode & S_xyz)
	== S_abc) need to be replaced by the POSIX struct stat access
	macros; this should be straightforward, since the POSIX
	definitions can be used directly, and default definitions
	supplied if they are not defined.

	In mm/set.c, the type caddr_t is needed; it is available only in
	the _HPUX_SOURCE environment.  However, it can probably be
	easily replaced by char**, which is how it is used in
	set_variable().

	In ccmd/cmfil.c and ccmd/filelist.c, the POSIX-style access
	macros for struct stat need to be used; see the remarks about
	mm/file.c above.

	In ccmd/cmmdmd.c, the ioctl() call in cmflush() needs to be
	replaced by its POSIX equivalent.

	In ccmd/pwcrunch.c, the code requires the ability to scan the
	password database by calls getpwent(); POSIX does not support
	such action, for security reasons.   However, pwcrunch is not
	needed at most installations, so this loss is not serious.
	