Porting Hints for Solaris

Rule 1

Never use -lbsd

Other Tips

usleep

#ifdef SVR4
      poll((struct poll *) 0, (size_t) 0, 50);
#else
      usleep(50000L);                   /* 5/100 sec */
#endif

killpg

#define killpg(a,b) sigsend(P_PGID,a,b)

index,rindex

#include 
#define index strchr
#define rindex strrchr

getwd

#ifdef SYSV
        return(getcwd(path, MAXPATHLEN));
#else
                /* seems that some BSD releases lack of a prototype for
getwd() 
*/
        return((char *) getwd(path));
#endif