What about using AT-TLS? On Mon, Oct 19, 2009 at 1:57 PM, Henry Willard <[email protected]>wrote:
> 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? > > No, but if you look in the C RTL Reference you will see that you need a > define > for either _OPEN_THREADS or _UNIX03_THREADS. > > > > > > > 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? > > Looking in the C RTL Reference? Alternatively you could define > _XOPEN_SOURCE_EXTENDED to 1. > > > > > > > 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. > > The structure of these things is largely defined by other standards > > > > > > > Maybe there is another #define that will fix the pthread_t problem? I > > wonder which variable it is supposed to be? > > See above > > > > > > > I'm going to hard code the typedef pthread_t in my C source to get > > around the problem for now. > > > > Pierre. > > Unfortunately, there are conflicting and sometimes slightly incompatible > standards. You need to define which you want. > > Regards, > Henry > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to [email protected] with the message: GET IBM-MAIN INFO > Search the archives at http://bama.ua.edu/archives/ibm-main.html > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html

