Open SCAP Library
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
alloc.h
Go to the documentation of this file.
1 
15 /*
16  * Copyright 2009 Red Hat Inc., Durham, North Carolina.
17  * All Rights Reserved.
18  *
19  * This library is free software; you can redistribute it and/or
20  * modify it under the terms of the GNU Lesser General Public
21  * License as published by the Free Software Foundation; either
22  * version 2.1 of the License, or (at your option) any later version.
23  *
24  * This library is distributed in the hope that it will be useful,
25  * but WITHOUT ANY WARRANTY; without even the implied warranty of
26  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27  * Lesser General Public License for more details.
28  *
29  * You should have received a copy of the GNU Lesser General Public
30  * License along with this library; if not, write to the Free Software
31  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
32  *
33  * Authors:
34  * Lukas Kuklinek <lkuklinek@redhat.com>
35  */
36 
37 #pragma once
38 #ifndef OSCAP_ALLOC_H
39 #define OSCAP_ALLOC_H
40 
41 #include <stdlib.h>
42 #include "public/oscap.h"
43 
44 #if defined(NDEBUG)
45 // Do not use, we keep this just for ABI compatibility, use malloc instead
47 OSCAP_DEPRECATED(void *__oscap_alloc(size_t s));
48 
49 // Do not use, we keep this just for ABI compatibility, use calloc instead
50 OSCAP_DEPRECATED(void *__oscap_calloc(size_t n, size_t s));
51 
52 // Do not use, we keep this just for ABI compatibility, use realloc instead
53 OSCAP_DEPRECATED(void *__oscap_realloc(void *p, size_t s));
54 
55 // Do not use, we keep this just for ABI compatibility, use realloc instead
56 OSCAP_DEPRECATED(void *__oscap_reallocf(void *p, size_t s));
57 
58 // Do not use, we keep this just for ABI compatibility, use free instead
59 OSCAP_DEPRECATED(void __oscap_free(void *p));
61 #endif
62 
64 #define oscap_talloc(T) ((T *) malloc(sizeof(T)))
65 
67 #endif /* OSCAP_ALLOC_H */
68 
General OpenScap functions and types.
#define OSCAP_DEPRECATED(func)
This macro will warn, when a deprecated function is used.
Definition: oscap.h:50