Skip to: Abstract | Comments | Solution | Migration | Download
APAR NUMBER: PJ31874 PRODUCT: TPF4 FUNCTIONAL AREA: ISO-C SUPPORT SHIPPED IN PUT: 21 ABSTRACT: PROVIDE SINGLE SOURCE SOLUTION FOR LONG* PARAMETERS APAR CONTENTS: FEATURE TYPE STATUS NAME Base CHeader Changed include/c$cach.h Base CHeader Changed include/c$decb.h Base CHeader Changed include/c$to2.h Base CHeader Changed include/c$tpxd.h Base CHeader Changed include/socket.h Base CHeader Changed include/sysapi.h Base CHeader Changed include/tpfapi.h Base CHeader Changed include/tpfio.h Base CHeader Changed include/types.h Base C Changed source/rt/base/c535.c Base C Changed source/rt/base/cextdv.c Base C Changed source/rt/base/cfaces.c PREREQUISITE APARS: To be applied in order listed. Base CHeader Changed include/c$cach.h PJ26713(11) PJ27083(13) Base CHeader Changed include/c$decb.h PJ27393(13) PJ27479(14) PJ29160(18) PJ29024(18) PJ29963(21) Base CHeader Changed include/c$to2.h PJ25524(09) PJ25332(09) PJ25994(10) PJ26143(10) PJ26139(11) PJ26522(11) PJ26714(12) PJ26887(12) PJ27390(14) PJ27380(14) PJ28097(15) PJ28140(16) PJ29059(19) PJ29963(21) Base CHeader Changed include/c$tpxd.h PJ25412(09) PJ26139(11) PJ29963(21) Base CHeader Changed include/socket.h PJ25589(09) PJ25780(09) PJ26575(11) PJ26683(11) PJ27268(13) PJ27607(14) PJ27491(14) PJ27714(14) PJ27784(14) PJ28195(16) PJ28526(17) PJ28706(17) PJ29118(18) PJ29638(19) PJ29600(19) PJ29978(19) Base CHeader Changed include/sysapi.h PJ25199(09) PJ25589(09) PJ25981(10) PJ26707(11) PJ27023(12) PJ26955(13) PJ27277(13) PJ27393(13) PJ28097(15) PJ27785(15) PJ28118(15) PJ28178(16) PJ28020(16) PJ28138(18) PJ29428(18) PJ29024(18) PJ28789(19) PJ30839(20) PJ31254(21) Base CHeader Changed include/tpfapi.h PJ25632(09) PJ25780(09) PJ26161(10) PJ26100(11) PJ26707(11) PJ26820(12) PJ26901(12) PJ26873(12) PJ26767(13) PJ27387(13) PJ27393(13) PJ27835(15) PJ28097(15) PJ27785(15) PJ28491(17) PJ28654(17) PJ28810(17) PJ28129(17) PJ29396(18) PJ29024(18) PJ29526(19) PJ29849(19) PJ29974(19) PJ29980(19) PJ30355(20) PJ30156(20) PJ30839(20) PJ31254(21) PJ31058(21) PJ29963(21) Base CHeader Changed include/tpfio.h PJ26714(12) PJ27393(13) PJ29024(18) PJ30839(20) PJ31058(21) PJ29963(21) Base CHeader Changed include/types.h PJ26188(10) PJ26174(10) PJ26575(11) PJ21337(12) PJ27784(14) PJ28021(15) PJ29575(18) PJ29630(19) Base C Changed source/rt/base/c535.c PJ26403(11) PJ27714(14) PJ29001(17) Base C Changed source/rt/base/cextdv.c PJ26139(11) COMMENTS: For TPF 4.1, if a function prototype has a long* (pointer-to-long) parameter, but the program passes an int* (pointer-to-int) the z/OS compiler issues a severe error message. This situation can occur during single-source conversion after "long" data types are changed to "int" data types. The purpose of this APAR is to provide a solution for TPF functions that have one or more long* parameters. Note that the z/OS compiler allows assignments between long and int data types; the problem is only between pointer-to-long and pointer-to-int data types. SOLUTION: In ./include/c$to2.h, create the TO2_SS4 and TO2_USS4 definitions for 4-byte signed and 4-byte unsigned definitions for single-source code. In ./include/tpfapi.h and ./include/types.h, create the TPF_SS4 and TPFUSS4 definitions for 4-byte signed and 4-byte unsigned definitions for single-source code. In ./include/tpfio.h, ./include/sysapi.h, and ./include/c$decb.h, create a new TPF_FA4 definition. In ./include/tpfio.h, create a new C++ overloaded tpf_fa4x4c function that allows an unsigned int value for the fa4 parameter. The new TPF_FA4 definition may also be used for the fa4 parameter. NOTE: The purpose of the following header file changes that change parameters from long* to void* is to allow customers to be able change their code from long* to int* for single-source without getting a z/OS compiler severe error message. These void* parameter changes are on TPF 4.1 only; these changes will not be made on z/TPF. The TPF 4.1 documentation will not be changed because this is an internal change that does not affect the external APIs. -- In ./include/tpfio.h, change the rtnord parameter of the face_facs function from long* (pointer-to-long) to void* (pointer-to-void). Code in ./rt/base/cfaces.c was updated for this header change. Note that these changes will not be done on z/TPF; the z/TPF interface for the rtnord parameter remains int* (pointer-to-int). -- In ./include/c$tpxd.h, change the dataLength parameter of the TPFxd_write function and the bufferLength parameter of the TPFxd_read functions from long* (pointer-to-long) to void* (pointer to void). Code in ./rt/base/cextdv.c was updated for this header change. Note that these changes will not be done on z/TPF; the z/TPF interface stays as int* (pointer-to-int). -- In ./include/socket.h, change the vipa parameter of the tpf_vipac function from long* (pointer-to-long) to void* (pointer-to-void). Code in ./rt/base/c535.c was also updated for to this header change. Note that these changes will not be done on z/TPF; the z/TPF interface for the vipa parameter remains int* (pointer-to-int). -- In the ./include/c$cach.h header, change the long* parameters of the newCache, readCacheEntry, updateCacheEntry, and deleteCacheEntry functions from long* (pointer-to-long) to void* (pointer to void). Note that this change will not be done on z/TPF; the z/TPF interface for these parameters remains int* (pointer-to-int). DEPENDENCIES SEGMENTS TO BE ASSEMBLED OR COMPILED: None. SEGMENTS TO BE LINK EDITED: comx40.exe (Shipped in Tar File) ctal40.exe (Shipped in Tar File) COREQS: None. MIGRATION CONSIDERATIONS: Changes to Application Programming Interface: -- In TPF 4.1 documentation only, the first four const long * parameters of the newCache function change from const long * to const long to correct a documentation problem. -- The fa4 parameter of the tpf_fa4x4c function changes from unsigned long * to TPF_FA4 *. For TPF 4.1 this function now will accept a TPF_FA4 *, unsigned long* or unsigned int* argument. Note that on z/TPF this function will accept an unsigned int* argument or will accept a TPF_FA4 * argument after APAR PJ31874_FF. -- For TPF 4.1 the following functions that have a long* parameter now will accept either a long* or int* argument. Note that on z/TPF these functions will only accept an int* argument. -- face_facs -- tpf_vipac -- TPFxd_write -- TPFxd_read -- newCache -- readCacheEntry -- updateCacheEntry -- deleteCacheEntry -- This APAR creates the TPF_SS4 and TPF_USS4 definitions that may be used by customers in single-source code. These definitions will be created in APAR PJ31874_FF for z/TPF. For example: TPF 4.1 code before single-source change: ... unsigned long * VariableU; long * VariableS; ... TPF 4.1 code after single-source change: ... #include <tpf/tpfapi.h> /* to access TPF_USS4 and TPF_SS4 definitions */ TPF_USS4 * VariableU; /* unsigned long on TPF 4.1, unsigned int on z/TPF */ TPF_SS4 * VariableS; /* signed long on TPF 4.1, signed int on z/TPF */ ... -- This APAR creates the TO2_SS4 and TO2_USS4 definitions that may be used by customers in single-source code in TO2 applications. These definitions will be created in APAR PJ31874_FF for z/TPF. For example: TPF 4.1 code before single-source change: ... unsigned long * myfield; long * dataLength; ... TPF 4.1 code after single-source change:: ... #include <tpf/c_to2.h> /* to access TO2_USS4 and TO2_SS4 definitions */ TO2_USS4 * myfield; /* unsigned long on TPF 4.1, unsigned int on z/TPF */ TO2_SS4 * dataLength; /* signed long on TPF 4.1, signed int on z/TPF */ ... UPDATED INFORMATION UNITS: TPF C/C++ Language Support User's Guide z/TPF and z/TPFDF Migration Guide See your IBM representative if you need additional information. DOWNLOAD INSTRUCTIONS: http://www.ibm.com/software/htp/tpf/pages/maint.htm -- END APAR PJ31874
Download file(s): Login once to access server, leave window open, then click on link(s) below. Listing Binary Source
