Sign in to follow this  
likeafox

A question of portability

Recommended Posts

I just started a coding project on a Debian Linux installation. The app I'm making uses the following: <sys/time.h> - gettimeofday() <unistd.h> - sleep() <pthread.h> - pthread_create - pthread_join and some stuff from <errno.h>, <fcntl.h>, <sys/types.h>, <sys/socket.h>, and <netinet/in.h> which I haven't implemented yet. I want it to be portable especially to other Linux distros and types of BSD. I don't have other installations on which I could test it right now. My question is, using these libraries, will I have to change my code to make it portable to these? Or would I only have to recompile the same code to run it on BSD, say.

Share this post


Link to post
Share on other sites
gettimeofday is not avail on windoze

on other unix platforms, non of these should cause problems

To test for portability, maybe you want to use VMware (or XEN) to install some other OSes.

Share this post


Link to post
Share on other sites
Sign in to follow this