From: Radical DOT NetSurfer AT delorie DOT com Newsgroups: comp.os.msdos.djgpp Subject: HELP: S_ISDIR() ????? Date: Mon, 19 Nov 2001 15:34:12 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <0rqivtk7vhhprds46r1a48o07rvp82isuc@4ax.com> X-Newsreader: Forte Agent 1.8/32.548 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: newsabuse AT supernews DOT com Lines: 44 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I have a program that is meant by its designer to be compiled in both DJGPP and Borland (etc.) compilers... however, he's using 'S_ISDIR()' which I have never seen before, DJGPP libc.txt (2.95.3) gives some "vague" information under int ftw(const char *dir, int (*func)(const char *path, struct stat *stbuf, int flag), int depth); -------- and ------------ int stat(const char *file, struct stat *sbuf); -------- and ------------ sys/stat.h #define S_ISDIR(m) (((m) & 0xf000) == 0x3000) ====== Borlands sys\stat.h (16.32-bit) ======== gives this information: /* Traditional names for bits in st_mode. */ #define S_IFDIR 0x4000 /* directory */ #if defined(__FLAT__) /* POSIX file type test macros. The parameter is an st_mode value. */ #define S_ISDIR(m) ((m) & S_IFDIR) ============================================= Can someone offer some input on this so I can properly #ifdef BORLANDC myself around this problem? Also, I'd like an approach that would indicate if "16-bit" or "FLAT" model compiles are attempted. Eegads... my work is cut out for me isn't it....LOL.?? //RadSurfer// email: radsmail AT juno DOT com