libparted 3.6
Loading...
Searching...
No Matches
parted.h
Go to the documentation of this file.
1/*
2 libparted - a library for manipulating disk partitions
3 Copyright (C) 1999-2001, 2007, 2009-2014, 2019-2023 Free Software
4 Foundation, Inc.
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#ifndef PARTED_H_INCLUDED
21#define PARTED_H_INCLUDED
22
23#define PED_DEFAULT_ALIGNMENT (1024 * 1024)
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
29#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
30# define __attribute(arg) __attribute__ (arg)
31#else
32# define __attribute(arg)
33#endif
34
35#include <parted/constraint.h>
36#include <parted/device.h>
37#include <parted/disk.h>
38#include <parted/exception.h>
39#include <parted/filesys.h>
40#include <parted/natmath.h>
41#include <parted/unit.h>
42
43#include <stdint.h>
44#include <stdlib.h>
45#include <string.h>
46
47extern const char *ped_get_version ()
48#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
49 __attribute ((__const__))
50#endif
51;
52
53extern void* __attribute__ ((malloc)) ped_malloc (size_t size);
54extern void* __attribute__ ((malloc)) ped_calloc (size_t size);
55extern void free (void* ptr);
56
57#ifdef __cplusplus
58}
59#endif
60
61#endif /* PARTED_H_INCLUDED */
typedef __attribute__
Definition: vtoc.h:80
void * ped_malloc(size_t size)
Definition: libparted.c:240
void * ped_calloc(size_t size)
Definition: libparted.c:255
#define __attribute(arg)
Definition: parted.h:32
const char * ped_get_version()
Definition: libparted.c:234
void free(void *ptr)