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

« back to all changes in this revision

Viewing changes to lib/include/dynarray.h

  • Committer: Bazaar Package Importer
  • Author(s): Serge Hallyn
  • Date: 2011-03-31 14:20:05 UTC
  • mfrom: (1.4.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110331142005-3n9red91p7ogkweo
Tags: 2011.03.28-387002-0ubuntu1
* Merge latest upstream git tag.  This has the unlocked_ioctl change
  needed to fix dkms build failures (LP: #727342)
* Changes in debian/rules:
  - work around a bug in toolbox/Makefile, where install-exec-hook is
    not happening.  This needs to get fixed the right way.
  - don't install 'vmware-user' which seems to no longer exist
  - move /etc/xdg into open-vm-toolbox (which should be done using .install)
* debian/open-vm-tools.init: add 'modprobe [-r] vmblock'. (LP: #332323)
* debian/rules and debian/open-vm-toolbox.lintian-overrides:
  - Make vmware-user-suid-wrapper suid-root (LP: #332323)

Show diffs side-by-side

added added

removed removed

Lines of Context:
256
256
#define DEFINE_DYNARRAY_TYPE(T)     DEFINE_DYNARRAY_NAMED_TYPE(T, T)
257
257
 
258
258
#define DEFINE_DYNARRAY_NAMED_TYPE(T, TYPE)                             \
 
259
   DECLARE_DYNARRAY_TYPE(T)                                             \
 
260
   DEFINEONLY_DYNARRAY_NAMED_TYPE(T, TYPE)
 
261
 
 
262
#define DECLARE_DYNARRAY_TYPE(T)                                        \
 
263
   typedef DynArray T##Array;
 
264
 
 
265
#define DEFINEONLY_DYNARRAY_NAMED_TYPE(T, TYPE)                         \
259
266
                                                                        \
260
267
   typedef int (CDECLCONV *DynArray##T##Cmp)(const TYPE *,              \
261
268
                                             const TYPE *);             \
262
 
   typedef DynArray T##Array;                                           \
263
269
                                                                        \
264
 
   static INLINE void                                                   \
 
270
   static INLINE Bool                                                   \
265
271
   T##Array_Init(T##Array *a, unsigned int count)                       \
266
272
   {                                                                    \
267
 
      DynArray_Init((DynArray *)a, count, sizeof(TYPE));                \
 
273
      return DynArray_Init((DynArray *)a, count, sizeof(TYPE));         \
268
274
   }                                                                    \
269
275
                                                                        \
270
276
   static INLINE void                                                   \
274
280
   }                                                                    \
275
281
                                                                        \
276
282
   static INLINE TYPE*                                                  \
277
 
   T##Array_AddressOf(T##Array *a, unsigned int i)                \
 
283
   T##Array_AddressOf(T##Array *a, unsigned int i)                      \
278
284
   {                                                                    \
279
285
      return (TYPE*)DynArray_AddressOf((DynArray *)a, i);               \
280
286
   }                                                                    \
281
287
                                                                        \
282
288
   static INLINE unsigned int                                           \
283
 
   T##Array_Count(T##Array *a)                                    \
 
289
   T##Array_Count(T##Array *a)                                          \
284
290
   {                                                                    \
285
291
      return DynArray_Count((DynArray *)a);                             \
286
292
   }                                                                    \
303
309
   }                                                                    \
304
310
                                                                        \
305
311
   static INLINE unsigned int                                           \
306
 
   T##Array_AllocCount(T##Array *a)                               \
 
312
   T##Array_AllocCount(T##Array *a)                                     \
307
313
   {                                                                    \
308
314
      return DynArray_AllocCount((DynArray *)a);                        \
309
315
   }                                                                    \