This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

intl patches (11)


gettext-0.12 optionally installs itself in a relocatable way (i.e. it
can be moved around in the filesystem after installation). Here is the
patch that enables support for it in libintl. Inside libc, nothing changes.


2003-02-28  Bruno Haible  <bruno at clisp dot org>

	* intl/localealias.c: Include relocatable.h.
	(read_alias_file): Relocate LOCALE_ALIAS_PATH element.

diff -r -c3 glibc-20030425.orig/intl/localealias.c glibc-20030425/intl/localealias.c
--- glibc-20030425.orig/intl/localealias.c	Fri Nov 22 14:22:20 2002
+++ glibc-20030425/intl/localealias.c	Sun Apr 27 13:07:23 2003
@@ -1,5 +1,5 @@
 /* Handle aliases for locale names.
-   Copyright (C) 1995-1999, 2000,01,02 Free Software Foundation, Inc.
+   Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -58,6 +63,12 @@
 
 #include "gettextP.h"
 
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
 /* @@ end of prolog @@ */
 
 #ifdef _LIBC
@@ -219,7 +230,7 @@
   memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
 #endif
 
-  fp = fopen (full_fname, "r");
+  fp = fopen (relocate (full_fname), "r");
   freea (full_fname);
   if (fp == NULL)
     return 0;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]