"Bill Wright" <bil...@at...> writes:
> I am getting the following messages when there is a module using the =
> lstat and getwd structs defined in sys/stat.h
>
> 'implicit declaration of function int getwd(...)' and
> 'implicit declaration of function int lstat(...)'
>
> The actual code is prety straight-forward:
>
> int stat_value;
> struct stat statv;
> struct stat dbuf;
> struct dirent *dirent_save;
>
> getwd(dirnow);
> buf =3D opendir(dirnow);
> stat_value =3D stat(dirent_save->d_name,&dbuf);
> if(dirent_save->d_name[0] !=3D '.')
> lstat(dirent_save->d_name,&statv);
>
> I need help in trying to resolve this.
You may need to use fstat and not lstat. A quick look at sys/types.h
shows there is no lstat. Also, you may need to do a:
#define fstat _fstat
to make it work with "fstat" as the MSCRT mangles the standard C
function names by placing "_" in front of this (which I do not fully
understand).
In my mingw sys/types.h
int _fstat (int, struct _stat*);
int _chmod (const char*, int);
int _stat (const char*, struct _stat*);
As for getwd(), however, in io.h, this is defined:
char* _getcwd (char*, int);
Could you use it instead?
> Secondly, we also use the sqltypes.h header and it reports tons of =
> errors due to some intrinsic types that do not seem to be defined.
> Does = anyone know what additional headers need to be pulled in if
> sqltypes.h = is used?
#include <windows.h>
#include <sqltypes.h>
Elizabeth
|