summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--hw/xfree86/common/xf86Module.h1
-rw-r--r--hw/xfree86/loader/loader.c25
-rw-r--r--hw/xfree86/loader/xf86sym.c1
4 files changed, 36 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 09ce7e222..19737c74a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-03-27 Aaron Plattner <aplattner@nvidia.com>
+
+ * hw/xfree86/common/xf86Module.h:
+ * hw/xfree86/loader/loader.c: (LoaderGetABIVersion):
+ * hw/xfree86/loader/xf86sym.c:
+ Add a new export, LoaderGetABIVersion. This function allows
+ modules to query the versions directly instead of having to guess.
+ Bug #6416: Add LoaderGetABIVersion.
+
2006-03-27 Kristian Høgsberg <krh@redhat.com>
* configure.ac:
diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h
index ea6d25b09..fafedba40 100644
--- a/hw/xfree86/common/xf86Module.h
+++ b/hw/xfree86/common/xf86Module.h
@@ -215,6 +215,7 @@ void LoaderReqSymLists(const char **, ...);
void LoaderReqSymbols(const char *, ...);
int LoaderCheckUnresolved(int);
void LoaderGetOS(const char **name, int *major, int *minor, int *teeny);
+int LoaderGetABIVersion(const char *abiclass);
typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *);
typedef void (*ModuleTearDownProc)(pointer);
diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c
index ba2f4e692..30f151a4c 100644
--- a/hw/xfree86/loader/loader.c
+++ b/hw/xfree86/loader/loader.c
@@ -1508,3 +1508,28 @@ LoaderClearOptions(unsigned long opts)
{
LoaderOptions &= ~opts;
}
+
+_X_EXPORT int
+LoaderGetABIVersion(const char *abiclass)
+{
+ struct {
+ const char *name;
+ int version;
+ } classes[] = {
+ { ABI_CLASS_ANSIC, LoaderVersionInfo.ansicVersion },
+ { ABI_CLASS_VIDEODRV, LoaderVersionInfo.videodrvVersion },
+ { ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion },
+ { ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion },
+ { ABI_CLASS_FONT, LoaderVersionInfo.fontVersion },
+ { NULL, 0 }
+ };
+ int i;
+
+ for(i = 0; classes[i].name; i++) {
+ if(!strcmp(classes[i].name, abiclass)) {
+ return classes[i].version;
+ }
+ }
+
+ return 0;
+}
diff --git a/hw/xfree86/loader/xf86sym.c b/hw/xfree86/loader/xf86sym.c
index d33cc8da7..e99c34301 100644
--- a/hw/xfree86/loader/xf86sym.c
+++ b/hw/xfree86/loader/xf86sym.c
@@ -760,6 +760,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(LoaderListDirs)
SYMFUNC(LoaderFreeDirList)
SYMFUNC(LoaderGetOS)
+ SYMFUNC(LoaderGetABIVersion)
/*
* These are our own interfaces to libc functions.