Advertisement

A question of portability

Started by March 16, 2007 08:13 PM
1 comment, last by hydroo 17 years, 6 months ago
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.
"It compiles! Ship it!"
You only have to recompile since the program is only using standard functions.
Advertisement
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.

This topic is closed to new replies.

Advertisement