Print this page
1575 untangle libmlrpc ... (libmlrpc)

Split Close
Expand all
Collapse all
          --- old/usr/src/uts/common/smbsrv/ndl/ndrtypes.ndl
          +++ new/usr/src/lib/libmlrpc/common/ndrtypes.ndl
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + *
       25 + * Copyright 2013 Nexenta Systems, Inc.  All rights reserved.
  24   26   */
  25   27  
  26      -#ifndef _NDR_TYPES_NDL_
  27      -#define _NDR_TYPES_NDL_
       28 +#ifndef _NDRTYPES_NDL_
       29 +#define _NDRTYPES_NDL_
  28   30  
       31 +/*
       32 + * Type definitions (and related) used in NDL files and the
       33 + * NDL run-time support libraries.  See also: libmlrpc.h
       34 + */
       35 +
  29   36  #define TYPEINFO(TYPE)  ndt__##TYPE
  30   37  
  31   38  #ifdef NDRGEN
  32   39  
  33   40  #define ALIGN(X)        [align(X)]
  34   41  #define OPERATION(X)    [operation(X)]
  35   42  #define IN              [in]
  36   43  #define OUT             [out]
  37   44  #define INOUT           [in out]
  38   45  
↓ open down ↓ 23 lines elided ↑ open up ↑
  62   69  #define WORD    ushort
  63   70  #define DWORD   ulong
  64   71  #define ntstatus_t      ulong
  65   72  
  66   73  #define LPTSTR  STRING wchar *
  67   74  
  68   75  #define LPBYTE  uchar *
  69   76  #define LPWORD  ushort *
  70   77  #define LPDWORD ulong *
  71   78  
  72      -/*
  73      - * Opaque context handle.
  74      - */
  75      -#ifndef CONTEXT_HANDLE
  76      -#define CONTEXT_HANDLE(NAME)    \
  77      -        struct NAME {           \
  78      -                DWORD data1;    \
  79      -                DWORD data2;    \
  80      -                WORD  data3[2]; \
  81      -                BYTE  data4[8]; \
  82      -        };                      \
  83      -        typedef struct NAME
  84      -#endif /* CONTEXT_HANDLE */
  85      -
  86   79  #define EXTERNTYPEINFO(TYPE)
  87   80  
  88   81  #else /* NDRGEN */
  89   82  
  90   83  #define ALIGN(X)
  91   84  #define OPERATION(X)
  92   85  #define IN
  93   86  #define OUT
  94   87  #define INOUT
  95   88  
↓ open down ↓ 13 lines elided ↑ open up ↑
 109  102  #define REF
 110  103  #define UNIQUE
 111  104  #define PTR
 112  105  #define POINTER_DEFAULT(X)
 113  106  
 114  107  #define IMPORT_EXTERN
 115  108  
 116  109  /*
 117  110   * When not using ndrgen, get BYTE, WORD, DWORD definitions from wintypes.h.
 118  111   */
 119      -#include <smbsrv/wintypes.h>
      112 +#include <smb/wintypes.h>
 120  113  
 121  114  #define EXTERNTYPEINFO(TYPE)    extern struct ndr_typeinfo TYPEINFO(TYPE);
 122  115  
 123  116  
 124  117  /*
 125  118   ***********************************************************************
 126  119   * There is a bug in the way that midl and the marshalling code handles
 127  120   * unions so we need to fix some of the data offsets at runtime. The
 128  121   * following macros and the fixup function handle the correction.
 129  122   ***********************************************************************
↓ open down ↓ 30 lines elided ↑ open up ↑
 160  153  
 161  154  /*
 162  155   * UNION_INFO_ENT is intended to simplify adding new entries to a union.
 163  156   * If the entry structures are named using the form FunctionNameX,
 164  157   * where X is the sitch_value, you can just add a single line. Note
 165  158   * that you must also update the fixup function in mlsvc_xxx.c.
 166  159   */
 167  160  #define UNION_INFO_ENT(N,NAME) CASE(N) struct NAME##N info##N
 168  161  #define UNION_INFO_PTR(N,NAME) CASE(N) struct NAME##N *info##N
 169  162  
 170      -#endif /* _NDR_TYPES_NDL_ */
      163 +/*
      164 + * Opaque context handle.
      165 + */
      166 +#ifndef CONTEXT_HANDLE
      167 +#define CONTEXT_HANDLE(NAME)    \
      168 +        struct NAME {           \
      169 +                DWORD data1;    \
      170 +                DWORD data2;    \
      171 +                WORD  data3[2]; \
      172 +                BYTE  data4[8]; \
      173 +        };                      \
      174 +        typedef struct NAME
      175 +#endif /* CONTEXT_HANDLE */
      176 +
      177 +#endif /* _NDRTYPES_NDL_ */
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX