Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!wuarchive!decwrl!pyramid!ctnews!mitisft!dold From: dold@mitisft.Convergent.COM (Clarence Dold) Newsgroups: comp.lang.c Subject: Re: What is wrong with this code ? Message-ID: <1330@mitisft.Convergent.COM> Date: 15 Dec 89 22:10:12 GMT References: <660067@hpcljws.HP.COM> Organization: Convergent Technologies, San Jose, CA Lines: 26 in article <660067@hpcljws.HP.COM>, jws@hpcljws.HP.COM (John Stafford) says: Clarence Dold writes... > For that matter, we don't need to mask type against S_IFMT. - The problem is that the various S_... items have, in some cases, more - than one bit on. Guess what happens if one of the S_... items has a - bit on that is also in one of the other items? For example on my - system... - - #define S_IFMT 0170000 /* type of file */ - #define S_IFLNK 0120000 /* symbolic link */ - #define S_IFSOCK 0140000/* socket */ Notice when I said 'we' I used lower case, not the big We :-( My SysV doesn't have any cases of needing S_IFMT, but then it doesn't have symbolic links either. I got e-mail chastising me, but no explanation. - choice, it doesn't hurt that much. Thank you for your support. Thanks, and you're welcome to my support. -- --- Clarence A Dold - dold@tsmiti.Convergent.COM (408) 435-5293 ...pyramid!ctnews!tsmiti!dold FAX (408) 435-3105 P.O.Box 6685, San Jose, CA 95150-6685 MS#10-007