Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/citrus look in the right place for the modules of c...
details: https://anonhg.NetBSD.org/src/rev/ded2f4f65c77
branches: trunk
changeset: 790118:ded2f4f65c77
user: christos <christos%NetBSD.org@localhost>
date: Thu Sep 19 21:19:13 2013 +0000
description:
look in the right place for the modules of compat binaries
diffstat:
lib/libc/citrus/citrus_module.c | 22 +++++++++++++++++-----
1 files changed, 17 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r da89475338bf -r ded2f4f65c77 lib/libc/citrus/citrus_module.c
--- a/lib/libc/citrus/citrus_module.c Thu Sep 19 21:18:17 2013 +0000
+++ b/lib/libc/citrus/citrus_module.c Thu Sep 19 21:19:13 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_module.c,v 1.10 2012/10/15 22:22:01 msaitoh Exp $ */
+/* $NetBSD: citrus_module.c,v 1.11 2013/09/19 21:19:13 christos Exp $ */
/*-
* Copyright (c)1999, 2000, 2001, 2002 Citrus Project,
@@ -89,7 +89,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_module.c,v 1.10 2012/10/15 22:22:01 msaitoh Exp $");
+__RCSID("$NetBSD: citrus_module.c,v 1.11 2013/09/19 21:19:13 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#include <assert.h>
@@ -302,12 +302,24 @@
if (_pathI18nModule == NULL) {
p = getenv("PATH_I18NMODULE");
- if (p != NULL && !issetugid()) {
+ if (p == NULL || issetugid()) {
+ _pathI18nModule = _PATH_I18NMODULE;
+#ifdef MLIBDIR
+ p = strrchr(_pathI18nModule, '/');
+ if (p != NULL && MLIBDIR[0]) {
+ snprintf(path, sizeof(path), "%.*s/%s/%s",
+ (int)(p - _pathI18nModule),
+ _pathI18nModule, MLIBDIR, p + 1);
+ p = path;
+ } else
+ p = NULL;
+#endif
+ }
+ if (p != NULL) {
_pathI18nModule = strdup(p);
if (_pathI18nModule == NULL)
return ENOMEM;
- } else
- _pathI18nModule = _PATH_I18NMODULE;
+ }
}
(void)snprintf(path, sizeof(path), "lib%s", encname);
Home |
Main Index |
Thread Index |
Old Index