Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How much of Apache is pure POSIX and how much are #ifdef around OS specific APIs?


Apache uses the Apache Portable Runtime:

https://en.wikipedia.org/wiki/Apache_Portable_Runtime

That's one of the competitors to POSIX for application portability. Unlike POSIX, it was totally open as well vs people telling me The Open Group will sell me a copy of full standard.


Interestingly, I took a random tour through the source code and didn't find a single OS specific API. Which is not to say that the code was intrinsically POSIX specific. It is a surprisingly good example of multi-platform code. The #ifdefs that I saw were all to do with defining functionality from scratch if it didn't exist rather than the more usual massively indented list of platform specific hacks. Although I had fairly high expectations, I was fairly surprised at how nice the code was.

I didn't spend all that much time, so I'm sure I missed a lot, but I recommend taking a look for yourself as it is quite interesting.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: