Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portability issues to MacOS X #59

dido opened this issue May 22, 2013 · 0 comments


Copy link

@dido dido commented May 22, 2013

Portability isn't a high priority at the moment, but after a recent comment on the dev page it looks like I'm going to have to give it a bit of a shot.

Well, there are a number of issues addressed by ben in his comment:

  1. malloc.h is included by alloc.c. This is used only for malloc_trim, and this is a glibc-ism, and isn't available on platforms that don't use GNU libc. Have added a check for malloc.h and malloc_trim in It isn't absolutely necessary: it's just there to force freeing of unused memory at the end of a gc cycle.
  2. Non-portable use of internal structure of a stdio FILE in fileio.c. Needed to check whether the buffers are empty. I basically cribbed the code for this from Ruby, and it looks like I need to crib more such non-portable code from Ruby as well.
  3. Missing inclusion of sys/select.h in fileio.c. This has been rectified as well, although I don't know if it will be enough.
  4. Size of a struct timep isn't known when compiling osdep.c. Not sure why this is, because we include both time.h and sys/time.h in osdep.c. I'll need output of gcc -E at least, access to an OS X or Darwin system to be completely sure.

Let's see if a FreeBSD and OpenDarwin VM can smoke out more issues for portability to other Unix-like platforms.

@ghost ghost assigned dido May 22, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.