Add a new export, LoaderGetABIVersion. This function allows modules to

query the versions directly instead of having to guess. Bug #6416: Add
    LoaderGetABIVersion.
This commit is contained in:
Aaron Plattner 2006-03-28 07:21:50 +00:00
parent a06342eccc
commit bd283c2464
4 changed files with 36 additions and 0 deletions

View File

@ -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:

View File

@ -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);

View File

@ -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;
}

View File

@ -760,6 +760,7 @@ LOOKUP xfree86LookupTab[] = {
SYMFUNC(LoaderListDirs)
SYMFUNC(LoaderFreeDirList)
SYMFUNC(LoaderGetOS)
SYMFUNC(LoaderGetABIVersion)
/*
* These are our own interfaces to libc functions.