home *** CD-ROM | disk | FTP | other *** search
- #ifndef LIBC_H
- #define LIBC_H
- /*
- * declarations of (supposedly) standard C library functions and types.
- * we don't declare functions that once returned int but may now return void
- * to avoid fatal but spurious compilation errors. VOID is an attempt to
- * deal with this transition. sprvalue is similar.
- *
- * The function declarations need to be prototyped to give ANSI compilers
- * less gastric distress.
- */
- /* #include <time.h> */
-
- #ifndef VOID
- # define VOID void
- #endif
-
- #ifndef sprvalue
- /*#define sprvalue char */ /* for stupid archaic 4BSD */
- # define sprvalue int
- #endif
-
- /* Unix system calls */
- /* signal types: tailor to suite local tastes */
- typedef VOID (*sigret_t)();
- typedef VOID (*sigarg_t)();
-
- #ifdef A_STABLE_WORLD
- extern VOID _exit();
- extern int access(), chown(), fork(), link();
- extern int mkdir(), umask(), unlink(), wait();
- extern int alarm(); /* really unsigned? */
- extern int getuid(), geteuid(), getgid(), getegid();
- extern int setuid(), setgid();
- extern int gethostname();
- extern int execv(), execl(), execve(), execle();
- #endif /* A_STABLE_WORLD */
-
- extern char *ctime(); /* time.h */
- /* extern time_t time();*/ /* sys/timeb.h? */
- extern int errno; /* errno.h */
- extern char **environ;
-
- /* C library */
- #ifdef A_STABLE_WORLD
- extern int strcmp(), strncmp(), strlen(); /* strings.h */
- #endif /* A_STABLE_WORLD */
-
- extern char *strcpy(), *strcat(), *strncpy(), *strncat(); /* strings.h */
- extern char *index(), *rindex(); /* strings.h */
- #ifndef LATTICE
- extern char *memcpy(); /* memory.h */
- #endif
-
- #ifdef A_STABLE_WORLD
- extern int fflush(), fputs(), ungetc(); /* stdio.h */
- extern int fread(), fwrite(), fseek(); /* stdio.h */
- extern int pclose(); /* stdio.h */
- extern VOID rewind(); /* stdio.h */
- extern VOID exit(); /* stdio.h */
- #endif /* A_STABLE_WORLD */
-
- extern FILE *popen(); /* stdio.h */
-
- #ifdef __STDC__
- extern int printf(char *fmt, ...); /* stdio.h */
- extern int fprintf(FILE *, char *fmt, ...); /* stdio.h */
- extern sprvalue sprintf(char *buf, char *fmt, ...); /* stdio.h */
- #else /* __STDC__ */
- extern int printf(), fprintf(); /* stdio.h */
- extern sprvalue sprintf(); /* stdio.h */
- #endif /* __STDC__ */
-
- /* these unfortunately cannot be relied upon to be in the right header */
- extern struct passwd *getpwnam(); /* pwd.h */
- extern struct group *getgrnam(); /* grp.h */
-
- extern long atol();
- extern char *mktemp();
- extern char *getenv();
-
- #ifdef A_STABLE_WORLD
- extern int putenv(), system();
- extern int getopt();
- #endif /* A_STABLE_WORLD */
-
- extern int optind;
- extern char *optarg;
-
- #include "alloc.h" /* ugh */
- #endif /* LIBC_H */
-