[cs631apue] Cross-OS compatibility question
Elliot Wasem
ewasem at stevens.edu
Fri Aug 30 23:12:35 EDT 2019
Hey all,
I've been playing around with writing code that is trivially portable between Linux and NetBSD. I realized that 'setprogname(...)' is only available in BSD's <stdlib.h>, and so on Linux, I needed to include <bsd/stdlib.h> in my code iff on a Linux system. Additionally, I had to set compiler flags dependent on OS in my makefile (on Linux, needed the flag -lbsd).
Now, it seems that NetBSD's Make does not play well with the GNU way of creating makefiles (i.e. conditional blocks in the makefile), however 'gmake' on NetBSD works fine. Should we forget about portability? Can we ask you to use gmake to grade? or is there a better way of doing this?
Thanks,
Elliot Wasem
https://elliot-wasem.github.io/personal-website (https://link.getmailspring.com/link/26398D1A-D106-4482-92B6-EC41B55D3ABF@getmailspring.com/0?redirect=https%3A%2F%2Felliot-wasem.github.io%2Fpersonal-website&recipient=Y3M2MzFhcHVlQGxpc3RzLnN0ZXZlbnMuZWR1)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.stevens.edu/pipermail/cs631apue/attachments/20190830/1c814aa1/attachment.htm>
More information about the cs631apue
mailing list