home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / include / libc.h < prev    next >
C/C++ Source or Header  |  1990-12-23  |  2KB  |  82 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.  sprvalue is similar.
  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. #ifndef sprvalue
  17. /*#define sprvalue char *    /* for stupid archaic 4BSD */
  18. #define sprvalue int
  19. #endif
  20.  
  21. /* Unix system calls */
  22. /* signal types: tailor to suite local tastes */
  23. typedef VOID (*sigret_t)();
  24. typedef VOID (*sigarg_t)();
  25.  
  26. #ifdef A_STABLE_WORLD
  27. extern VOID _exit();
  28. extern int access(), chown(), fork(), link(), mkdir(), umask(), unlink(), wait();
  29. extern int alarm();            /* really unsigned? */
  30. extern int getuid(), geteuid(), getgid(), getegid();
  31. extern int setuid(), setgid();
  32. extern int gethostname();
  33. extern int execv(), execl(), execve(), execle();
  34. #endif                    /* A_STABLE_WORLD */
  35.  
  36. #ifndef AMIGA
  37. extern time_t time();            /* sys/timeb.h? */
  38. #else
  39. # include <time.h>
  40. extern char *envparm(char *var);
  41. extern char *mkfilename(char *dest, char *dir, char *name);
  42. #endif
  43.  
  44. extern int errno;            /* errno.h */
  45. extern char **environ;
  46.  
  47. /* C library */
  48. #ifdef A_STABLE_WORLD
  49. extern int strcmp(), strncmp(), strlen();    /* strings.h */
  50. #endif                    /* A_STABLE_WORLD */
  51. extern char *strcpy(), *strcat(), *strncpy(), *strncat();    /* strings.h */
  52. extern char *strchr(), *strrchr();    /* strings.h */
  53.  
  54. #ifdef A_STABLE_WORLD
  55. extern int fflush(), fputs(), ungetc();    /* stdio.h */
  56. extern int fread(), fwrite(), fseek();    /* stdio.h */
  57. extern int pclose();            /* stdio.h */
  58. extern VOID rewind();            /* stdio.h */
  59. extern VOID exit();            /* stdio.h */
  60. #endif                    /* A_STABLE_WORLD */
  61. extern FILE *popen();            /* stdio.h */
  62. /* stdio.h is supposed to declare *printf */
  63.  
  64. /* these unfortunately cannot be relied upon to be in the right header */
  65. extern struct passwd *getpwnam();    /* pwd.h */
  66. extern struct group *getgrnam();    /* grp.h */
  67. extern char *ctime();            /* time.h */
  68.  
  69. extern long atol();
  70. extern char *mktemp();
  71. extern char *getenv();
  72.  
  73. #ifdef A_STABLE_WORLD
  74. extern int putenv(), system();
  75. extern int getopt();
  76. #endif                    /* A_STABLE_WORLD */
  77. extern int optind;
  78. extern char *optarg;
  79.  
  80. #include "alloc.h"            /* ugh */
  81. #endif                    /* LIBC_H */
  82.