Mail Archives: djgpp/2001/11/20/14:02:04
Since I wanted to #ifdef BorlandC around da problem,
obviously I am looking for the 'borland' equivalent
of S_ISDIR()....issue turned out to be trivial anyways.
NEW PROBLEM:
which is better to use:
#ifdef __DJGPP__
...or...
#ifdef __GNUC__
in that someone who wants to compile for Linux GCC and not just
MSDOS/DJGPP, is GNUC acceptable?
I haven't yet encountered msdos DJ-specific issues conflicting with
LinuxGCC-compiling.
THANKS!
On Mon, 19 Nov 2001 15:34:12 -0500, Radical NetSurfer wrote:
>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
>
- Raw text -