[comp.os.minix] Small addition to Minix 1.3

nick@nswitgould.OZ (Nick Andrew) (06/16/88)

	I've only started applying the 1.3 diffs, but ...

stdio.h is missing a define. "clearerr" clears the EOF and ERR flags from
an open file.

#define clearerr(p)	((p)->_flags &= ~(_EOF|_ERR))

is the exact definition.

/usr/include should contain string.h and strings.h (btw this may not be
_pure_ V7 but it sure helps porting), as follows:

extern char	*strcat(), *strcpy(), *strncat(), *strncpy();
extern char	*index(), *rindex();
extern int	strcmp(), strncmp(), strlen();

	I have duplicated index and rindex into strchr and strrchr also.
In the 4.3bsd grp.h there is a field:

char	**gr_mem;

I don't know if this is missing in V7, not having access to one myself.

There should be a /usr/include/varargs.h, as follows:

typedef		char *va_list;

#define		va_decl		int va_alist;
#define		va_start(X)	(X = (char *) va_alist)
#define		va_arg(X,T)	((T *)(X += sizeof(T)))[-1]
#define		va_end(X)

	I hope some of these additions can go into 1.3

	Regards, Nick.