home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / uucp / auucp+-1.02 / fuucp_news_src.lzh / cnews / include / libc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-11-21  |  2.6 KB  |  92 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
  7.  * deal with this transition.  sprvalue is similar.
  8.  *
  9.  * The function declarations need to be prototyped to give ANSI compilers
  10.  * less gastric distress.
  11.  */
  12. /* #include <time.h> */
  13.  
  14. #ifndef VOID
  15. #  define VOID void
  16. #endif
  17.  
  18. #ifndef sprvalue
  19. /*#define sprvalue char */                    /* for stupid archaic 4BSD */
  20. #  define sprvalue int
  21. #endif
  22.  
  23. /* Unix system calls */
  24. /* signal types: tailor to suite local tastes */
  25. typedef VOID (*sigret_t)();
  26. typedef VOID (*sigarg_t)();
  27.  
  28. #ifdef A_STABLE_WORLD
  29. extern VOID _exit();
  30. extern int access(), chown(), fork(), link();
  31. extern int mkdir(), umask(), unlink(), wait();
  32. extern int alarm();                                    /* really unsigned? */
  33. extern int getuid(), geteuid(), getgid(), getegid();
  34. extern int setuid(), setgid();
  35. extern int gethostname();
  36. extern int execv(), execl(), execve(), execle();
  37. #endif    /* A_STABLE_WORLD */
  38.  
  39. extern char *ctime();                        /* time.h */
  40. /* extern time_t time();*/                        /* sys/timeb.h? */
  41. extern int errno;                                        /* errno.h */
  42. extern char **environ;
  43.  
  44. /* C library */
  45. #ifdef A_STABLE_WORLD
  46. extern int strcmp(), strncmp(), strlen();                /* strings.h */
  47. #endif    /* A_STABLE_WORLD */
  48.  
  49. extern char *strcpy(), *strcat(), *strncpy(), *strncat();    /* strings.h */
  50. extern char *index(), *rindex();                        /* strings.h */
  51. #ifndef LATTICE
  52. extern char *memcpy();                                    /* memory.h */
  53. #endif
  54.  
  55. #ifdef A_STABLE_WORLD
  56. extern int fflush(), fputs(), ungetc();                    /* stdio.h */
  57. extern int fread(), fwrite(), fseek();                    /* stdio.h */
  58. extern int pclose();                                    /* stdio.h */
  59. extern VOID rewind();                                    /* stdio.h */
  60. extern VOID exit();                                        /* stdio.h */
  61. #endif    /* A_STABLE_WORLD */
  62.  
  63. extern FILE *popen();                                    /* stdio.h */
  64.  
  65. #ifdef __STDC__
  66. extern int printf(char *fmt, ...);                        /* stdio.h */
  67. extern int fprintf(FILE *, char *fmt, ...);                /* stdio.h */
  68. extern sprvalue sprintf(char *buf, char *fmt, ...);        /* stdio.h */
  69. #else    /* __STDC__ */
  70. extern int printf(), fprintf();                            /* stdio.h */
  71. extern sprvalue sprintf();                                /* stdio.h */
  72. #endif    /* __STDC__ */
  73.  
  74. /* these unfortunately cannot be relied upon to be in the right header */
  75. extern struct passwd *getpwnam();                        /* pwd.h */
  76. extern struct group *getgrnam();                        /* grp.h */
  77.  
  78. extern long atol();
  79. extern char *mktemp();
  80. extern char *getenv();
  81.  
  82. #ifdef A_STABLE_WORLD
  83. extern int putenv(), system();
  84. extern int getopt();
  85. #endif    /* A_STABLE_WORLD */
  86.  
  87. extern int optind;
  88. extern char *optarg;
  89.  
  90. #include "alloc.h"                                        /* ugh */
  91. #endif    /* LIBC_H */
  92.