home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / CNews / Source / h / libc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-12-30  |  2.2 KB  |  76 lines

  1. #ifndef LIBC_H
  2. #define LIBC_H
  3. /*
  4.  * declarations of (supposedly) standard C library functions and types.
  5.  * we don't declare functions that once returned int but may now return void
  6.  * to avoid fatal but spurious compilation errors.  VOID is an attempt to deal
  7.  * with this transition.
  8.  *
  9.  * The function declarations need to be prototyped to give ansi compilers
  10.  * less gastric distress.
  11.  */
  12.  
  13. #ifndef VOID
  14. #define VOID void
  15. #endif
  16.  
  17. /* Unix system calls */
  18. #ifdef A_STABLE_WORLD
  19. extern VOID _exit();
  20. extern int alarm();            /* really unsigned? */
  21. #endif                    /* A_STABLE_WORLD */
  22. #ifdef __STDC__
  23. extern int access(char *, int), chown(char *, int, int), fork(void);
  24. extern int symlink(char *, char *);
  25. extern int wait(int *);
  26. extern int getuid(void), geteuid(void), getgid(void), getegid(void);
  27. extern int setuid(int), setgid(int);
  28. extern int execv(char *, char **), execl(char *, char *, ...);
  29. extern int execve(char *, char **, char **), execle(char *, char *, ...);
  30. extern int gethostname(char *, int);
  31. #else
  32. extern int symlink();
  33. extern int getuid(), geteuid(), getgid(), getegid();
  34. extern int setuid(), setgid();
  35. extern int execv(), execl(), execve(), execle();
  36. extern int gethostname();
  37. #endif
  38. extern time_t time();            /* sys/timeb.h? */
  39.  
  40. extern int errno;            /* errno.h */
  41. extern char **environ;
  42.  
  43. #include <string.h>
  44.  
  45. #ifdef A_STABLE_WORLD
  46. extern int fflush(), fputs(), ungetc();    /* stdio.h */
  47. extern int fread(), fwrite(), fseek();    /* stdio.h */
  48. extern int pclose();            /* stdio.h */
  49. extern VOID rewind();            /* stdio.h */
  50. extern VOID exit();            /* stdio.h */
  51. #endif                    /* A_STABLE_WORLD */
  52. extern FILE *popen();            /* stdio.h */
  53. /* stdio.h is supposed to declare *printf */
  54.  
  55. /* these unfortunately cannot be relied upon to be in the right header */
  56. extern struct passwd *getpwnam();    /* pwd.h */
  57. extern struct group *getgrnam();    /* grp.h */
  58. extern char *ctime();            /* time.h */
  59.  
  60. extern long atol();
  61. extern char *mktemp();
  62. extern char *getenv();
  63.  
  64. #ifdef __STDC__
  65. extern int putenv(const char *);
  66. extern int getopt(int, char **, char *);
  67. #else
  68. extern int putenv();
  69. extern int getopt();
  70. #endif                    /* __STDC__ */
  71. extern int optind;
  72. extern char *optarg;
  73.  
  74. #include "alloc.h"            /* ugh */
  75. #endif                    /* LIBC_H */
  76.