blob: 8e3e4c5bbcdaacb4e358779777ba81109a2e5180 [file] [log] [blame]
diff --git a/configure b/configure
--- a/configure
+++ b/configure
@@ -729,6 +729,7 @@ LDFLAGS_FOR_BUILD
CFLAGS_FOR_BUILD
CPPFLAGS_FOR_BUILD
CC_FOR_BUILD
+LIBS_FOR_BUILD
HAVE_PERL_FALSE
HAVE_PERL_TRUE
PERL
diff --git a/src/CrGlCur.c b/src/CrGlCur.c
--- a/src/CrGlCur.c
+++ b/src/CrGlCur.c
@@ -40,8 +40,10 @@ in this Software without prior written authorization from The Open Group.
#if defined(hpux)
#include <dl.h>
#else
+#if !defined(__native_client__) || !defined(_NEWLIB_VERSION)
#include <dlfcn.h>
#endif
+#endif
#include "Cr.h"
#ifdef __CYGWIN__
@@ -71,7 +73,11 @@ open_library (void)
#if defined(hpux)
module = shl_load(library, BIND_DEFERRED, 0L);
#else
+# if defined(__native_client__) && defined(_NEWLIB_VERSION)
+ module == NULL;
+# else
module = dlopen(library, RTLD_LAZY);
+# endif
#endif
if (module)
return module;
@@ -106,9 +112,13 @@ fetch_symbol (XModuleType module, const char *under_symbol)
free(symbols);
}
#else
+# if defined(__native_client__) && defined(_NEWLIB_VERSION)
+ result = NULL;
+# else
result = dlsym (module, symbol);
if (!result)
result = dlsym (module, under_symbol);
+# endif
#endif
return result;
}
diff --git a/src/GetDflt.c b/src/GetDflt.c
--- a/src/GetDflt.c
+++ b/src/GetDflt.c
@@ -127,10 +127,14 @@ GetHomeDir(
(void) strncpy(dest, ptr, len-1);
dest[len-1] = '\0';
} else {
+#if defined(__native_client__) && !defined(__GLIBC__)
+ pw = NULL;
+#else
if ((ptr = getenv("USER")))
pw = _XGetpwnam(ptr,pwparams);
else
pw = _XGetpwuid(getuid(),pwparams);
+#endif
if (pw != NULL) {
(void) strncpy(dest, pw->pw_dir, len-1);
dest[len-1] = '\0';
diff --git a/src/Makefile.in b/src/Makefile.in
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1356,7 +1356,7 @@ preprocess: $(patsubst %.c,%.ii,$(libX11_la_SOURCES))
@MAKE_LINT_LIB_TRUE@ $(AM_V_GEN)$(LINT) -y -oX11 -x $(ALL_LINT_FLAGS) $(lintlib_src)
ks_tables.h: $(KEYSYMDEFS) $(top_builddir)/src/util/makekeys$(EXEEXT)
- $(top_builddir)/src/util/makekeys $(KEYSYMDEFS) > ks_tables_h
+ $(top_builddir)/src/util/makekeys$(EXEEXT) $(KEYSYMDEFS) > ks_tables_h
mv ks_tables_h $@
$(top_builddir)/src/util/makekeys$(EXEEXT): force
diff --git a/src/util/Makefile.in b/src/util/Makefile.in
--- a/src/util/Makefile.in
+++ b/src/util/Makefile.in
@@ -144,7 +144,7 @@ LD = @LD@
LDFLAGS = @LDFLAGS_FOR_BUILD@
LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@
LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
+LIBS = @LIBS_FOR_BUILD@
LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
@@ -355,7 +355,8 @@ distclean-compile:
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
makekeys-makekeys.o: makekeys.c
-@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(makekeys_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.o -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
+#@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(makekeys_CPPFLAGS) $(CPPFLAGS) $(makekeys_CFLAGS) $(CFLAGS) -MT makekeys-makekeys.o -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) -MT makekeys-makekeys.o -MD -MP -MF $(DEPDIR)/makekeys-makekeys.Tpo -c -o makekeys-makekeys.o `test -f 'makekeys.c' || echo '$(srcdir)/'`makekeys.c
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/makekeys-makekeys.Tpo $(DEPDIR)/makekeys-makekeys.Po
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='makekeys.c' object='makekeys-makekeys.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@