/*     
 * $RCSfile: bind_wrapper.h,v $
 *
 * x-kernel v3.3
 *
 * Copyright (c) 1993,1991,1990,1996  Arizona Board of Regents
 *
 * $Log: bind_wrapper.h,v $
 * Revision 1.1  1997/03/11 20:47:08  dorgival
 * Initial revision
 *
 *
 */
/*
 * bind_wrapper.h - wrapper to fix problems with parameter marshaling
 * incompatibilities between gcc (used to compile the x-kernel) and
 * icc (which was used for the raw_hippi library). Basically this
 * wrapper replaces char and short params by integers. The associated
 * bind_wrapper.c must be compiled with icc and linked with all
 * code wich uses the raw_hippi library.
 *
 * The problem is that the assembly code generated by gcc to load an
 * unsigned char for some reason does signal extension when converting
 * values to integer. Icc fix this by adding a logical "AND 0x00FF" to
 * all loads. Due to the way code is generated, it's not enough to
 * add that to the parameter in the call, so we have to rely on icc here.
 */

/*
 * The only function in the library which has short/char parameters
 * which is used in RAW mode is:
 *      extern int hippi_bind(int ihandle, u_char ulp, short port);
 * (hippi_config also has short parameters, but it is only used in DATA mode)
 */

#ifndef __bind_wrapper_h__
#define __bind_wrapper_h__

extern int hippi_bind_wrapper(int ihandle, u_int ulp, int port);

#define hippi_bind( ih, ulp, port ) hippi_bind_wrapper( ih, ulp, port )

#endif
