remove glib dependency by provide compatible replacements
This commit is contained in:
@ -12,7 +12,7 @@
|
||||
#ifndef BITMAP_H
|
||||
#define BITMAP_H
|
||||
|
||||
#include <glib.h>
|
||||
#include "glib_compat.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
@ -209,19 +209,8 @@ const char *qemu_get_version(void);
|
||||
void fips_set_state(bool requested);
|
||||
bool fips_get_state(void);
|
||||
|
||||
/* Return a dynamically allocated pathname denoting a file or directory that is
|
||||
* appropriate for storing local state.
|
||||
*
|
||||
* @relative_pathname need not start with a directory separator; one will be
|
||||
* added automatically.
|
||||
*
|
||||
* The caller is responsible for releasing the value returned with g_free()
|
||||
* after use.
|
||||
*/
|
||||
char *qemu_get_local_state_pathname(const char *relative_pathname);
|
||||
|
||||
/* Get the saved exec dir.
|
||||
* Caller needs to release the returned string by g_free() */
|
||||
* Caller needs to release the returned string by free() */
|
||||
char *qemu_get_exec_dir(void);
|
||||
|
||||
/**
|
||||
|
@ -119,7 +119,7 @@ static inline GList *g_list_insert_sorted_merged(GList *list,
|
||||
return list;
|
||||
}
|
||||
|
||||
static inline gint range_compare(gconstpointer a, gconstpointer b)
|
||||
static inline int32_t range_compare(gconstpointer a, gconstpointer b)
|
||||
{
|
||||
Range *ra = (Range *)a, *rb = (Range *)b;
|
||||
if (ra->begin == rb->begin && ra->end == rb->end) {
|
||||
|
@ -574,19 +574,6 @@ void timer_put(QEMUFile *f, QEMUTimer *ts);
|
||||
*/
|
||||
int qemu_timeout_ns_to_ms(int64_t ns);
|
||||
|
||||
/**
|
||||
* qemu_poll_ns:
|
||||
* @fds: Array of file descriptors
|
||||
* @nfds: number of file descriptors
|
||||
* @timeout: timeout in nanoseconds
|
||||
*
|
||||
* Perform a poll like g_poll but with a timeout in nanoseconds.
|
||||
* See g_poll documentation for further details.
|
||||
*
|
||||
* Returns: number of fds ready
|
||||
*/
|
||||
int qemu_poll_ns(GPollFD *fds, guint nfds, int64_t timeout);
|
||||
|
||||
/**
|
||||
* qemu_soonest_timeout:
|
||||
* @timeout1: first timeout in nanoseconds (or -1 for infinite)
|
||||
|
Reference in New Issue
Block a user