1
0

bsd.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 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 /* !__BSD_H__ */