* elf/ldconfig.c (main): Call setlocale and textdomain.
Patch mostly by Benno Schulenberg <bensberg@justemail.net>.
2006-11-10 Ulrich Drepper <drepper@redhat.com>
+ [BZ #3483]
+ * elf/ldconfig.c (main): Call setlocale and textdomain.
+ Patch mostly by Benno Schulenberg <bensberg@justemail.net>.
+
[BZ #3480]
* manual/argp.texi: Fix typos.
* manual/charset.texi: Likewise.
#include <errno.h>
#include <inttypes.h>
#include <libintl.h>
+#include <locale.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdio_ext.h>
int
main (int argc, char **argv)
{
- int remaining;
+ /* Set locale via LC_ALL. */
+ setlocale (LC_ALL, "");
+
+ /* Set the text message domain. */
+ textdomain (_libc_intl_domainname);
/* Parse and process arguments. */
+ int remaining;
argp_parse (&argp, argc, argv, 0, &remaining, NULL);
/* Remaining arguments are additional directories if opt_manual_link
@item ARGP_LONG_ONLY
Use the gnu getopt `long-only' rules for parsing arguments. This allows
long-options to be recognized with only a single @samp{-}
-(i.e. @samp{-help}). This results in a less useful interface, and its
+(i.e., @samp{-help}). This results in a less useful interface, and its
use is discouraged as it conflicts with the way most GNU programs work
as well as the GNU coding standards.
than one byte, they are effected by byte-ordering. Thus, machines with
different endianesses would see different values when accessing the same
data. This byte ordering concern also applies for communication protocols
-that are all byte-based and, thereforet require that the sender has to
+that are all byte-based and therefore require that the sender has to
decide about splitting the wide character in bytes. A last (but not least
important) point is that wide characters often require more storage space
than a customized byte-oriented character set.
multibyte character, the number of bytes belonging to this multibyte
character byte sequence is returned.
-If the the first @var{n} bytes possibly form a valid multibyte
+If the first @var{n} bytes possibly form a valid multibyte
character but the character is incomplete, the return value is
@code{(size_t) -2}. Otherwise the multibyte character sequence is invalid
and the return value is @code{(size_t) -1}.
same as the one required for UCS-4. This is done for performance reasons
as one does not want to perform unnecessary byte-swapping operations if
one is not interested in actually seeing the result in UCS-4. To avoid
-trouble with endianess, the internal representation consistently is named
+trouble with endianness, the internal representation consistently is named
@code{INTERNAL} even on big-endian systems where the representations are
identical.
arguments required for the format can follow the @var{format} parameter.
Just like @code{perror}, @code{error} also can report an error code in
textual form. But unlike @code{perror} the error value is explicitly
-passed to the function in the @var{errnum} parameter. This elimintates
+passed to the function in the @var{errnum} parameter. This eliminates
the problem mentioned above that the error reporting function must be
called immediately after the function causing the error since otherwise
@code{errno} might have a different value.
If the global variable @code{error_one_per_line} is set to a non-zero
value @code{error_at_line} will avoid printing consecutive messages for
-the same file anem line. Repetition which are not directly following
+the same file and line. Repetition which are not directly following
each other are not caught.
Just like @code{error} this function only returned if @var{status} is
@comment GNU
@deftypefun {char *} get_current_dir_name (void)
@vindex PWD
-This @code{get_current_dir_name} function is bascially equivalent to
+This @code{get_current_dir_name} function is basically equivalent to
@w{@code{getcwd (NULL, 0)}}. The only difference is that the value of
the @code{PWD} variable is returned if this value is correct. This is a
subtle difference which is visible if the path described by the
the return value of @code{ftw}.
When the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a
-32-bit system this function is in fact @code{ftw64}, i.e. the LFS
+32-bit system this function is in fact @code{ftw64}, i.e., the LFS
interface transparently replaces the old interface.
@end deftypefun
then that value is returned.
When the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a
-32-bit system this function is in fact @code{nftw64}, i.e. the LFS
+32-bit system this function is in fact @code{nftw64}, i.e., the LFS
interface transparently replaces the old interface.
@end deftypefun
One useful feature of @code{rename} is that the meaning of @var{newname}
changes ``atomically'' from any previously existing file by that name to
-its new meaning (i.e. the file that was called @var{oldname}). There is
+its new meaning (i.e., the file that was called @var{oldname}). There is
no instant at which @var{newname} is non-existent ``in between'' the old
meaning and the new meaning. If there is a system crash during the
operation, it is possible for both names to still exist; but
This function is reentrant.
When the sources are compiled with @code{_FILE_OFFSET_BITS == 64} on a
-32-bit system this function is in fact @code{tmpfile64}, i.e. the LFS
+32-bit system this function is in fact @code{tmpfile64}, i.e., the LFS
interface transparently replaces the old interface.
@end deftypefun
@comment ISO
@deftypefn {Macro} size_t offsetof (@var{type}, @var{member})
This expands to a integer constant expression that is the offset of the
-structure member named @var{member} in a the structure type @var{type}.
+structure member named @var{member} in the structure type @var{type}.
For example, @code{offsetof (struct s, elem)} is the offset, in bytes,
of the member @code{elem} in a @code{struct s}.
to look for a system-dependent version of a file that's not in
@file{generic}. This means that any system-dependent source file must
have an analogue in @file{generic}, even if the routines defined by that
-file are not implemented on other platforms. Second. the @file{generic}
+file are not implemented on other platforms. Second, the @file{generic}
version of a system-dependent file is used if the makefiles do not find
a version specific to the system you're compiling for.
There are a lot of different ways systems organize memory, but in a
typical one, each process has one linear virtual address space, with
addresses running from zero to some huge maximum. It need not be
-contiguous; i.e. not all of these addresses actually can be used to
+contiguous; i.e., not all of these addresses actually can be used to
store data.
The virtual memory is divided into pages (4 kilobytes is typical).
@item int keepcost
This is the size of the top-most releasable chunk that normally
-borders the end of the heap (i.e. the high end of the virtual address
+borders the end of the heap (i.e., the high end of the virtual address
space's data segment).
@end table
@cindex paging
You can tell the system to associate a particular virtual memory page
-with a real page frame and keep it that way --- i.e. cause the page to
+with a real page frame and keep it that way --- i.e., cause the page to
be paged in if it isn't already and mark it so it will never be paged
out and consequently will never cause a page fault. This is called
@dfn{locking} a page.
paging rule is: If a frame backs at least one locked page, don't page it
out.
-Memory locks do not stack. I.e. you can't lock a particular page twice
+Memory locks do not stack. I.e., you can't lock a particular page twice
so that it has to be unlocked twice before it is truly unlocked. It is
either locked or it isn't.
Other programs help to manage development cycle when new messages appear
in the source files or when a new translation of the messages appear.
-here it should only be noted that using all the tools in GNU gettext it
-is possible to @emph{completely} automize the handling of message
+Here it should only be noted that using all the tools in GNU gettext it
+is possible to @emph{completely} automate the handling of message
catalog. Beside marking the translatable string in the source code and
generating the translations the developers do not have anything to do
themselves.
@cindex preemptive scheduling
When two processes are in contention to use the CPU at any instant, the
one with the higher absolute priority always gets it. This is true even if the
-process with the lower priority is already using the CPU (i.e. the
+process with the lower priority is already using the CPU (i.e., the
scheduling is preemptive). Of course, we're only talking about
processes that are running or ``ready to run,'' which means they are
ready to execute instructions right now. When a process blocks to wait
@item
The calling process does not have @code{CAP_SYS_NICE} permission and its
-owner is not the target process' owner. I.e. the effective uid of the
+owner is not the target process' owner. I.e., the effective uid of the
calling process is neither the effective nor the real uid of process
@var{pid}.
@c We need a cross reference to the capabilities section, when written.
@item EPERM
The call would set the nice value of a process which is owned by a different
-user than the calling process (i.e. the target process' real or effective
+user than the calling process (i.e., the target process' real or effective
uid does not match the calling process' effective uid) and the calling
process does not have @code{CAP_SYS_NICE} permission.
@comment sys/resource.h
@comment BSD
@item PRIO_USER
-All the processes owned by a particular user (i.e. whose real uid
+All the processes owned by a particular user (i.e., whose real uid
indicates the user). The argument @var{id} is a user ID (uid).
@end vtable
@item
The access to certain resources (RAM, I/O ports) has different costs
from different CPUs. This is the case in NUMA (Non-Uniform Memory
-Architecture) machines. Preferrably memory should be accessed locally
+Architecture) machines. Preferably memory should be accessed locally
but this requirement is usually not visible to the scheduler.
Therefore forcing a process or thread to the CPUs which have local
access to the mostly used memory helps to significantly boost the
dynamically. It must be initialized with zero before calling this
function.
-The return value is non-zero if the operation were successful. if the
-return value is zero something went wrong which probably means the
-programs runs out of memory.
+The return value is non-zero if the operation was successful. If the
+return value is zero, something went wrong, which probably means the
+programs ran out of memory.
@end deftypefun
@comment search.h
Note that you must not use @code{sigprocmask} in multi-threaded processes,
because each thread has its own signal mask and there is no single process
signal mask. According to POSIX, the behavior of @code{sigprocmask} in a
-multi-threaded process is ``unspeficied''.
+multi-threaded process is ``unspecified''.
Instead, use @code{pthread_sigmask}.
@ifset linuxthreads
@xref{Threads and Signal Handling}.
Don't confuse a program's exit status with a process' termination status.
There are lots of ways a process can terminate besides having it's program
finish. In the event that the process termination @emph{is} caused by program
-termination (i.e. @code{exit}), though, the program's exit status becomes
+termination (i.e., @code{exit}), though, the program's exit status becomes
part of the process' termination status.
@node Cleanups on Exit
@cindex multi-threaded application
Streams can be used in multi-threaded applications in the same way they
are used in single-threaded applications. But the programmer must be
-aware of a the possible complications. It is important to know about
+aware of the possible complications. It is important to know about
these also if the program one writes never use threads since the design
and implementation of many stream functions is heavily influenced by the
requirements added by multi-threaded programming.
The @samp{%g} and @samp{%G} conversions print the argument in the style
of @samp{%e} or @samp{%E} (respectively) if the exponent would be less
than -4 or greater than or equal to the precision; otherwise they use
-the @samp{%f} style. A precision of @code{0}, is taken as 1. is
+the @samp{%f} style. A precision of @code{0}, is taken as 1.
Trailing zeros are removed from the fractional portion of the result and
a decimal-point character appears only if it is followed by a digit.
@item MS_SYNCHRONOUS
This bit on specifies that all writes to the filesystem while it is
-mounted shall be synchronous; i.e. data shall be synced before each
+mounted shall be synchronous; i.e., data shall be synced before each
write completes rather than held in the buffer cache.
@item MS_MANDLOCK
Results are undefined if the priority code is anything else.
-If the process does not presently have a Syslog connection open (i.e.
+If the process does not presently have a Syslog connection open (i.e.,
it did not call @code{openlog}), @code{syslog} implicitly opens the
connection the same as @code{openlog} would, with the following defaults
for information that would otherwise be included in an @code{openlog}
arbitrary event. On the GNU system, that event is the creation of the
process. While arbitrary in general, the event is always the same event
for any particular process, so you can always measure how much time on
-the CPU a particular computation takes by examinining the process' CPU
+the CPU a particular computation takes by examining the process' CPU
time before and after the computation.
@cindex CPU time
@cindex clock ticks
@comment time.h
@comment SVID, XPG
@deftypefun int stime (time_t *@var{newtime})
-@code{stime} sets the system clock, i.e. it tells the system that the
+@code{stime} sets the system clock, i.e., it tells the system that the
current calendar time is @var{newtime}, where @code{newtime} is
interpreted as described in the above definition of @code{time_t}.
@node Low-Level Time String Parsing
@subsubsection Interpret string according to given format
-he first function is rather low-level. It is nevertheless frequently
+The first function is rather low-level. It is nevertheless frequently
used in software since it is better known. Its interface and
implementation are heavily influenced by the @code{getdate} function,
which is defined and implemented in terms of calls to @code{strptime}.
the format string the return value points right after the last consumed
input character. If the whole input string is consumed the return value
points to the @code{NULL} byte at the end of the string. If an error
-occurs, i.e. @code{strptime} fails to match all of the format string,
+occurs, i.e., @code{strptime} fails to match all of the format string,
the function returns @code{NULL}.
@end deftypefun