bsd.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 char* strdup(char*);
  33. extern int strcasecmp(char*, char*);
  34. extern int putenv(char*);
  35. extern int strncasecmp(char*, char*,int);
  36. extern void* memccpy(void*, void*, int, size_t);
  37. extern int getopt(int, char**, char*);
  38. extern int opterr;
  39. extern int optind;
  40. extern int optopt;
  41. extern char *optarg;
  42. extern char *mktemp(char *);
  43. extern char *sys_errlist[];
  44. extern int sys_nerr;
  45. #ifdef __cplusplus
  46. }
  47. #endif
  48. #endif