libc.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. #include <sys/types.h>
  10. #include <lib9.h>
  11. #include <stdlib.h>
  12. #include <string.h>
  13. #include <utf.h>
  14. #include <fmt.h>
  15. typedef unsigned int u32int;
  16. typedef unsigned long long u64int;
  17. #define nelem(x) (sizeof(x)/sizeof((x)[0]))
  18. extern uint32_t getcallerpc(void*);
  19. extern void* mallocz(uint32_t, int);
  20. extern void setmalloctag(void*, uint32_t);
  21. extern int dec16(uchar *, int, char *, int);
  22. extern int enc16(char *, int, uchar *, int);
  23. extern int dec32(uchar *, int, char *, int);
  24. extern int enc32(char *, int, uchar *, int);
  25. extern int dec64(uchar *, int, char *, int);
  26. extern int enc64(char *, int, uchar *, int);
  27. extern vlong nsec(void);
  28. extern void sysfatal(char*, ...);