1 #ifndef FS_MALLOC_H
2 #define FS_MALLOC_H
3 
4 #ifdef HAVE_CONFIG_H
5 #include "config.h"
6 #endif
7 
8 #ifdef USE_GLIB
9 
10 #include <glib.h>
11 
12 #else
13 
14 void *fs_malloc0(size_t n_bytes) FS_MALLOC /* G_GNUC_ALLOC_SIZE(1) */;
15 
16 #define g_malloc0 fs_malloc0
17 
18 #define g_new(struct_type, n_structs) (struct_type *) \
19         malloc(sizeof(struct_type) * (n_structs))
20 
21 #define g_new0(struct_type, n_structs) (struct_type *) \
22         fs_malloc0(sizeof(struct_type) * (n_structs))
23 
24 #endif
25 
26 #endif /* FS_MALLOC_H */
27