bsd.h 1.1 KB

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