Determining system type
    Greg S Hinton 
    gregh at cup.portal.com
       
    Sun Mar  5 16:17:03 AEST 1989
    
    
  
Is there a "standard" -- or optimal -- way to determine at compile time
whether one is on a BSD or AT&T (Ver7, SysIII, SysV) system?
This is the best I've been able to come up with so far:
#include <stat.h>
#if defined(S_ISOCK)
/* BSD stuff */
#else
/* AT&T stuff */
#endif
Anyone have a better way?
-----------
Greg Hinton
gregh at cup.portal.com
{hplabs!pyramid,amdahl!sun}!cup.portal.com!gregh
    
    
More information about the Comp.unix.questions
mailing list