diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2024-07-10 08:04:09 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2024-07-10 08:04:09 +0000 |
commit | b17d851c8dadfdac212448bd7aa689ad23cf7145 (patch) | |
tree | 9ccbccf98aed193afd4fb1e6a9a981bc8fd9ebaa /lib/libX11/src/xlibi18n/XlcDL.c | |
parent | 42f2a1707f15aaa349761220bdc11270ab4cc4fe (diff) |
Update to libX11 1.8.9 part 3: unifdef legacy systems
Diffstat (limited to 'lib/libX11/src/xlibi18n/XlcDL.c')
-rw-r--r-- | lib/libX11/src/xlibi18n/XlcDL.c | 58 |
1 files changed, 2 insertions, 56 deletions
diff --git a/lib/libX11/src/xlibi18n/XlcDL.c b/lib/libX11/src/xlibi18n/XlcDL.c index c1abe79fb..351f2ee76 100644 --- a/lib/libX11/src/xlibi18n/XlcDL.c +++ b/lib/libX11/src/xlibi18n/XlcDL.c @@ -37,7 +37,7 @@ Sun Microsystems, Inc. or its licensors is granted. */ /* - * Copyright 2000 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, Oracle and/or its affiliates. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -63,19 +63,11 @@ Sun Microsystems, Inc. or its licensors is granted. #ifdef HAVE_CONFIG_H # include <config.h> #else -# if defined(hpux) -# define HAVE_DL_H -# else -# define HAVE_DLFCN_H -# endif +# define HAVE_DLFCN_H #endif #include <stdio.h> -#ifdef HAVE_DL_H -#include <dl.h> -#endif - #ifdef HAVE_DLFCN_H #include <dlfcn.h> #endif @@ -107,11 +99,7 @@ typedef struct { char *im_unregister; int dl_release; unsigned int refcount; -#if defined(hpux) - shl_t dl_module; -#else void *dl_module; -#endif } XI18NObjectsListRec, *XI18NObjectsList; #define OBJECT_INIT_LEN 8 @@ -157,7 +145,6 @@ strdup_with_underscore(const char *symbol) return result; } -#ifndef hpux static void * try_both_dlsym (void *handle, char *name) { @@ -175,7 +162,6 @@ try_both_dlsym (void *handle, char *name) } return ret; } -#endif static void resolve_object(char *path, const char *lc_name) @@ -303,11 +289,7 @@ open_object( path = __lc_path(object->dl_name, lc_dir); if (!path) return False; -#if defined(hpux) - object->dl_module = shl_load(path, BIND_DEFERRED, 0L); -#else object->dl_module = dlopen(path, RTLD_LAZY); -#endif Xfree(path); if (!object->dl_module) @@ -324,31 +306,11 @@ fetch_symbol( char *symbol) { void *result = NULL; -#if defined(hpux) - int getsyms_cnt, i; - struct shl_symbol *symbols; -#endif if (symbol == NULL) return NULL; -#if defined(hpux) - getsyms_cnt = shl_getsymbols(object->dl_module, TYPE_PROCEDURE, - EXPORT_SYMBOLS, malloc, &symbols); - - for(i=0; i<getsyms_cnt; i++) { - if(!strcmp(symbols[i].name, symbol)) { - result = symbols[i].value; - break; - } - } - - if(getsyms_cnt > 0) { - free(symbols); - } -#else result = try_both_dlsym(object->dl_module, symbol); -#endif return result; } @@ -359,11 +321,7 @@ close_object(XI18NObjectsList object) object->refcount--; if (object->refcount == 0) { -#if defined(hpux) - shl_unload(object->dl_module); -#else dlclose(object->dl_module); -#endif object->dl_module = NULL; } } @@ -468,10 +426,6 @@ _XDynamicRegisterIMInstantiateCallback( Bool ret_flag = False; int count; XI18NObjectsList objects_list = xi18n_objects_list; -#if defined(hpux) - int getsyms_cnt, i; - struct shl_symbol *symbols; -#endif lc_name = lcd->core->name; @@ -516,10 +470,6 @@ _XDynamicUnRegisterIMInstantiateCallback( Bool ret_flag = False; int count; XI18NObjectsList objects_list = xi18n_objects_list; -#if defined(hpux) - int getsyms_cnt, i; - struct shl_symbol *symbols; -#endif lc_name = lcd->core->name; if (_XlcLocaleDirName(lc_dir, BUFSIZE, lc_name) == NULL) return False; @@ -572,10 +522,6 @@ _XDynamicOpenOM(XLCd lcd, Display *display, XrmDatabase rdb, char *lc_name; dynamicIOpenProcp om_openOM = (dynamicIOpenProcp)NULL; XI18NObjectsList objects_list = xi18n_objects_list; -#if defined(hpux) - int getsyms_cnt, i; - struct shl_symbol *symbols; -#endif lc_name = lcd->core->name; |