/* <unixlib.h>
 *
 *      Various Unix compatibility routines available in DEC C.
 */
#ifndef _UNIXLIB_H
#define _UNIXLIB_H
# ifdef __cplusplus
extern "C" {
# endif

/* declare the global environ[] array */
extern char ** environ __asm ("decc$ga_environ");

# define ___gdecl(_func,_arglist) _func _arglist

/* miscellaneous emulation routines */
char    *getenv(const char *);
char    *getcwd(char *,unsigned,...); /* optional arg is VMS vs shell name format */

char    *___gdecl(ecvt, (double,int,int *,int *));
char    *___gdecl(fcvt, (double,int,int *,int *));
char    *___gdecl(gcvt, (double,int,char *));

#ifndef _SYS_TYPES_H
#include <sys/types.h>
#endif

int      setgid (gid_t), setuid (uid_t);

int      brk(void *);
void    *sbrk(unsigned long);
int      chdir(const char *);
int      chmod(const char *, mode_t);
int      chown(const char *,unsigned, unsigned);
char    *ctermid(char *);
char    *cuserid(char *);
int      mkdir(const char *, mode_t,...);
int      nice(int);                     /* also in our <processes.h> */
int      umask(unsigned int);
/* end of "missing" prototypes */

#undef ___gdecl

# ifdef __cplusplus
}
# endif
#endif  /*_UNIXLIB_H*/