Hi all
In working on PCREGREP, the grep utility of the PCRE package I am porting to 
z/OS, I've encountered an issue that I do not know how to resolve:
I figured out that z/OS behaves mostly like UNIX and not like Windows, so I 
added my macro to this line:

#if (defined HAVE_SYS_STAT_H && defined HAVE_DIRENT_H && defined 
HAVE_SYS_TYPES_H) || defined NATIVE_ZOS

instructing the compiler to choose the next few lines.  Notice the #include 
<sys/stat.h>:

#include <sys/types.h>
#include <sys/stat.h>
#include <dirent.h>
...
struct stat statbuf;
...

The manual SA22-7821-13 "XL C/C++ Run-Time Library Reference" states clearly 
that sys/stat.h contains a:
struct stat definition.

I also looked at the library CEE.SCEEH.SYS.H and the said struct is indeed 
available.  Yet I consistently get this error message:

ERROR CBC3007 ZATLAS1.DEV.C(QCREGREP):554   "struct stat" is undefined.

And I cannot figure out why.  I cannot ask the Unix/Linux crowd since the issue 
seems to be specific to z/OS compiler.

[If you try that at home, there were more issues but they were obvious and I 
resolved them easily.]

Thanks 
ZA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to