1
0

bsd.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _BSD_EXTENSION
  2. This header file is an extension to ANSI/POSIX
  3. #endif
  4. #ifndef __BSD_H_
  5. #define __BSD_H_
  6. #pragma src "/sys/src/ape/lib/bsd"
  7. #pragma lib "/$M/lib/ape/libbsd.a"
  8. #ifndef __TYPES_H
  9. #include <sys/types.h>
  10. #endif
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #ifndef _SIZE_T
  15. #define _SIZE_T
  16. typedef unsigned long size_t;
  17. #endif
  18. /* ifndefs because X11 stuff (ugh) */
  19. #ifndef bcopy
  20. extern void bcopy(void*, void*, size_t);
  21. #endif
  22. #ifndef bcmp
  23. extern int bcmp(void*, void*, size_t);
  24. #endif
  25. #ifndef bzero
  26. extern void bzero(void*, size_t);
  27. #endif
  28. extern int ffs(unsigned int);
  29. extern void bhappy(void*);
  30. extern int rresvport(int*);
  31. extern int rcmd(char**, int, char*, char*, char*, int*);
  32. extern int strcasecmp(char*, char*);
  33. extern int putenv(char*);
  34. extern int strncasecmp(char*, char*,int);
  35. extern int getopt(int, char**, char*);
  36. extern int opterr;
  37. extern int optind;
  38. extern int optopt;
  39. extern char *optarg;
  40. extern char *mktemp(char *);
  41. extern char *sys_errlist[];
  42. extern int sys_nerr;
  43. #ifdef __cplusplus
  44. }
  45. #endif
  46. #endif