mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
Update.
1998-02-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-load.c (add_name_to_object): Don't translate strings. * elf/dl-minimal.c (_strerror_internal): Define it here to avoid pulling in the whole error list. (__dcgettext, dcgettext): Removed. * libc.map: Export _strerror_internal. 1998-02-18 10:50 Ulrich Drepper <drepper@cygnus.com> * sysdeps/i386/fpu/t_exp.c: New file. 1998-02-18 Andreas Jaeger <aj@arthur.rhein-neckar.de> * nis/libnss_nisplus.map: NIS+ support is new in glibc 2.1, add everything with version GLIBC_2.1. * hesiod/libnss_hesiod.map: Likewise. 1998-02-18 Andreas Jaeger <aj@arthur.rhein-neckar.de> * manual/arith.texi (Old-style number conversion): This node is a section, not a subsection. 1998-02-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/dl-lookup.c (make_string): Use __stpcpy instead of stpcpy. 1998-02-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/rtld.c (dl_main): Make sure that the library search paths have been initialized before the first call to _dl_map_object. 1998-02-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makerules (common-generated): Add libc_pic.os. 1998-02-17 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/rtld.c (dl_main): Use PT_PHDR to figure out the load address of the executable. 1998-02-18 10:28 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include <string.h>
|
||||
#include <link.h>
|
||||
#include <stdio-common/_itoa.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Minimal `malloc' allocator for use while loading shared libraries.
|
||||
Only small blocks are allocated, and none are ever freed. */
|
||||
@@ -123,15 +124,47 @@ longjmp (jmp_buf env, int val)
|
||||
__longjmp (env[0].__jmpbuf, val);
|
||||
}
|
||||
|
||||
/* Define our own stub for the localization function used by strerror.
|
||||
English-only in the dynamic linker keeps it smaller. */
|
||||
/* Define our own version of the internal function used by strerror. We
|
||||
only provide the messages for some common errors. This avoids pulling
|
||||
in the whole error list. */
|
||||
|
||||
char * weak_function
|
||||
__dcgettext (const char *domainname, const char *msgid, int category)
|
||||
_strerror_internal (int errnum, char *buf, size_t buflen)
|
||||
{
|
||||
return (char *) msgid;
|
||||
char *msg;
|
||||
|
||||
switch (errnum)
|
||||
{
|
||||
case ENOMEM:
|
||||
msg = (char *) "Cannot allocate memory";
|
||||
break;
|
||||
case EINVAL:
|
||||
msg = (char *) "Invalid argument";
|
||||
break;
|
||||
case ENOENT:
|
||||
msg = (char *) "No such file or directory";
|
||||
break;
|
||||
case EPERM:
|
||||
msg = (char *) "Operation not permitted";
|
||||
break;
|
||||
case EIO:
|
||||
msg = (char *) "Input/output error";
|
||||
break;
|
||||
case EACCES:
|
||||
msg = (char *) "Permission denied";
|
||||
break;
|
||||
default:
|
||||
/* No need to check buffer size, all calls in the dynamic linker
|
||||
provide enough space. */
|
||||
buf[buflen - 1] = '\0';
|
||||
msg = _itoa_word (errnum, buf + buflen - 1, 10, 0);
|
||||
msg = memcpy (msg - (sizeof ("Error ") - 1), "Error ",
|
||||
sizeof ("Error ") - 1);
|
||||
break;
|
||||
}
|
||||
|
||||
return msg;
|
||||
}
|
||||
weak_alias (__dcgettext, dcgettext)
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
||||
|
||||
Reference in New Issue
Block a user