2004-12-13  Jakub Jelinek  <jakub@redhat.com>

	* posix/getconf.c (main): Prepend just $GETCONF_DIR/ instead of
	$GETCONF_DIR/_ to spec.
	* posix/confstr.c (confstr): Remove leading underscores for
	_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS.
This commit is contained in:
Ulrich Drepper 2004-12-13 21:29:18 +00:00
parent 410828e47a
commit 13d91a6eec
3 changed files with 24 additions and 17 deletions

View File

@ -1,3 +1,10 @@
2004-12-13 Jakub Jelinek <jakub@redhat.com>
* posix/getconf.c (main): Prepend just $GETCONF_DIR/ instead of
$GETCONF_DIR/_ to spec.
* posix/confstr.c (confstr): Remove leading underscores for
_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS.
2004-12-12 Ulrich Drepper <drepper@redhat.com> 2004-12-12 Ulrich Drepper <drepper@redhat.com>
* elf/dl-load.c (_dl_map_object_from_fd): Fix computation of * elf/dl-load.c (_dl_map_object_from_fd): Fix computation of

View File

@ -55,7 +55,7 @@ confstr (name, buf, len)
Currently this means all environment which the system allows. */ Currently this means all environment which the system allows. */
{ {
char restenvs[4 * sizeof "_POSIX_V6_LPBIG_OFFBIG"]; char restenvs[4 * sizeof "POSIX_V6_LPBIG_OFFBIG"];
string_len = 0; string_len = 0;
#ifndef _POSIX_V6_ILP32_OFF32 #ifndef _POSIX_V6_ILP32_OFF32
@ -63,9 +63,9 @@ confstr (name, buf, len)
#endif #endif
#if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0 #if !defined _POSIX_V6_ILP32_OFF32 || _POSIX_V6_ILP32_OFF32 > 0
{ {
memcpy (restenvs + string_len, "_POSIX_V6_ILP32_OFF32", memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFF32",
sizeof "_POSIX_V6_ILP32_OFF32" - 1); sizeof "POSIX_V6_ILP32_OFF32" - 1);
string_len += sizeof "_POSIX_V6_ILP32_OFF32" - 1; string_len += sizeof "POSIX_V6_ILP32_OFF32" - 1;
} }
#endif #endif
#ifndef _POSIX_V6_ILP32_OFFBIG #ifndef _POSIX_V6_ILP32_OFFBIG
@ -75,9 +75,9 @@ confstr (name, buf, len)
{ {
if (string_len) if (string_len)
restenvs[string_len++] = '\n'; restenvs[string_len++] = '\n';
memcpy (restenvs + string_len, "_POSIX_V6_ILP32_OFFBIG", memcpy (restenvs + string_len, "POSIX_V6_ILP32_OFFBIG",
sizeof "_POSIX_V6_ILP32_OFFBIG" - 1); sizeof "POSIX_V6_ILP32_OFFBIG" - 1);
string_len += sizeof "_POSIX_V6_ILP32_OFFBIG" - 1; string_len += sizeof "POSIX_V6_ILP32_OFFBIG" - 1;
} }
#endif #endif
#ifndef _POSIX_V6_LP64_OFF64 #ifndef _POSIX_V6_LP64_OFF64
@ -87,9 +87,9 @@ confstr (name, buf, len)
{ {
if (string_len) if (string_len)
restenvs[string_len++] = '\n'; restenvs[string_len++] = '\n';
memcpy (restenvs + string_len, "_POSIX_V6_LP64_OFF64", memcpy (restenvs + string_len, "POSIX_V6_LP64_OFF64",
sizeof "_POSIX_V6_LP64_OFF64" - 1); sizeof "POSIX_V6_LP64_OFF64" - 1);
string_len += sizeof "_POSIX_V6_LP64_OFF64" - 1; string_len += sizeof "POSIX_V6_LP64_OFF64" - 1;
} }
#endif #endif
#ifndef _POSIX_V6_LPBIG_OFFBIG #ifndef _POSIX_V6_LPBIG_OFFBIG
@ -99,9 +99,9 @@ confstr (name, buf, len)
{ {
if (string_len) if (string_len)
restenvs[string_len++] = '\n'; restenvs[string_len++] = '\n';
memcpy (restenvs + string_len, "_POSIX_V6_LPBIG_OFFBIG", memcpy (restenvs + string_len, "POSIX_V6_LPBIG_OFFBIG",
sizeof "_POSIX_V6_LPBIG_OFFBIG" - 1); sizeof "POSIX_V6_LPBIG_OFFBIG" - 1);
string_len += sizeof "_POSIX_V6_LPBIG_OFFBIG" - 1; string_len += sizeof "POSIX_V6_LPBIG_OFFBIG" - 1;
} }
#endif #endif
restenvs[string_len++] = '\0'; restenvs[string_len++] = '\0';

View File

@ -997,7 +997,7 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
{ {
char default_name[getconf_dirlen + sizeof "/default"]; char default_name[getconf_dirlen + sizeof "/default"];
memcpy (mempcpy (default_name, getconf_dir, getconf_dirlen), memcpy (mempcpy (default_name, getconf_dir, getconf_dirlen),
"/default", sizeof "/default"); "/default", sizeof "/default");
int len = readlink (default_name, buf, sizeof buf - 1); int len = readlink (default_name, buf, sizeof buf - 1);
if (len > 0) if (len > 0)
{ {
@ -1034,10 +1034,10 @@ warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
{ {
const char *args[argc + 3]; const char *args[argc + 3];
size_t spec_len = strlen (spec); size_t spec_len = strlen (spec);
char getconf_name[getconf_dirlen + 2 + spec_len + 1]; char getconf_name[getconf_dirlen + 1 + spec_len + 1];
memcpy (mempcpy (mempcpy (getconf_name, getconf_dir, memcpy (mempcpy (mempcpy (getconf_name, getconf_dir,
getconf_dirlen), getconf_dirlen),
"/_", 2), spec, spec_len + 1); "/", 1), spec, spec_len + 1);
args[0] = argv0; args[0] = argv0;
args[1] = "-v"; args[1] = "-v";
args[2] = spec; args[2] = spec;