Changes since v1:
- renamed function to loader_get_extensions_name
- moved function into loader
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
V2: [Emil Velikov]
- Use local define.
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
{
log_ = logger;
}
+
+/* XXX: Local definition to avoid pulling the heavyweight GL/gl.h and
+ * GL/internal/dri_interface.h
+ */
+
+#ifndef __DRI_DRIVER_GET_EXTENSIONS
+#define __DRI_DRIVER_GET_EXTENSIONS "__driDriverGetExtensions"
+#endif
+
+char *
+loader_get_extensions_name(const char *driver_name)
+{
+ char *name = NULL;
+
+ if (asprintf(&name, "%s_%s", __DRI_DRIVER_GET_EXTENSIONS, driver_name) < 0)
+ return NULL;
+
+ return name;
+}
void
loader_set_logger(void (*logger)(int level, const char *fmt, ...));
+char *
+loader_get_extensions_name(const char *driver_name);
#ifdef __cplusplus
}