aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib/X11')
-rw-r--r--nx-X11/lib/X11/AuGetBest.c35
-rw-r--r--nx-X11/lib/X11/CrGlCur.c31
-rw-r--r--nx-X11/lib/X11/SetLocale.c17
-rw-r--r--nx-X11/lib/X11/XlcDL.c52
-rw-r--r--nx-X11/lib/X11/XlibInt.c2
5 files changed, 6 insertions, 131 deletions
diff --git a/nx-X11/lib/X11/AuGetBest.c b/nx-X11/lib/X11/AuGetBest.c
index fce9ddead..2518805cc 100644
--- a/nx-X11/lib/X11/AuGetBest.c
+++ b/nx-X11/lib/X11/AuGetBest.c
@@ -33,11 +33,6 @@ in this Software without prior written authorization from The Open Group.
#ifdef XTHREADS
#include <nx-X11/Xthreads.h>
#endif
-#ifdef hpux
-#define X_INCLUDE_NETDB_H
-#define XOS_USE_NO_LOCKING
-#include <nx-X11/Xos_r.h>
-#endif
static int
binaryEqual (_Xconst char *a, _Xconst char *b, int len)
@@ -74,10 +69,6 @@ XauGetBestAuthByAddr (
Xauth *best;
int best_type;
int type;
-#ifdef hpux
- char *fully_qual_address;
- unsigned short fully_qual_address_length;
-#endif
auth_name = XauFileName ();
if (!auth_name)
@@ -88,26 +79,6 @@ XauGetBestAuthByAddr (
if (!auth_file)
return 0;
-#ifdef hpux
- if (family == FamilyLocal) {
-#ifdef XTHREADS_NEEDS_BYNAMEPARAMS
- _Xgethostbynameparams hparams;
-#endif
- struct hostent *hostp;
-
- /* make sure we try fully-qualified hostname */
- if ((hostp = _XGethostbyname(address,hparams)) != NULL) {
- fully_qual_address = hostp->h_name;
- fully_qual_address_length = strlen(fully_qual_address);
- }
- else
- {
- fully_qual_address = NULL;
- fully_qual_address_length = 0;
- }
- }
-#endif /* hpux */
-
best = 0;
best_type = types_length;
for (;;) {
@@ -131,12 +102,6 @@ XauGetBestAuthByAddr (
(entry->family == family &&
((address_length == entry->address_length &&
binaryEqual (entry->address, address, (int)address_length))
-#ifdef hpux
- || (family == FamilyLocal &&
- fully_qual_address_length == entry->address_length &&
- binaryEqual (entry->address, fully_qual_address,
- (int) fully_qual_address_length))
-#endif
))) &&
(number_length == 0 || entry->number_length == 0 ||
(number_length == entry->number_length &&
diff --git a/nx-X11/lib/X11/CrGlCur.c b/nx-X11/lib/X11/CrGlCur.c
index 11c047097..88133b7f4 100644
--- a/nx-X11/lib/X11/CrGlCur.c
+++ b/nx-X11/lib/X11/CrGlCur.c
@@ -33,22 +33,14 @@ in this Software without prior written authorization from The Open Group.
#include <stdio.h>
#include <string.h>
-#if defined(hpux)
-#include <dl.h>
-#else
#include <dlfcn.h>
-#endif
#include "Cr.h"
#ifdef __CYGWIN__
#define LIBXCURSOR "cygXcursor-1.dll"
#endif
-#if defined(hpux)
-typedef shl_t XModuleType;
-#else
typedef void *XModuleType;
-#endif
#ifndef LIBXCURSOR
#define LIBXCURSOR "libXcursor.so.1"
@@ -64,11 +56,7 @@ open_library (void)
XModuleType module;
for (;;)
{
-#if defined(hpux)
- module = shl_load(library, BIND_DEFERRED, 0L);
-#else
module = dlopen(library, RTLD_LAZY);
-#endif
if (module)
return module;
dot = strrchr (library, '.');
@@ -84,28 +72,9 @@ fetch_symbol (XModuleType module, const char *under_symbol)
{
void *result = NULL;
const char *symbol = under_symbol + 1;
-#if defined(hpux)
- int getsyms_cnt, i;
- struct shl_symbol *symbols;
-
- getsyms_cnt = shl_getsymbols(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 = dlsym (module, symbol);
if (!result)
result = dlsym (module, under_symbol);
-#endif
return result;
}
diff --git a/nx-X11/lib/X11/SetLocale.c b/nx-X11/lib/X11/SetLocale.c
index e14fdaef6..832976ee3 100644
--- a/nx-X11/lib/X11/SetLocale.c
+++ b/nx-X11/lib/X11/SetLocale.c
@@ -99,18 +99,10 @@ _XlcMapOSLocaleName(
char *osname,
char *siname)
{
-#if defined(hpux) || defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(linux)
-# ifdef hpux
-# ifndef _LastCategory
- /* HPUX 9 and earlier */
-# define SKIPCOUNT 2
-# define STARTCHAR ':'
-# define ENDCHAR ';'
-# else
- /* HPUX 10 */
-# define ENDCHAR ' '
-# endif
-# else
+
+/* FIXME: correct indentation levels after ancient platform clean-up */
+
+#if defined(CSRG_BASED) || defined(sun) || defined(SVR4) || defined(sgi) || defined(__osf__) || defined(AIXV3) || defined(ultrix) || defined(WIN32) || defined(linux)
# ifdef ultrix
# define SKIPCOUNT 2
# define STARTCHAR '\001'
@@ -138,7 +130,6 @@ _XlcMapOSLocaleName(
# endif
# endif
# endif
-# endif
char *start;
char *end;
diff --git a/nx-X11/lib/X11/XlcDL.c b/nx-X11/lib/X11/XlcDL.c
index bc71900a0..032bcf51c 100644
--- a/nx-X11/lib/X11/XlcDL.c
+++ b/nx-X11/lib/X11/XlcDL.c
@@ -63,11 +63,7 @@ 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>
@@ -106,11 +102,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
@@ -156,7 +148,6 @@ strdup_with_underscore(const char *symbol)
return result;
}
-#ifndef hpux
static void *
try_both_dlsym (void *handle, char *name)
{
@@ -174,7 +165,6 @@ try_both_dlsym (void *handle, char *name)
}
return ret;
}
-#endif
static void
resolve_object(char *path, const char *lc_name)
@@ -301,11 +291,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)
@@ -322,31 +308,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;
}
@@ -357,11 +323,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;
}
}
@@ -466,10 +428,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;
@@ -514,10 +472,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;
@@ -570,10 +524,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;
diff --git a/nx-X11/lib/X11/XlibInt.c b/nx-X11/lib/X11/XlibInt.c
index bae224ee1..bece819cf 100644
--- a/nx-X11/lib/X11/XlibInt.c
+++ b/nx-X11/lib/X11/XlibInt.c
@@ -3891,7 +3891,7 @@ _XData32(
* and so, you may be better off using gethostname (if it exists).
*/
-#if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(hpux) || defined(SVR4)
+#if (defined(_POSIX_SOURCE) && !defined(AIXV3) && !defined(__QNX__)) || defined(SVR4)
#define NEED_UTSNAME
#include <sys/utsname.h>
#else