I've got a C++ program in which I am trying to use __opendir2(). That's the
enhanced variant of opendir(), which is used to read the entries in a UNIX
file directory. I am coming up with 

CCN5274 (S) The name lookup for "__opendir2" did not find a declaration.


The doc says to specify 

#define _OPEN_SYS_DIR_EXT
#include <dirent.h>

And I am doing that. And yes, I am spelling it with two underscores.

Normally I would look at the source for dirent.h and see what #ifdef guarded
the declaration of __opendir2(), but it is one of those IBM things with so
many nested obscure #ifdef's that I have no idea what is going on. So ...
questions

1. Easy one first: does anyone know what the magic is to get __opendir2()
declared? Yeah, I coded my own DIR *__opendir2(const char *dirname, size_t
bufsize); but I'd kind of like to do it the right way.

2. Is there any sort of "trace" to debug the #ifdef flow in C source? I have
EXPMAC SHOWINC SOURCE turned on but they either are no help or I do not know
how to interpret the output.

Thanks,
Charles

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

Reply via email to