scala-native icon indicating copy to clipboard operation
scala-native copied to clipboard

Provide bindings for libc

Open densh opened this issue 8 years ago • 24 comments

For sake of having nice interop with C we need to have access to all the same base libraries. The full list of header files is given below:

  • [x] assert.h (not useable without C-style macros.)
  • [x] complex.h
  • [x] ctype.h
  • [x] errno.h
  • [x] fenv.h
  • [x] float.h
  • [x] inttypes.h
  • [ ] iso646.h
  • [ ] limits.h
  • [x] locale.h
  • [x] math.h
  • [ ] setjmp.h
  • [x] signal.h
  • [ ] stdalign.h
  • [ ] stdarg.h
  • [x] stdatomic.h
  • [ ] stdbool.h
  • [ ] stddef.h
  • [ ] stdint.h
  • [x] stdio.h
  • [x] stdlib.h
  • [ ] stdnoreturn.h
  • [x] string.h
  • [x] tgmath.h
  • [ ] threads.h
  • [ ] time.h
  • [ ] uchar.h
  • [ ] wchar.h
  • [ ] wctype.h

Each header would map to a single extern object in scala.scalanative.libc package. Some of the headers might not map directly or need some additional compiler magic, we need to discover those cases sooner rather than later.

densh avatar May 18 '16 12:05 densh