#if 0
/* Memory allocation functions */
extern void *malloc(unsigned long size);
extern void *calloc(unsigned long nelem, unsigned long elsize);
extern void *realloc(void *p, unsigned long size);
extern void free(void *p);

/* I don't feel like including setjmp.h, so this is commented out for now */
/*
extern int _setjmp(jmp_buf env);
extern volatile void _longjmp(jmp_buf env, int val);
*/

/* String-to-X functions */
extern int atoi(const char *s);
extern long atol(const char *s);
extern long strtol(const char *str, char **ptr, int base);
extern double atof(const char *s);

/* String functions: string[s].h doesn't have prototypes. */
extern char *strcat(char *s1, const char *s2);
extern char *strncat(char *s1, const char *s2, size_t n);
extern char *strdup(const char *s1);
extern int  strcmp(const char *s1, const char *s2);
extern int  strncmp(const char *s1, const char *s2, size_t n);
extern int  strcasecmp(char *s1, char *s2);
extern int  strncasecmp(char *s1, char *s2, int n);
extern char *strcpy(char *s1, const char *s2);
extern char *strncpy(char *s1, const char *s2, size_t n);
extern int  strlen(const char *s);
extern char *strpbrk(const char *s1, const char *s2);
extern size_t strspn(const char *s1, const char *s2);
extern size_t  strcspn(const char *s1, const char *s2);
extern char *strstr(const char *s1, const char *s2);
extern char *strtok(char *s1, const char *s2);
extern char *index(char *s, char c);
extern char *rindex(char *s, char c);
extern char *strchr(const char *s, int c);
extern char *strrchr(const char *s, int c);


/* Memory functions: memory.h doesn't have prototypes */
/* extern void *memcpy(void *s1, const void *s2, int n); */  /* loses :( */

/* Raw IO functions */
extern int open(const char *path, int flags, ...);
extern int read(int fd, void *buf, unsigned long nbyte);
extern int close(int fd);
extern int write(int fd, const void *buf, unsigned long nbyte);
extern int ioctl(int fd, int request, void *arg);
extern int truncate(char *path, long length);
extern int select(int width, fd_set *readfds, fd_set *writefds,
		  fd_set *exceptfds, struct timeval *timeout);

/* Socket-fiddling functions */
extern int socket(int domaint, int type, int protocol);
extern int connect(int s, struct sockaddr *name, int namelen);
extern int bind(int s, struct sockaddr *name, int namelen);
extern int listen(int s, int backlog);
extern int accept(int s, struct sockaddr *addr, int *addrlen);

/* stdio functions: stdio.h doesn't have prototypes */
extern int fclose(FILE *stream);
extern int fread(char *ptr, int size, int nitems, FILE *stream);
extern int fwrite(char *ptr, int size, int nitems, FILE *stream);
extern void fseek(FILE *stream, long offset, int ptrname);
extern int fflush(FILE *stream);
/* these are necessary to avoid implicit declarations */
extern int _flsbuf();
extern int _filbuf();
extern int ungetc();

/* Formatted I/O functions */
extern int printf(char *format, ...);
extern int scanf(char *format, ...);
extern int fscanf(FILE *stream, char *format, ...);

extern int fprintf(FILE *stream, const char *format, ...);
extern char *sprintf(char *p, const char *format, ...);
extern int sscanf(char *p, const char *format, ...);

extern int fputs(char *s, FILE *stream);
extern int puts(char *s);
extern char *gets(char *s);
extern char *fgets(char *s, int n, FILE *stream);

/* Random stuff */
extern long random(void);
extern void srandom(int seed);

extern double drand48();
extern long lrand48();
extern void srand48(long seedval);

/* Time stuff */
extern time_t time(time_t *tloc);

extern char *ctime(const time_t *clock);
extern char *asctime(const struct tm *tm);
extern int dysize(int y);
extern struct tm *gmtime(const time_t *clock);
extern struct tm *localtime(const time_t *clock);
extern int strftime(char *buf, int bufsize, char *fmt, struct tm *tm);
extern char *strptime(char *buf, char *fmt, struct tm *tm);
extern time_t timegm(struct tm *tm);
extern time_t timelocal(struct tm *tm);
extern void tzset();
extern void tzsetwall();

/* Memory fiddling routines */
extern void bcopy(char *b1, char *b2, int length);
extern void bzero(char *b, int length);
 
/* and misc stuff */
extern void exit(int val);
extern int fork();
extern unsigned sleep(unsigned int seconds);
extern unsigned usleep(unsigned int microsec);

extern void perror(char *s);

extern int getopt(int argc, char **argv, char *optstring);
extern char *optarg;
extern int optind, opterr;

/* extern void qsort(void *base, int nel, int width, int (*compar)()); */

#endif
