diff options
author | Till Kamppeter <till.kamppeter@gmail.com> | 2007-05-08 18:13:10 +0000 |
---|---|---|
committer | Till Kamppeter <till.kamppeter@gmail.com> | 2007-05-08 18:13:10 +0000 |
commit | ff4e77a33b1c2a4d8baac437a82d79f3d5efe92f (patch) | |
tree | 6b832883cdf4376ae2617e82b96bcbdbec35a208 /gs/src/gp_unix.c | |
parent | e68c99e22b84a83147fbf305aad5ee6b08e75a61 (diff) |
Back out everything after rev 7909
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@7919 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gp_unix.c')
-rw-r--r-- | gs/src/gp_unix.c | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/gs/src/gp_unix.c b/gs/src/gp_unix.c index 8a52a6863..c1898470d 100644 --- a/gs/src/gp_unix.c +++ b/gs/src/gp_unix.c @@ -36,56 +36,11 @@ extern void exit(int); extern char *getenv(const char *); #endif -#ifdef GS_DEVS_SHARED -#ifndef GS_DEVS_SHARED_DIR -# define GS_DEVS_SHARED_DIR "/usr/lib/ghostscript/8.16" -#endif -/* - * use shared library for drivers, always load them when starting, this - * avoid too many modifications, and since it is supported only under linux - * and applied as a patch (preferable). - */ -#include <sys/types.h> -#include <dirent.h> -#include <dlfcn.h> -#include <string.h> - -void -gp_init(void) -{ - DIR* dir = NULL; - struct dirent* dirent; - char buff[1024]; - char* pbuff; - void* handle; - void (*gs_shared_init)(void); - - strncpy(buff, GS_DEVS_SHARED_DIR, sizeof(buff) - 2); - pbuff = buff + strlen(buff); - *pbuff++ = '/'; *pbuff = '\0'; - - dir = opendir(GS_DEVS_SHARED_DIR); - if (dir == 0) return; - - while ((dirent = readdir(dir)) != 0) { - strncpy(pbuff, dirent->d_name, sizeof(buff) - (pbuff - buff) - 1); - if ((handle = dlopen(buff, RTLD_NOW)) != 0) { - if ((gs_shared_init = dlsym(handle, "gs_shared_init")) != 0) { - (*gs_shared_init)(); - } else { - } - } - } - - closedir(dir); -} -#else /* Do platform-dependent initialization. */ void gp_init(void) { } -#endif /* Do platform-dependent cleanup. */ void |