[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference lassie::ucx

Title:DEC TCP/IP Services for OpenVMS
Notice:Note 2-SSB Kits, 3-FT Kits, 4-Patch Info, 7-QAR System
Moderator:ucxaxp.ucx.lkg.dec.com::TIBBERT
Created:Thu Nov 17 1994
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:5568
Total number of notes:21492

5422.0. "nolinkage between rpc.h and ints.h" by CSC32::J_HENSON (Don't get even, get ahead!) Tue Apr 08 1997 10:08

           <<< TURRIS::DISK$NOTES_PACK:[NOTES$LIBRARY]DECC.NOTE;1 >>>
                                   -< DECC >-
================================================================================
Note 2143.0            nolinkage between rpc.h and ints.h             No replies
CSC32::J_HENSON "Don't get even, get ahead!"         37 lines   8-APR-1997 10:04
--------------------------------------------------------------------------------
DEC C V5.5-002, UCX V4.1 ECO 4, OpenVMS V6.2/7.1, Alpha

I have another one of those pesky %CC-E-NOLINKAGE problems between a
UCX include and a C include.  This time, the typdefs in question are
int32, uint32, int64 and uint64.  The clashing includes are
rpc.h and ints.h.  See the code listed below for a reproducer.

FWIW, the customer reporting this was not explicitly including ints.h.
He included pthread.h, which brought in ints.h.

Also, I'll cross post in the UCX notes conference.

And, last but not least, I don't see a workaround for this.  From looking
at the .lis file, it appears that rpc.h defines these typedefs regardless.
Ints.h only checks that either __DECC or __DECCXX and __ALPHA is defined,
so compiling with /define=_DECC_V4_SOURCE or /define=_VMS_V6_SOURCE
has no effect.

This is probably a show stopper for my customer, and I expect that he
will be pushing hard for a solution.

Thanks,

Jerry


====================================================================

$create tstrpc.c
#include <rpc/rpc.h>
#include <ints.h>
main()
{	
	exit(0);
}
$define rpc ucx$rpc
$cc/list/show=all tstrpc
T.RTitleUserPersonal
Name
DateLines
5422.1UCXAXP::GEMIGNANITue Apr 08 1997 19:437
    If you submit an IPMT case, I will be addressed.
    
    My initial inclination is to replace the code in <rpc/types.h> with
    #include <ints.h>.
    
    -John
    
5422.2On second thought ...UCXAXP::GEMIGNANITue Apr 08 1997 19:441
    Perhaps it would be better if the case were addressed, instead of me.
5422.3a workaroundCSC32::J_HENSONDon&#039;t get even, get ahead!Wed Apr 09 1997 09:3020
>>                    <<< Note 5422.1 by UCXAXP::GEMIGNANI >>>

>>    If you submit an IPMT case, I will be addressed.
    
In the DECC notes conference, a workaround was suggested that seems to
work, at least in this case.  I'm noting here in case others run in
to this.

The workaround is to insert

#define __INTS_LOADED 1

immediately before including pthread.h.  I tried this, and got a clean
compile.  Your mileage may vary.

I'll submit an IPMT case to UCX.

Thanks,

Jerry
5422.4LASSIE::GEMIGNANIThu Apr 10 1997 19:364
    The solution REALLY belongs here, in UCX.  That symbol should be sensed
    and set in rpc/types.h.
    
    -John
5422.5TLE::D_SMITHDuane Smith -- DEC C RTLFri Apr 11 1997 07:2818
    John,
    
    I believe that you should change the code to test the version of the
    DEC C compiler being used:
    
    #if __DECC_VER >= 50300000
    #   include <ints.h>
    #else
        typedef unsigned long uint64;
        ...
    #endif
    
    First glance shows that not all of the definitions are part of the DEC
    C header files.  Send me mail if you want a copy of the ints.h that
    added the new definitions.  I'll also confirm the version of DEC C
    whose header file added them.
    
    Duane