Try:

#include <sys/types.h>

If you look inside the EDC4H031 member, you see this as the comment. 

* <sys/types.h> header file 

TYPES is an alias of EDC4H031. Sometimes it's easier to grep for symbols
in the UFS location. 

/usr/include: >pwd  
/usr/include
/usr/include: >find . -name '*.h' | xargs grep pthread_t
...
./sys/types.h:          } pthread_t;

The cannonical location for these things are set in stone from UNIX
implementations now decades old. Stevens' TCP books are great references
for historical context as well as best practices.


Pierre Fichaud wrote:
> 
> Folks,
>         I've been hired to implement SSL socket calls in an existing z/OS
> product. The IBM SSL API is in C. I'm changing the TCB structure to have
> 2 listeners, one TCP/IP and the other SSL. They listen on different ports.
>         I've added a TCB layer and so have had to use the pthread API calls.
> I've defined a structure with a variable in it defined as :
> 
>                 pthread_t   *thrd;
> 
> My thinking was that if I included pthread.h ( as the doc states for any
> of the pthread API calls) that I would get  clean compile.
> 
>         Such is not the case. I get the following message:
> 
> ERROR CCN3045 @PRF01.SSL.C(NEWL05):324   Undeclared identifier pthread_t.
> 
>         My includes in the C source are as follows:
> 
> #include <time.h>
> #include <types.h>
> #include <socket.h>
> #include <in.h>
> #include <pthread.h>
> #include <stdio.h>
> #include <stdlib.h>
> 
> and my SYSLIB concatenation in the compile JCL is :
> 
>         11 //SYSLIB  DD   DISP=SHR,DSN=USERID.H
>            X/SYSLIB   DD  DSNAME=&LIBPRFX..SCEEH.H,DISP=SHR
>            IEFC653I SUBSTITUTION JCL - DSNAME=CEE.SCEEH.H,DISP=SHR
>         12 //        DD   DISP=SHR,DSN=ISV.DEV.H
>            X/         DD  DSNAME=&LIBPRFX..SCEEH.SYS.H,DISP=SHR
>            IEFC653I SUBSTITUTION JCL - DSNAME=CEE.SCEEH.SYS.H,DISP=SHR
>         13 //        DD   DISP=SHR,DSN=CEE.SCEEH.H
>         14 //        DD   DISP=SHR,DSN=CEE.SCEEH.SYS.H
>         15 //        DD   DISP=SHR,DSN=CEE.SCEEH.NET.H
>         16 //        DD   DISP=SHR,DSN=CEE.SCEEH.NETINET.H
>         17 //        DD   DISP=SHR,DSN=CEE.SCEEH.ARPA.H
>         18 //        DD   DISP=SHR,DSN=SYS1.SIEAHDR.H
> 
> I've shown all the includes but I've got over 15K lines to look at.
> Nowhere do I find pthread_t defined.
> 
> pthread_t is actually defined in CEE.SCEEH.SYS.H(EDC4H031).
> 
> Am I supposed to debug IBM's torturous C header file hierarchy?
> 
> Another issue is that for another SSL program to compile, I had to
> include the following define:
> 
>         #define _OE_SOCKETS
> 
> Otherwise, I had en error with the AF_INET defined value. How is one
> supposed to figure this out?
> 
> Also, look at the SYSLIB concatenation. The communications stuff is in 4
> header files: SYS.H, NET.H, NETINET.H and ARPA.H. Couldn't they combine
> all this into 1 nice, neat PDS.
> 
> Maybe there is another #define that will fix the pthread_t problem?  I
> wonder which variable it is supposed to be?
> 
> I'm going to hard code the typedef pthread_t in my C source to get
> around the problem for now.
> 
> Pierre.

-- 
Don Poitras - zSeries R & D  -  SAS Institute Inc. -  SAS Campus Drive 
mailto:sas...@sas.com   (919)531-5637  Fax:677-4444     Cary, NC 27513

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to