1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

In some C++ standards, typeof is not reserved.

This commit is contained in:
Alasdair Kergon 2010-06-23 17:03:14 +00:00
parent acc70bce86
commit 85691c0afb
3 changed files with 16 additions and 12 deletions

View File

@ -1,12 +1,10 @@
Version 2.02.68 - Version 2.02.68 -
=============================== ===============================
Fix clvmd initscript status to print only active clustered LVs. Fix clvmd initscript status to print only active clustered LVs.
Fix typo "INTERNAL ERROR" -> "INTERNAL_ERROR" in libdm-iface.c.
Add lv_path to reports to offer full /dev pathname. Add lv_path to reports to offer full /dev pathname.
Fix typo in warning message about missing device with allocated data areas. Fix typo in warning message about missing device with allocated data areas.
Add device name and offset to output of error messages in raw_read_mda_header(). Add device name and offset to raw_read_mda_header error messages.
Use flexible data[] in cmirrord request to prevent abort in runtime size checks. Honour log argument when down-converting stacked mirror.
Honor log argument when down-converting stacked mirror.
Sleep to workaround clvmd -S race: socket closed early and server drops cmd. Sleep to workaround clvmd -S race: socket closed early and server drops cmd.
Use early udev synchronisation and update of dev nodes for clustered mirrors. Use early udev synchronisation and update of dev nodes for clustered mirrors.
Remove incorrect inclusion of kdev_t.h from cmirrord/functions.h. Remove incorrect inclusion of kdev_t.h from cmirrord/functions.h.

View File

@ -1,7 +1,9 @@
Version 1.02.50 - Version 1.02.50 -
=============================== ===============================
Fix INTERNAL_ERROR typo in ioctl iface unknown task message.
Fix udev rules to handle spurious events properly. Fix udev rules to handle spurious events properly.
Allow use of devmapper header file in C++ mode. Use C99 [] not [0] in dm_ulog_request struct to avoid abort when fortified.
Allow use of devmapper header file in C++ mode (extern "C" and __typeof__).
Version 1.02.49 - 4th June 2010 Version 1.02.49 - 4th June 2010
=============================== ===============================

View File

@ -29,6 +29,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifndef __GNUC__
# define __typeof__ typeof
#endif
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
@ -855,9 +859,9 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* The 'struct dm_list' variable within the containing structure is 'field'. * The 'struct dm_list' variable within the containing structure is 'field'.
*/ */
#define dm_list_iterate_items_gen(v, head, field) \ #define dm_list_iterate_items_gen(v, head, field) \
for (v = dm_list_struct_base((head)->n, typeof(*v), field); \ for (v = dm_list_struct_base((head)->n, __typeof__(*v), field); \
&v->field != (head); \ &v->field != (head); \
v = dm_list_struct_base(v->field.n, typeof(*v), field)) v = dm_list_struct_base(v->field.n, __typeof__(*v), field))
/* /*
* Walk a list, setting 'v' in turn to the containing structure of each item. * Walk a list, setting 'v' in turn to the containing structure of each item.
@ -873,10 +877,10 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* t must be defined as a temporary variable of the same type as v. * t must be defined as a temporary variable of the same type as v.
*/ */
#define dm_list_iterate_items_gen_safe(v, t, head, field) \ #define dm_list_iterate_items_gen_safe(v, t, head, field) \
for (v = dm_list_struct_base((head)->n, typeof(*v), field), \ for (v = dm_list_struct_base((head)->n, __typeof__(*v), field), \
t = dm_list_struct_base(v->field.n, typeof(*v), field); \ t = dm_list_struct_base(v->field.n, __typeof__(*v), field); \
&v->field != (head); \ &v->field != (head); \
v = t, t = dm_list_struct_base(v->field.n, typeof(*v), field)) v = t, t = dm_list_struct_base(v->field.n, __typeof__(*v), field))
/* /*
* Walk a list, setting 'v' in turn to the containing structure of each item. * Walk a list, setting 'v' in turn to the containing structure of each item.
* The containing structure should be the same type as 'v'. * The containing structure should be the same type as 'v'.
@ -893,9 +897,9 @@ struct dm_list *dm_list_next(const struct dm_list *head, const struct dm_list *e
* The 'struct dm_list' variable within the containing structure is 'field'. * The 'struct dm_list' variable within the containing structure is 'field'.
*/ */
#define dm_list_iterate_back_items_gen(v, head, field) \ #define dm_list_iterate_back_items_gen(v, head, field) \
for (v = dm_list_struct_base((head)->p, typeof(*v), field); \ for (v = dm_list_struct_base((head)->p, __typeof__(*v), field); \
&v->field != (head); \ &v->field != (head); \
v = dm_list_struct_base(v->field.p, typeof(*v), field)) v = dm_list_struct_base(v->field.p, __typeof__(*v), field))
/* /*
* Walk a list backwards, setting 'v' in turn to the containing structure * Walk a list backwards, setting 'v' in turn to the containing structure