Mail Archives: djgpp/1997/10/16/20:46:37
From: | mark AT bigdog DOT fred DOT net
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | stat() system call return value problem
|
Date: | 16 Oct 1997 08:08:11 -0400
|
Organization: | FredNet - Frederick, Md.
|
Lines: | 24
|
Message-ID: | <62503b$p53@bigdog.fred.net>
|
NNTP-Posting-Host: | bigdog.fred.net
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
I am a new user to djgpp, and have installed the cross compiler
libraries & executable on my linux box. I wrote a short test
program as follows:
#include <stdio.h>
#include <sys/stat.h>
main()
{
struct stat s;
printf("%d\n",stat("test",&s));
}
Now if I run this on the linux box the return values for stat
are correct (0 if it's there, -1 if not). But compiling with
dos_gcc and running on a win95 machine it always returns a 0.
Any answers for this?
Thanks!
--
------------------------------------------------------------------------
Mark Bellmore Promise Keeper | I am not discouraged. I am persistent.
mark AT fred DOT net Programmer | I go forward. I am determined to achieve
http://www.fred.net/mark | in God's own wonderful way for me.
- Raw text -