Home | History | Annotate | Download | only in gen-1240
      1 /*=============================================================================
      2                         L O C _ A P I _ F I X U P . C
      3 
      4 GENERAL DESCRIPTION
      5   This file adds API constants that are not automatically transmitted to
      6   the RPC stubs, and it also fixes other RPC-related problems.
      7 
      8   ---------------------------------------------------------------------------
      9 Copyright (c) 2009, QUALCOMM USA, INC.
     10 
     11 All rights reserved.
     12 
     13 Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
     14 
     15          Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
     16 
     17          Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
     18 
     19          Neither the name of the QUALCOMM USA, INC.  nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
     20 
     21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     22   ---------------------------------------------------------------------------
     23 =============================================================================*/
     24 
     25 #include <rpc/rpc.h>
     26 
     27 #include "loc_api_fixup.h"
     28 
     29 #ifdef ADD_XDR_FLOAT
     30 
     31 int
     32 xdr_float(xdrp, fp)
     33         XDR *xdrp;
     34         float *fp;
     35 {
     36         return xdr_long(xdrp, (long*)fp);
     37 }
     38 
     39 int
     40 xdr_double(xdrp, dp)
     41         XDR *xdrp;
     42         double *dp;
     43 {
     44                 return xdr_long(xdrp, (long*)dp + 1)
     45                                 && xdr_long(xdrp, (long*)dp);
     46 }
     47 
     48 #endif /* ADD_XDR_FLOAT */
     49