~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201207201942

« back to all changes in this revision

Viewing changes to lib/dynxdr/dynxdr.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-03-20 10:19:00 UTC
  • mfrom: (1.1.4 upstream) (2.4.3 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090320101900-1o604camiubq2de8
Tags: 2009.03.18-154848-2
Correcting patch system depends (Closes: #520493).

Show diffs side-by-side

added added

removed removed

Lines of Context:
69
69
#  define DYNXDR_SIZE_T u_int
70
70
#endif
71
71
 
 
72
/*
 
73
 * Mac OS 64-bit defines the parameter to "x_putlong" as an int.
 
74
 */
 
75
#if defined __APPLE__ && defined __LP64__
 
76
#  define DYNXDR_LONG int
 
77
#else
 
78
#  define DYNXDR_LONG long
 
79
#endif
 
80
 
72
81
 
73
82
/*
74
83
 *-----------------------------------------------------------------------------
177
186
 */
178
187
 
179
188
static bool_t
180
 
DynXdrPutLong(XDR *xdrs,               // IN/OUT
181
 
              DYNXDR_CONST long *lp)   // IN
 
189
DynXdrPutLong(XDR *xdrs,                    // IN/OUT
 
190
              DYNXDR_CONST DYNXDR_LONG *lp) // IN
182
191
{
183
 
   int32 out = htonl((int32)*lp);
 
192
   int32 out;
184
193
   DynXdrData *priv = (DynXdrData *) xdrs->x_private;
 
194
 
 
195
#ifdef __APPLE__
 
196
   ASSERT_ON_COMPILE(sizeof *lp <= sizeof (int32));
 
197
#endif
 
198
   out = htonl((int32)*lp);
185
199
   return DynBuf_Append(&priv->data, &out, sizeof out);
186
200
}
187
201