diff options
author | Guillem Jover <guillem@hadrons.org> | 2010-10-21 05:12:37 +0200 |
---|---|---|
committer | Guillem Jover <guillem@hadrons.org> | 2010-10-21 07:31:35 +0200 |
commit | ef45124f827e9b851c99bb8dbe29987e765cb85e (patch) | |
tree | e892e2ce9413f74fb2a7eb62855dba05d1eb3bc3 | |
parent | a30cc5587a71c0cbaedaa06b1d95274f890a1534 (diff) |
Abstract glide2x module name into a GLIDE_MODULE_NAME macro
-rw-r--r-- | src/glide_driver.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/glide_driver.c b/src/glide_driver.c index 6357f2f..58b65c4 100644 --- a/src/glide_driver.c +++ b/src/glide_driver.c @@ -162,6 +162,7 @@ static int LoadGlide(void); #define GLIDE_VERSION 4000 #define GLIDE_NAME "GLIDE" #define GLIDE_DRIVER_NAME "glide" +#define GLIDE_MODULE_NAME "glide2x" #define GLIDE_MAJOR_VERSION PACKAGE_VERSION_MAJOR #define GLIDE_MINOR_VERSION PACKAGE_VERSION_MINOR #define GLIDE_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL @@ -225,6 +226,7 @@ _X_EXPORT XF86ModuleData glideModuleData = { &glideVersRec, glideSetup, NULL }; static pointer glideSetup(pointer module, pointer opts, int *errmaj, int *errmin) { + const char module_name[] = GLIDE_MODULE_NAME; static Bool setupDone = FALSE; pointer ret; int errmaj2 = 0, errmin2 = 0; @@ -236,23 +238,23 @@ glideSetup(pointer module, pointer opts, int *errmaj, int *errmin) * by calling LoadSubModule(). */ - ret = LoadSubModule(module, "glide2x", NULL, NULL, EXTERN_MODULE, NULL, + ret = LoadSubModule(module, module_name, NULL, NULL, EXTERN_MODULE, NULL, &errmaj2, &errmin2); if (!ret) { xf86Msg(X_ERROR, "Glide driver:\n" "\n" -"Could not load the shared library file for Glide: \"libglide2x.so\"! \n" +"Could not load the shared library file for Glide: \"lib%s.so\"! \n" "\n" "You need to have Glide installed to run the glide driver for X.Org.\n" -"Also, you need to tell X.Org where the libglide2x.so file is placed\n" +"Also, you need to tell X.Org where the lib%s.so file is placed\n" "by making a soft link in the " MODULEDIR " directory that points\n" -"to the libglide2x.so file. For example (if your libglide2x.so file is in\n" +"to the lib%s.so file. For example (if your lib%s.so file is in\n" "/usr/lib):\n" "\n" -" # ln -s /usr/lib/libglide2x.so " MODULEDIR "\n" +" # ln -s /usr/lib/lib%s.so " MODULEDIR "\n" "\n" -"\n"); +"\n", module_name, module_name, module_name, module_name, module_name); if (errmaj) *errmaj = LDR_NOSUBENT; if (errmin) @@ -959,7 +961,7 @@ GLIDERestore(ScrnInfoPtr pScrn, Bool Closing) p##x = (p##x##_t)LoaderSymbol(#x); \ if (!p##x) \ { \ - xf86Msg(X_ERROR, "Could not find " #x "() in libglide2x.so.\n"); \ + xf86Msg(X_ERROR, "Could not find " #x "() in lib%s.so.\n", GLIDE_MODULE_NAME); \ return FALSE; \ } |