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

Remove C++ private keyword from headers.

Add extern C definition for libdevmapper, lvm2app and lvm2cmd.
This commit is contained in:
Milan Broz 2010-06-16 13:01:25 +00:00
parent cee2f123a4
commit c9c7d25c35
6 changed files with 27 additions and 5 deletions

View File

@ -1,5 +1,6 @@
Version 2.02.68 - Version 2.02.68 -
=============================== ===============================
Allow use of lvm2app and lvm2cmd headers in C++ mode.
Fix wrong lvm path creation from configure introduced in previous release. Fix wrong lvm path creation from configure introduced in previous release.
Fix segfault in clvmd -R if no response from daemon received. Fix segfault in clvmd -R if no response from daemon received.

View File

@ -1,5 +1,6 @@
Version 1.02.50 - Version 1.02.50 -
=============================== ===============================
Allow use of devmapper header file in C++ mode.
Version 1.02.49 - 4th June 2010 Version 1.02.49 - 4th June 2010
=============================== ===============================

View File

@ -1,6 +1,6 @@
/* /*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
* Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved. * Copyright (C) 2004-2010 Red Hat, Inc. All rights reserved.
* *
* This file is part of the device-mapper userspace tools. * This file is part of the device-mapper userspace tools.
* *
@ -29,6 +29,10 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/***************************************************************** /*****************************************************************
* The first section of this file provides direct access to the * The first section of this file provides direct access to the
* individual device-mapper ioctls. Since it is quite laborious to * individual device-mapper ioctls. Since it is quite laborious to
@ -1022,7 +1026,7 @@ struct dm_report_field_type {
const char heading[32]; /* string printed in header */ const char heading[32]; /* string printed in header */
int (*report_fn)(struct dm_report *rh, struct dm_pool *mem, int (*report_fn)(struct dm_report *rh, struct dm_pool *mem,
struct dm_report_field *field, const void *data, struct dm_report_field *field, const void *data,
void *private); void *private_data);
const char *desc; /* description of the field */ const char *desc; /* description of the field */
}; };
@ -1044,7 +1048,7 @@ struct dm_report *dm_report_init(uint32_t *report_types,
const char *output_separator, const char *output_separator,
uint32_t output_flags, uint32_t output_flags,
const char *sort_keys, const char *sort_keys,
void *private); void *private_data);
int dm_report_object(struct dm_report *rh, void *object); int dm_report_object(struct dm_report *rh, void *object);
int dm_report_output(struct dm_report *rh); int dm_report_output(struct dm_report *rh);
void dm_report_free(struct dm_report *rh); void dm_report_free(struct dm_report *rh);
@ -1163,4 +1167,7 @@ int dm_udev_wait(uint32_t cookie);
#define DM_DEV_DIR_UMASK 0022 #define DM_DEV_DIR_UMASK 0022
#ifdef __cplusplus
}
#endif
#endif /* LIB_DEVICE_MAPPER_H */ #endif /* LIB_DEVICE_MAPPER_H */

View File

@ -566,7 +566,7 @@ struct dm_report *dm_report_init(uint32_t *report_types,
const char *output_separator, const char *output_separator,
uint32_t output_flags, uint32_t output_flags,
const char *sort_keys, const char *sort_keys,
void *private) void *private_data)
{ {
struct dm_report *rh; struct dm_report *rh;
const struct dm_report_object_type *type; const struct dm_report_object_type *type;
@ -588,7 +588,7 @@ struct dm_report *dm_report_init(uint32_t *report_types,
rh->separator = output_separator; rh->separator = output_separator;
rh->fields = fields; rh->fields = fields;
rh->types = types; rh->types = types;
rh->private = private; rh->private = private_data;
rh->flags |= output_flags & DM_REPORT_OUTPUT_MASK; rh->flags |= output_flags & DM_REPORT_OUTPUT_MASK;

View File

@ -18,6 +18,9 @@
#include <stdint.h> #include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
/******************************** WARNING *********************************** /******************************** WARNING ***********************************
* *
@ -1194,4 +1197,7 @@ uint64_t lvm_pv_get_free(const pv_t pv);
*/ */
int lvm_pv_resize(const pv_t pv, uint64_t new_size); int lvm_pv_resize(const pv_t pv, uint64_t new_size);
#ifdef __cplusplus
}
#endif
#endif /* _LIB_LVM2APP_H */ #endif /* _LIB_LVM2APP_H */

View File

@ -16,6 +16,10 @@
#ifndef _LVM_CMDLIB_H #ifndef _LVM_CMDLIB_H
#define _LVM_CMDLIB_H #define _LVM_CMDLIB_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef _LVM_LOG_H #ifndef _LVM_LOG_H
typedef void (*lvm2_log_fn_t) (int level, const char *file, int line, typedef void (*lvm2_log_fn_t) (int level, const char *file, int line,
int dm_errno, const char *message); int dm_errno, const char *message);
@ -63,4 +67,7 @@ int lvm2_run(void *handle, const char *cmdline);
/* Release handle */ /* Release handle */
void lvm2_exit(void *handle); void lvm2_exit(void *handle);
#ifdef __cplusplus
}
#endif
#endif #endif