mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-10 05:03:06 +03:00
Update.
* locale/loadlocale.c (_nl_load_locale): Optimize a bit. Pretty print. Add checks for _POSIX_MMAPPED_FILES where necessary. (_nl_unload_locale): If locale data was mmapped use munmap. 2000-01-29 Andreas Jaeger <aj@suse.de> * sysdeps/unix/sysv/linux/i386/sys/io.h: Add missing ints, use _EXTERN_INLINE, compile inline assembler functions only with gcc. 2000-01-29 Ulrich Drepper <drepper@redhat.com> * catgets/catgets.c (catopen): Handle NL_CAT_LOCALE correctly. * catgets/gencat.c (read_input_file): Remove messages correctly. * catgets/open_catalog.c (__open_catalog): Handle trailing colons and adjacent colons correctly. Correct loops to read territory and and codeset part. Patches by Geoff Clare <gwc@unisoft.com> (PR libc/1559). * rt/aio_misc.c (get_elem): Assign pointer to new row to correct pool entry. Patch by Jens Moeller <jens.moeller@waii.com> (PR libc/1558). 2000-01-28 Jakub Jelinek <jakub@redhat.com> * sysdeps/unix/sysv/linux/arm/Versions: Export the new *rlimit interface with symbol version GLIBC_2.2. * sysdeps/unix/sysv/linux/i386/Versions: Likewise. * sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise. * sysdeps/unix/sysv/linux/i386/getrlimit64.c: Likewise. * sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise. 2000-01-27 Scott Bambrough <scottb@netwinder.org> * sysdeps/unix/sysv/linux/arm/Makefile: Backout rlimit changes for resource directory. * sysdeps/unix/sysv/linux/arm/syscalls.list: Backout changes for versioning setrlimit and getrlimit. 2000-01-27 Andreas Jaeger <aj@suse.de> * sysdeps/powerpc/fpu/libm-ulps: Renamed to ... * sysdeps/powerpc/fpu/libm-test-ulps: ...this. 2000-01-27 Ruediger Oertel <ro@suse.de> * sysdeps/unix/sysv/linux/i386/sys/io.h: Change "::" to ": :" for g++. 2000-01-29 Ulrich Drepper <drepper@redhat.com>
This commit is contained in:
49
ChangeLog
49
ChangeLog
@@ -1,3 +1,52 @@
|
|||||||
|
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* locale/loadlocale.c (_nl_load_locale): Optimize a bit. Pretty
|
||||||
|
print. Add checks for _POSIX_MMAPPED_FILES where necessary.
|
||||||
|
(_nl_unload_locale): If locale data was mmapped use munmap.
|
||||||
|
|
||||||
|
2000-01-29 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/sys/io.h: Add missing ints, use
|
||||||
|
_EXTERN_INLINE, compile inline assembler functions only with gcc.
|
||||||
|
|
||||||
|
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* catgets/catgets.c (catopen): Handle NL_CAT_LOCALE correctly.
|
||||||
|
* catgets/gencat.c (read_input_file): Remove messages correctly.
|
||||||
|
* catgets/open_catalog.c (__open_catalog): Handle trailing colons and
|
||||||
|
adjacent colons correctly. Correct loops to read territory and
|
||||||
|
and codeset part.
|
||||||
|
Patches by Geoff Clare <gwc@unisoft.com> (PR libc/1559).
|
||||||
|
|
||||||
|
* rt/aio_misc.c (get_elem): Assign pointer to new row to correct
|
||||||
|
pool entry.
|
||||||
|
Patch by Jens Moeller <jens.moeller@waii.com> (PR libc/1558).
|
||||||
|
|
||||||
|
2000-01-28 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/arm/Versions: Export the new *rlimit
|
||||||
|
interface with symbol version GLIBC_2.2.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/Versions: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/getrlimit.c: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/getrlimit64.c: Likewise.
|
||||||
|
* sysdeps/unix/sysv/linux/i386/setrlimit.c: Likewise.
|
||||||
|
|
||||||
|
2000-01-27 Scott Bambrough <scottb@netwinder.org>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/arm/Makefile: Backout rlimit changes for
|
||||||
|
resource directory.
|
||||||
|
* sysdeps/unix/sysv/linux/arm/syscalls.list: Backout changes for
|
||||||
|
versioning setrlimit and getrlimit.
|
||||||
|
|
||||||
|
2000-01-27 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/powerpc/fpu/libm-ulps: Renamed to ...
|
||||||
|
* sysdeps/powerpc/fpu/libm-test-ulps: ...this.
|
||||||
|
|
||||||
|
2000-01-27 Ruediger Oertel <ro@suse.de>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/i386/sys/io.h: Change "::" to ": :" for g++.
|
||||||
|
|
||||||
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* locale/programs/ld-numeric.c (numeric_output): Increment cnt in
|
* locale/programs/ld-numeric.c (numeric_output): Increment cnt in
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper, <drepper@gnu.org>.
|
Contributed by Ulrich Drepper, <drepper@gnu.org>.
|
||||||
|
|
||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include <alloca.h>
|
#include <alloca.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <locale.h>
|
||||||
#include <nl_types.h>
|
#include <nl_types.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -43,20 +44,15 @@ catopen (const char *cat_name, int flag)
|
|||||||
if (strchr (cat_name, '/') == NULL)
|
if (strchr (cat_name, '/') == NULL)
|
||||||
{
|
{
|
||||||
if (flag == NL_CAT_LOCALE)
|
if (flag == NL_CAT_LOCALE)
|
||||||
{
|
/* Use the current locale setting for LC_MESSAGES. */
|
||||||
env_var = getenv ("LC_ALL");
|
env_var = setlocale (LC_MESSAGES, NULL);
|
||||||
if (env_var == NULL)
|
else
|
||||||
env_var = getenv ("LC_MESSAGES");
|
/* Use the LANG environment variable. */
|
||||||
|
env_var = getenv ("LANG");
|
||||||
|
|
||||||
if (env_var != NULL)
|
|
||||||
goto have_env_var;
|
|
||||||
}
|
|
||||||
|
|
||||||
env_var = getenv ("LANG");
|
|
||||||
if (env_var == NULL)
|
if (env_var == NULL)
|
||||||
env_var = "C";
|
env_var = "C";
|
||||||
|
|
||||||
have_env_var:
|
|
||||||
env_var_len = strlen (env_var) + 1;
|
env_var_len = strlen (env_var) + 1;
|
||||||
|
|
||||||
nlspath = __secure_getenv ("NLSPATH");
|
nlspath = __secure_getenv ("NLSPATH");
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
|
Contributed by Ulrich Drepper <drepper@redhat.com>, 1996.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
modify it under the terms of the GNU Library General Public License as
|
modify it under the terms of the GNU Library General Public License as
|
||||||
@@ -32,6 +32,7 @@
|
|||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#include <nl_types.h>
|
#include <nl_types.h>
|
||||||
#include <obstack.h>
|
#include <obstack.h>
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@@ -237,7 +238,7 @@ print_version (FILE *stream, struct argp_state *state)
|
|||||||
Copyright (C) %s Free Software Foundation, Inc.\n\
|
Copyright (C) %s Free Software Foundation, Inc.\n\
|
||||||
This is free software; see the source for copying conditions. There is NO\n\
|
This is free software; see the source for copying conditions. There is NO\n\
|
||||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
|
||||||
"), "1999");
|
"), "2000");
|
||||||
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
|
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,13 +493,12 @@ this is the first definition"));
|
|||||||
{
|
{
|
||||||
const char *ident = this_line;
|
const char *ident = this_line;
|
||||||
int message_number;
|
int message_number;
|
||||||
int any_space;
|
|
||||||
|
|
||||||
do
|
do
|
||||||
++this_line;
|
++this_line;
|
||||||
while (this_line[0] != '\0' && !isspace (this_line[0]));
|
while (this_line[0] != '\0' && !isspace (this_line[0]));
|
||||||
any_space = isspace (*this_line);
|
if (this_line[0] != '\0')
|
||||||
*this_line++ = '\0'; /* Terminate the identifier. */
|
*this_line++ = '\0'; /* Terminate the identifier. */
|
||||||
|
|
||||||
/* Now we found the beginning of the message itself. */
|
/* Now we found the beginning of the message itself. */
|
||||||
|
|
||||||
@@ -522,24 +522,12 @@ this is the first definition"));
|
|||||||
}
|
}
|
||||||
if (runp != NULL)
|
if (runp != NULL)
|
||||||
{
|
{
|
||||||
if (any_space)
|
/* Oh, oh. There is already a message with this
|
||||||
{
|
number in the message set. */
|
||||||
/* Oh, oh. There is already a message with this
|
error_at_line (0, 0, fname, start_line,
|
||||||
number in the message set. */
|
gettext ("duplicated message number"));
|
||||||
error_at_line (0, 0, fname, start_line,
|
error_at_line (0, 0, runp->fname, runp->line,
|
||||||
gettext ("duplicated message number"));
|
gettext ("this is the first definition"));
|
||||||
error_at_line (0, 0, runp->fname, runp->line,
|
|
||||||
gettext ("this is the first definition"));
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* We have to remove this message. */
|
|
||||||
if (lastp != NULL)
|
|
||||||
lastp->next = runp->next;
|
|
||||||
else
|
|
||||||
current->current_set->messages = runp->next;
|
|
||||||
free (runp);
|
|
||||||
}
|
|
||||||
message_number = 0;
|
message_number = 0;
|
||||||
}
|
}
|
||||||
ident = NULL; /* We don't have a symbol. */
|
ident = NULL; /* We don't have a symbol. */
|
||||||
@@ -564,24 +552,11 @@ this is the first definition"));
|
|||||||
runp = runp->next;
|
runp = runp->next;
|
||||||
if (runp != NULL)
|
if (runp != NULL)
|
||||||
{
|
{
|
||||||
if (any_space)
|
/* The name is already used. */
|
||||||
{
|
error_at_line (0, 0, fname, start_line, gettext ("\
|
||||||
/* The name is already used. */
|
|
||||||
error_at_line (0, 0, fname, start_line,
|
|
||||||
gettext ("\
|
|
||||||
duplicated message identifier"));
|
duplicated message identifier"));
|
||||||
error_at_line (0, 0, runp->fname, runp->line,
|
error_at_line (0, 0, runp->fname, runp->line,
|
||||||
gettext ("this is the first definition"));
|
gettext ("this is the first definition"));
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
/* We have to remove this message. */
|
|
||||||
if (lastp != NULL)
|
|
||||||
lastp->next = runp->next;
|
|
||||||
else
|
|
||||||
current->current_set->messages = runp->next;
|
|
||||||
free (runp);
|
|
||||||
}
|
|
||||||
message_number = 0;
|
message_number = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -673,7 +648,7 @@ write_out (struct catalog *catalog, const char *output_name,
|
|||||||
struct obstack string_pool;
|
struct obstack string_pool;
|
||||||
const char *strings;
|
const char *strings;
|
||||||
size_t strings_size;
|
size_t strings_size;
|
||||||
u_int32_t *array1, *array2;
|
uint32_t *array1, *array2;
|
||||||
size_t cnt;
|
size_t cnt;
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
@@ -751,10 +726,10 @@ write_out (struct catalog *catalog, const char *output_name,
|
|||||||
|
|
||||||
/* Allocate room for all needed arrays. */
|
/* Allocate room for all needed arrays. */
|
||||||
array1 =
|
array1 =
|
||||||
(u_int32_t *) alloca (best_size * best_depth * sizeof (u_int32_t) * 3);
|
(uint32_t *) alloca (best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
memset (array1, '\0', best_size * best_depth * sizeof (u_int32_t) * 3);
|
memset (array1, '\0', best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
array2
|
array2
|
||||||
= (u_int32_t *) alloca (best_size * best_depth * sizeof (u_int32_t) * 3);
|
= (uint32_t *) alloca (best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
obstack_init (&string_pool);
|
obstack_init (&string_pool);
|
||||||
|
|
||||||
set_run = catalog->all_sets;
|
set_run = catalog->all_sets;
|
||||||
@@ -812,11 +787,11 @@ write_out (struct catalog *catalog, const char *output_name,
|
|||||||
/* We always write out the little endian version of the index
|
/* We always write out the little endian version of the index
|
||||||
arrays. */
|
arrays. */
|
||||||
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||||
write (fd, array1, best_size * best_depth * sizeof (u_int32_t) * 3);
|
write (fd, array1, best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
write (fd, array2, best_size * best_depth * sizeof (u_int32_t) * 3);
|
write (fd, array2, best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
#elif __BYTE_ORDER == __BIG_ENDIAN
|
#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||||
write (fd, array2, best_size * best_depth * sizeof (u_int32_t) * 3);
|
write (fd, array2, best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
write (fd, array1, best_size * best_depth * sizeof (u_int32_t) * 3);
|
write (fd, array1, best_size * best_depth * sizeof (uint32_t) * 3);
|
||||||
#else
|
#else
|
||||||
# error Cannot handle __BYTE_ORDER byte order
|
# error Cannot handle __BYTE_ORDER byte order
|
||||||
#endif
|
#endif
|
||||||
@@ -1034,7 +1009,8 @@ read_old (struct catalog *catalog, const char *file_name)
|
|||||||
|
|
||||||
/* OK, we have the catalog loaded. Now read all messages and merge
|
/* OK, we have the catalog loaded. Now read all messages and merge
|
||||||
them. When set and message number clash for any message the new
|
them. When set and message number clash for any message the new
|
||||||
one is used. */
|
one is used. If the new one is empty it indicates that the
|
||||||
|
message should be deleted. */
|
||||||
for (cnt = 0; cnt < old_cat_obj.plane_size * old_cat_obj.plane_depth; ++cnt)
|
for (cnt = 0; cnt < old_cat_obj.plane_size * old_cat_obj.plane_depth; ++cnt)
|
||||||
{
|
{
|
||||||
struct message_list *message, *last;
|
struct message_list *message, *last;
|
||||||
@@ -1043,7 +1019,7 @@ read_old (struct catalog *catalog, const char *file_name)
|
|||||||
/* No message in this slot. */
|
/* No message in this slot. */
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (old_cat_obj.name_ptr[cnt * 3 + 0] - 1 != (u_int32_t) last_set)
|
if (old_cat_obj.name_ptr[cnt * 3 + 0] - 1 != (uint32_t) last_set)
|
||||||
{
|
{
|
||||||
last_set = old_cat_obj.name_ptr[cnt * 3 + 0] - 1;
|
last_set = old_cat_obj.name_ptr[cnt * 3 + 0] - 1;
|
||||||
set = find_set (catalog, old_cat_obj.name_ptr[cnt * 3 + 0] - 1);
|
set = find_set (catalog, old_cat_obj.name_ptr[cnt * 3 + 0] - 1);
|
||||||
@@ -1053,14 +1029,14 @@ read_old (struct catalog *catalog, const char *file_name)
|
|||||||
message = set->messages;
|
message = set->messages;
|
||||||
while (message != NULL)
|
while (message != NULL)
|
||||||
{
|
{
|
||||||
if ((u_int32_t) message->number >= old_cat_obj.name_ptr[cnt * 3 + 1])
|
if ((uint32_t) message->number >= old_cat_obj.name_ptr[cnt * 3 + 1])
|
||||||
break;
|
break;
|
||||||
last = message;
|
last = message;
|
||||||
message = message->next;
|
message = message->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message == NULL
|
if (message == NULL
|
||||||
|| (u_int32_t) message->number > old_cat_obj.name_ptr[cnt * 3 + 1])
|
|| (uint32_t) message->number > old_cat_obj.name_ptr[cnt * 3 + 1])
|
||||||
{
|
{
|
||||||
/* We have found a message which is not yet in the catalog.
|
/* We have found a message which is not yet in the catalog.
|
||||||
Insert it at the right position. */
|
Insert it at the right position. */
|
||||||
@@ -1082,5 +1058,14 @@ read_old (struct catalog *catalog, const char *file_name)
|
|||||||
|
|
||||||
++catalog->total_messages;
|
++catalog->total_messages;
|
||||||
}
|
}
|
||||||
|
else if (*message->message == '\0')
|
||||||
|
{
|
||||||
|
/* The new empty message has overridden the old one thus
|
||||||
|
"deleting" it as required. Now remove the empty remains. */
|
||||||
|
if (last == NULL)
|
||||||
|
set->messages = message->next;
|
||||||
|
else
|
||||||
|
last->next = message->next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
/* Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper, <drepper@gnu.org>.
|
Contributed by Ulrich Drepper, <drepper@gnu.org>.
|
||||||
|
|
||||||
@@ -84,89 +84,100 @@ __open_catalog (__nl_catd catalog)
|
|||||||
while (*run_nlspath != '\0')
|
while (*run_nlspath != '\0')
|
||||||
{
|
{
|
||||||
bufact = 0;
|
bufact = 0;
|
||||||
while (*run_nlspath != ':' && *run_nlspath != '\0')
|
|
||||||
if (*run_nlspath == '%')
|
|
||||||
{
|
|
||||||
const char *tmp;
|
|
||||||
|
|
||||||
++run_nlspath; /* We have seen the `%'. */
|
if (*run_nlspath == ':')
|
||||||
switch (*run_nlspath++)
|
{
|
||||||
{
|
/* Leading colon or adjacent colons - treat same as %N. */
|
||||||
case 'N':
|
len = strlen (catalog->cat_name);
|
||||||
/* Use the catalog name. */
|
ENOUGH (len);
|
||||||
len = strlen (catalog->cat_name);
|
memcpy (&buf[bufact], catalog->cat_name, len);
|
||||||
ENOUGH (len);
|
bufact += len;
|
||||||
memcpy (&buf[bufact], catalog->cat_name, len);
|
}
|
||||||
bufact += len;
|
else
|
||||||
break;
|
while (*run_nlspath != ':' && *run_nlspath != '\0')
|
||||||
case 'L':
|
if (*run_nlspath == '%')
|
||||||
/* Use the current locale category value. */
|
{
|
||||||
len = strlen (catalog->env_var);
|
const char *tmp;
|
||||||
ENOUGH (len);
|
|
||||||
memcpy (&buf[bufact], catalog->env_var, len);
|
++run_nlspath; /* We have seen the `%'. */
|
||||||
bufact += len;
|
switch (*run_nlspath++)
|
||||||
break;
|
{
|
||||||
case 'l':
|
case 'N':
|
||||||
/* Use language element of locale category value. */
|
/* Use the catalog name. */
|
||||||
tmp = catalog->env_var;
|
len = strlen (catalog->cat_name);
|
||||||
do
|
ENOUGH (len);
|
||||||
{
|
memcpy (&buf[bufact], catalog->cat_name, len);
|
||||||
ENOUGH (1);
|
bufact += len;
|
||||||
buf[bufact++] = *tmp++;
|
break;
|
||||||
}
|
case 'L':
|
||||||
while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
|
/* Use the current locale category value. */
|
||||||
break;
|
len = strlen (catalog->env_var);
|
||||||
case 't':
|
ENOUGH (len);
|
||||||
/* Use territory element of locale category value. */
|
memcpy (&buf[bufact], catalog->env_var, len);
|
||||||
tmp = catalog->env_var;
|
bufact += len;
|
||||||
do
|
break;
|
||||||
++tmp;
|
case 'l':
|
||||||
while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
|
/* Use language element of locale category value. */
|
||||||
if (*tmp == '_')
|
tmp = catalog->env_var;
|
||||||
{
|
do
|
||||||
|
{
|
||||||
|
ENOUGH (1);
|
||||||
|
buf[bufact++] = *tmp++;
|
||||||
|
}
|
||||||
|
while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
|
||||||
|
break;
|
||||||
|
case 't':
|
||||||
|
/* Use territory element of locale category value. */
|
||||||
|
tmp = catalog->env_var;
|
||||||
|
do
|
||||||
++tmp;
|
++tmp;
|
||||||
do
|
while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
|
||||||
{
|
if (*tmp == '_')
|
||||||
ENOUGH (1);
|
{
|
||||||
buf[bufact++] = *tmp;
|
++tmp;
|
||||||
}
|
do
|
||||||
while (*tmp != '\0' && *tmp != '.');
|
{
|
||||||
}
|
ENOUGH (1);
|
||||||
break;
|
buf[bufact++] = *tmp++;
|
||||||
case 'c':
|
}
|
||||||
/* Use code set element of locale category value. */
|
while (*tmp != '\0' && *tmp != '.');
|
||||||
tmp = catalog->env_var;
|
}
|
||||||
do
|
break;
|
||||||
++tmp;
|
case 'c':
|
||||||
while (*tmp != '\0' && *tmp != '.');
|
/* Use code set element of locale category value. */
|
||||||
if (*tmp == '.')
|
tmp = catalog->env_var;
|
||||||
{
|
do
|
||||||
++tmp;
|
++tmp;
|
||||||
do
|
while (*tmp != '\0' && *tmp != '.');
|
||||||
{
|
if (*tmp == '.')
|
||||||
ENOUGH (1);
|
{
|
||||||
buf[bufact++] = *tmp;
|
++tmp;
|
||||||
}
|
do
|
||||||
while (*tmp != '\0');
|
{
|
||||||
}
|
ENOUGH (1);
|
||||||
break;
|
buf[bufact++] = *tmp++;
|
||||||
case '%':
|
}
|
||||||
ENOUGH (1);
|
while (*tmp != '\0');
|
||||||
buf[bufact++] = '%';
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
case '%':
|
||||||
/* Unknown variable: ignore this path element. */
|
ENOUGH (1);
|
||||||
bufact = 0;
|
buf[bufact++] = '%';
|
||||||
while (*run_nlspath != '\0' && *run_nlspath != ':')
|
break;
|
||||||
++run_nlspath;
|
default:
|
||||||
break;
|
/* Unknown variable: ignore this path element. */
|
||||||
}
|
bufact = 0;
|
||||||
}
|
while (*run_nlspath != '\0' && *run_nlspath != ':')
|
||||||
else
|
++run_nlspath;
|
||||||
{
|
break;
|
||||||
ENOUGH (1);
|
}
|
||||||
buf[bufact++] = *run_nlspath++;
|
}
|
||||||
}
|
else
|
||||||
|
{
|
||||||
|
ENOUGH (1);
|
||||||
|
buf[bufact++] = *run_nlspath++;
|
||||||
|
}
|
||||||
|
|
||||||
ENOUGH (1);
|
ENOUGH (1);
|
||||||
buf[bufact] = '\0';
|
buf[bufact] = '\0';
|
||||||
|
|
||||||
|
@@ -1,3 +1,11 @@
|
|||||||
|
2000-01-29 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* condvar.c (pthread_cond_timedwait_relative_old): Get remaining time
|
||||||
|
from nanosleep call so that in case we restart we only wait for the
|
||||||
|
remaining time.
|
||||||
|
(pthread_cond_timedwait_relative_new): Likewise.
|
||||||
|
Patch by khendricks@ivey.uwo.ca (PR libc/1561).
|
||||||
|
|
||||||
2000-01-18 Ulrich Drepper <drepper@cygnus.com>
|
2000-01-18 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* manager.c (pthread_allocate_stack): Compute guard page address
|
* manager.c (pthread_allocate_stack): Compute guard page address
|
||||||
|
@@ -26,13 +26,13 @@
|
|||||||
#include "restart.h"
|
#include "restart.h"
|
||||||
|
|
||||||
static int pthread_cond_timedwait_relative_old(pthread_cond_t *,
|
static int pthread_cond_timedwait_relative_old(pthread_cond_t *,
|
||||||
pthread_mutex_t *, const struct timespec *);
|
pthread_mutex_t *, struct timespec *);
|
||||||
|
|
||||||
static int pthread_cond_timedwait_relative_new(pthread_cond_t *,
|
static int pthread_cond_timedwait_relative_new(pthread_cond_t *,
|
||||||
pthread_mutex_t *, const struct timespec *);
|
pthread_mutex_t *, struct timespec *);
|
||||||
|
|
||||||
static int (*pthread_cond_tw_rel)(pthread_cond_t *, pthread_mutex_t *,
|
static int (*pthread_cond_tw_rel)(pthread_cond_t *, pthread_mutex_t *,
|
||||||
const struct timespec *) = pthread_cond_timedwait_relative_old;
|
struct timespec *) = pthread_cond_timedwait_relative_old;
|
||||||
|
|
||||||
/* initialize this module */
|
/* initialize this module */
|
||||||
void __pthread_init_condvar(int rt_sig_available)
|
void __pthread_init_condvar(int rt_sig_available)
|
||||||
@@ -130,7 +130,7 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
|
|||||||
static int
|
static int
|
||||||
pthread_cond_timedwait_relative_old(pthread_cond_t *cond,
|
pthread_cond_timedwait_relative_old(pthread_cond_t *cond,
|
||||||
pthread_mutex_t *mutex,
|
pthread_mutex_t *mutex,
|
||||||
const struct timespec * reltime)
|
struct timespec * reltime)
|
||||||
{
|
{
|
||||||
volatile pthread_descr self = thread_self();
|
volatile pthread_descr self = thread_self();
|
||||||
sigset_t unblock, initial_mask;
|
sigset_t unblock, initial_mask;
|
||||||
@@ -179,7 +179,7 @@ requeue_and_wait_again:
|
|||||||
sigaddset(&unblock, __pthread_sig_restart);
|
sigaddset(&unblock, __pthread_sig_restart);
|
||||||
sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
|
sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
|
||||||
/* Sleep for the required duration */
|
/* Sleep for the required duration */
|
||||||
retsleep = __libc_nanosleep(reltime, NULL);
|
retsleep = __libc_nanosleep(reltime, reltime);
|
||||||
/* Block the restart signal again */
|
/* Block the restart signal again */
|
||||||
sigprocmask(SIG_SETMASK, &initial_mask, NULL);
|
sigprocmask(SIG_SETMASK, &initial_mask, NULL);
|
||||||
was_signalled = 0;
|
was_signalled = 0;
|
||||||
@@ -219,8 +219,8 @@ requeue_and_wait_again:
|
|||||||
|
|
||||||
if (retsleep == 0)
|
if (retsleep == 0)
|
||||||
return ETIMEDOUT;
|
return ETIMEDOUT;
|
||||||
/* Woken by a signal: resume waiting as
|
/* Woken by a signal: resume waiting as required by Single Unix
|
||||||
required by Single Unix Specification. */
|
Specification. */
|
||||||
goto requeue_and_wait_again;
|
goto requeue_and_wait_again;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,7 +250,7 @@ requeue_and_wait_again:
|
|||||||
static int
|
static int
|
||||||
pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
|
pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
|
||||||
pthread_mutex_t *mutex,
|
pthread_mutex_t *mutex,
|
||||||
const struct timespec * reltime)
|
struct timespec * reltime)
|
||||||
{
|
{
|
||||||
volatile pthread_descr self = thread_self();
|
volatile pthread_descr self = thread_self();
|
||||||
sigset_t unblock, initial_mask;
|
sigset_t unblock, initial_mask;
|
||||||
@@ -298,7 +298,7 @@ pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
|
|||||||
sigaddset(&unblock, __pthread_sig_restart);
|
sigaddset(&unblock, __pthread_sig_restart);
|
||||||
sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
|
sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
|
||||||
/* Sleep for the required duration */
|
/* Sleep for the required duration */
|
||||||
retsleep = __libc_nanosleep(reltime, NULL);
|
retsleep = __libc_nanosleep(reltime, reltime);
|
||||||
/* Block the restart signal again */
|
/* Block the restart signal again */
|
||||||
sigprocmask(SIG_SETMASK, &initial_mask, NULL);
|
sigprocmask(SIG_SETMASK, &initial_mask, NULL);
|
||||||
was_signalled = 0;
|
was_signalled = 0;
|
||||||
@@ -335,8 +335,8 @@ pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
|
|||||||
|
|
||||||
if (retsleep == 0)
|
if (retsleep == 0)
|
||||||
return ETIMEDOUT;
|
return ETIMEDOUT;
|
||||||
/* Woken by a signal: resume waiting as
|
/* Woken by a signal: resume waiting as required by Single Unix
|
||||||
required by Single Unix Specification. */
|
Specification. */
|
||||||
goto requeue_and_wait_again;
|
goto requeue_and_wait_again;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/* Functions to read locale data files.
|
/* Functions to read locale data files.
|
||||||
Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
|
Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
@@ -23,7 +23,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/mman.h>
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
|
# include <sys/mman.h>
|
||||||
|
#endif
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#include "localeinfo.h"
|
#include "localeinfo.h"
|
||||||
@@ -87,13 +89,17 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
|||||||
/* LOCALE/LC_foo is a directory; open LOCALE/LC_foo/SYS_LC_foo
|
/* LOCALE/LC_foo is a directory; open LOCALE/LC_foo/SYS_LC_foo
|
||||||
instead. */
|
instead. */
|
||||||
char *newp;
|
char *newp;
|
||||||
|
size_t filenamelen;
|
||||||
|
|
||||||
__close (fd);
|
__close (fd);
|
||||||
|
|
||||||
newp = (char *) alloca (strlen (file->filename)
|
filenamelen = strlen (file->filename);
|
||||||
|
newp = (char *) alloca (filenamelen
|
||||||
+ 5 + _nl_category_name_sizes[category] + 1);
|
+ 5 + _nl_category_name_sizes[category] + 1);
|
||||||
__stpcpy (__stpcpy (__stpcpy (newp, file->filename), "/SYS_"),
|
__mempcpy (__mempcpy (__mempcpy (newp, file->filename, filenamelen),
|
||||||
_nl_category_names[category]);
|
"/SYS_", 5),
|
||||||
|
_nl_category_names[category],
|
||||||
|
_nl_category_name_sizes[category] + 1);
|
||||||
|
|
||||||
fd = __open (newp, O_RDONLY);
|
fd = __open (newp, O_RDONLY);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
@@ -105,24 +111,32 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
|||||||
|
|
||||||
/* Map in the file's data. */
|
/* Map in the file's data. */
|
||||||
save_err = errno;
|
save_err = errno;
|
||||||
#ifndef MAP_COPY
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
|
# ifndef MAP_COPY
|
||||||
/* Linux seems to lack read-only copy-on-write. */
|
/* Linux seems to lack read-only copy-on-write. */
|
||||||
#define MAP_COPY MAP_PRIVATE
|
# define MAP_COPY MAP_PRIVATE
|
||||||
#endif
|
# endif
|
||||||
#ifndef MAP_FILE
|
# ifndef MAP_FILE
|
||||||
/* Some systems do not have this flag; it is superfluous. */
|
/* Some systems do not have this flag; it is superfluous. */
|
||||||
#define MAP_FILE 0
|
# define MAP_FILE 0
|
||||||
#endif
|
# endif
|
||||||
#ifndef MAP_INHERIT
|
# ifndef MAP_INHERIT
|
||||||
/* Some systems might lack this; they lose. */
|
/* Some systems might lack this; they lose. */
|
||||||
#define MAP_INHERIT 0
|
# define MAP_INHERIT 0
|
||||||
#endif
|
# endif
|
||||||
filedata = (void *) __mmap ((caddr_t) 0, st.st_size, PROT_READ,
|
filedata = (void *) __mmap ((caddr_t) 0, st.st_size, PROT_READ,
|
||||||
MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
|
MAP_FILE|MAP_COPY|MAP_INHERIT, fd, 0);
|
||||||
if ((void *) filedata == MAP_FAILED)
|
if ((void *) filedata != MAP_FAILED)
|
||||||
|
{
|
||||||
|
if (st.st_size < sizeof (*filedata))
|
||||||
|
/* This cannot be a locale data file since it's too small. */
|
||||||
|
goto puntfd;
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS)
|
if (errno == ENOSYS)
|
||||||
{
|
{
|
||||||
|
#endif /* _POSIX_MAPPED_FILES */
|
||||||
/* No mmap; allocate a buffer and read from the file. */
|
/* No mmap; allocate a buffer and read from the file. */
|
||||||
mmaped = 0;
|
mmaped = 0;
|
||||||
filedata = malloc (st.st_size);
|
filedata = malloc (st.st_size);
|
||||||
@@ -148,19 +162,20 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
|||||||
else
|
else
|
||||||
goto puntfd;
|
goto puntfd;
|
||||||
__set_errno (save_err);
|
__set_errno (save_err);
|
||||||
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
goto puntfd;
|
goto puntfd;
|
||||||
}
|
}
|
||||||
else if (st.st_size < sizeof (*filedata))
|
#endif /* _POSIX_MAPPED_FILES */
|
||||||
/* This cannot be a locale data file since it's too small. */
|
|
||||||
goto puntfd;
|
|
||||||
|
|
||||||
if (filedata->magic != LIMAGIC (category))
|
if (filedata->magic != LIMAGIC (category))
|
||||||
/* Bad data file in either byte order. */
|
/* Bad data file in either byte order. */
|
||||||
{
|
{
|
||||||
puntmap:
|
puntmap:
|
||||||
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
__munmap ((caddr_t) filedata, st.st_size);
|
__munmap ((caddr_t) filedata, st.st_size);
|
||||||
|
#endif
|
||||||
puntfd:
|
puntfd:
|
||||||
__close (fd);
|
__close (fd);
|
||||||
return;
|
return;
|
||||||
@@ -208,9 +223,11 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
|
|||||||
void
|
void
|
||||||
_nl_unload_locale (struct locale_data *locale)
|
_nl_unload_locale (struct locale_data *locale)
|
||||||
{
|
{
|
||||||
|
#ifdef _POSIX_MAPPED_FILES
|
||||||
if (locale->mmaped)
|
if (locale->mmaped)
|
||||||
__munmap ((caddr_t) locale->filedata, locale->filesize);
|
__munmap ((caddr_t) locale->filedata, locale->filesize);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
free ((void *) locale->filedata);
|
free ((void *) locale->filedata);
|
||||||
|
|
||||||
free (locale);
|
free (locale);
|
||||||
|
@@ -1,3 +1,7 @@
|
|||||||
|
2000-01-27 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
|
* locales/af_ZA: Fix syntax errors.
|
||||||
|
|
||||||
2000-01-24 Ulrich Drepper <drepper@cygnus.com>
|
2000-01-24 Ulrich Drepper <drepper@cygnus.com>
|
||||||
|
|
||||||
* tst-locale.sh: Also enable test5.
|
* tst-locale.sh: Also enable test5.
|
||||||
|
@@ -1938,14 +1938,14 @@ UNDEFINED IGNORE;IGNORE;IGNORE
|
|||||||
<8a> <8>;<8a>;IGNORE;IGNORE
|
<8a> <8>;<8a>;IGNORE;IGNORE
|
||||||
<9a> <9>;<9a>;IGNORE;IGNORE
|
<9a> <9>;<9a>;IGNORE;IGNORE
|
||||||
|
|
||||||
<lM-> <l+><aM>;<l+><aM>;<lM-><lM->;IGNORE
|
<lM-> "<l+><aM>";"<l+><aM>";"<lM-><lM->";IGNORE
|
||||||
<lM.> <l+><aM>;<l+><aM.>;<lM.><lM.>;IGNORE
|
<lM.> "<l+><aM>";"<l+><aM.>";"<lM.><lM.>";IGNORE
|
||||||
<lH-> <l+><aH>;<l+><aH>;<lH-><lH->;IGNORE
|
<lH-> "<l+><aH>";"<l+><aH>";"<lH-><lH->";IGNORE
|
||||||
<lH.> <l+><aH>;<l+><aH.>;<lH.><lH.>;IGNORE
|
<lH.> "<l+><aH>";"<l+><aH.>";"<lH.><lH.>";IGNORE
|
||||||
<lh-> <l+><ah>;<l+><ah>;<lh-><lh->;IGNORE
|
<lh-> "<l+><ah>";"<l+><ah>";"<lh-><lh->";IGNORE
|
||||||
<lh.> <l+><ah>;<l+><ah.>;<lh.><lh.>;IGNORE
|
<lh.> "<l+><ah>";"<l+><ah.>";"<lh.><lh.>";IGNORE
|
||||||
<la-> <l+><a+>;<l+><a+->;<la-><la->;IGNORE
|
<la-> "<l+><a+>";"<l+><a+->";"<la-><la->";IGNORE
|
||||||
<la.> <l+><a+>;<l+><a+.>;<la.><la.>;IGNORE
|
<la.> "<l+><a+>";"<l+><a+.>";"<la.><la.>";IGNORE
|
||||||
|
|
||||||
% katakana/hiragana sorting
|
% katakana/hiragana sorting
|
||||||
% base is katakana, as this is present in most charsets
|
% base is katakana, as this is present in most charsets
|
||||||
|
@@ -98,7 +98,7 @@ get_elem (void)
|
|||||||
struct requestlist *new_row;
|
struct requestlist *new_row;
|
||||||
size_t new_size;
|
size_t new_size;
|
||||||
|
|
||||||
assert(sizeof(struct aiocb) == sizeof(struct aiocb64));
|
assert (sizeof (struct aiocb) == sizeof (struct aiocb64));
|
||||||
|
|
||||||
/* Compute new size. */
|
/* Compute new size. */
|
||||||
new_size = pool_size ? pool_size + ENTRIES_PER_ROW : optim.aio_num;
|
new_size = pool_size ? pool_size + ENTRIES_PER_ROW : optim.aio_num;
|
||||||
@@ -139,7 +139,7 @@ get_elem (void)
|
|||||||
if (new_row == NULL)
|
if (new_row == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
pool[new_size / ENTRIES_PER_ROW] = new_row;
|
pool[new_size / ENTRIES_PER_ROW - 1] = new_row;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Put all the new entries in the freelist. */
|
/* Put all the new entries in the freelist. */
|
||||||
|
@@ -8,7 +8,3 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
|
|||||||
rt_sigqueueinfo rt_sigaction rt_sigpending \
|
rt_sigqueueinfo rt_sigaction rt_sigpending \
|
||||||
sigrestorer
|
sigrestorer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(subdir),resource)
|
|
||||||
sysdep_routines += oldgetrlimit64
|
|
||||||
endif
|
|
||||||
|
@@ -4,7 +4,7 @@ libc {
|
|||||||
inb; inw; inl;
|
inb; inw; inl;
|
||||||
outb; outw; outl;
|
outb; outw; outl;
|
||||||
}
|
}
|
||||||
GLIBC_2.1.3 {
|
GLIBC_2.2 {
|
||||||
# New rlimit interface
|
# New rlimit interface
|
||||||
getrlimit; setrlimit; getrlimit64;
|
getrlimit; setrlimit; getrlimit64;
|
||||||
}
|
}
|
||||||
|
@@ -12,5 +12,3 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid
|
|||||||
s_setreuid setreuid setreuid 2 __syscall_setreuid
|
s_setreuid setreuid setreuid 2 __syscall_setreuid
|
||||||
s_setuid setuid setuid 1 __syscall_setuid
|
s_setuid setuid setuid 1 __syscall_setuid
|
||||||
syscall - syscall 7 syscall
|
syscall - syscall 7 syscall
|
||||||
oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0
|
|
||||||
oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0
|
|
||||||
|
@@ -7,7 +7,7 @@ libc {
|
|||||||
GLIBC_2.1 {
|
GLIBC_2.1 {
|
||||||
__modify_ldt; modify_ldt;
|
__modify_ldt; modify_ldt;
|
||||||
}
|
}
|
||||||
GLIBC_2.1.3 {
|
GLIBC_2.2 {
|
||||||
# New rlimit interface
|
# New rlimit interface
|
||||||
getrlimit; setrlimit; getrlimit64;
|
getrlimit; setrlimit; getrlimit64;
|
||||||
}
|
}
|
||||||
|
@@ -78,7 +78,7 @@ __new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
|
|||||||
|
|
||||||
weak_alias (__new_getrlimit, __getrlimit);
|
weak_alias (__new_getrlimit, __getrlimit);
|
||||||
#if defined PIC && DO_VERSIONING
|
#if defined PIC && DO_VERSIONING
|
||||||
default_symbol_version (__new_getrlimit, getrlimit, GLIBC_2.1.3);
|
default_symbol_version (__new_getrlimit, getrlimit, GLIBC_2.2);
|
||||||
#else
|
#else
|
||||||
weak_alias (__new_getrlimit, getrlimit);
|
weak_alias (__new_getrlimit, getrlimit);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#undef getrlimit64
|
#undef getrlimit64
|
||||||
#if defined PIC && defined DO_VERSIONING
|
#if defined PIC && defined DO_VERSIONING
|
||||||
default_symbol_version (__new_getrlimit64, getrlimit64, GLIBC_2.1.3);
|
default_symbol_version (__new_getrlimit64, getrlimit64, GLIBC_2.2);
|
||||||
#else
|
#else
|
||||||
weak_alias (__new_getrlimit64, getrlimit64);
|
weak_alias (__new_getrlimit64, getrlimit64);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -76,7 +76,7 @@ __new_setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
|
|||||||
|
|
||||||
weak_alias (__new_setrlimit, __setrlimit);
|
weak_alias (__new_setrlimit, __setrlimit);
|
||||||
#if defined PIC && DO_VERSIONING
|
#if defined PIC && DO_VERSIONING
|
||||||
default_symbol_version (__new_setrlimit, setrlimit, GLIBC_2.1.3);
|
default_symbol_version (__new_setrlimit, setrlimit, GLIBC_2.2);
|
||||||
#else
|
#else
|
||||||
weak_alias (__new_setrlimit, setrlimit);
|
weak_alias (__new_setrlimit, setrlimit);
|
||||||
#endif
|
#endif
|
||||||
|
@@ -38,9 +38,15 @@ extern int ioperm (unsigned long int __from, unsigned long int __num,
|
|||||||
privileges. */
|
privileges. */
|
||||||
extern int iopl (int __level) __THROW;
|
extern int iopl (int __level) __THROW;
|
||||||
|
|
||||||
|
#if defined __GNUC__ && __GNUC__ >= 2
|
||||||
|
|
||||||
extern inline unsigned char
|
# ifndef _EXTERN_INLINE
|
||||||
inb (unsigned short port)
|
# define _EXTERN_INLINE extern __inline
|
||||||
|
# endif
|
||||||
|
|
||||||
|
|
||||||
|
_EXTERN_INLINE unsigned char
|
||||||
|
inb (unsigned short int port)
|
||||||
{
|
{
|
||||||
unsigned char _v;
|
unsigned char _v;
|
||||||
|
|
||||||
@@ -48,8 +54,8 @@ inb (unsigned short port)
|
|||||||
return _v;
|
return _v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline unsigned char
|
_EXTERN_INLINE unsigned char
|
||||||
inb_p (unsigned short port)
|
inb_p (unsigned short int port)
|
||||||
{
|
{
|
||||||
unsigned char _v;
|
unsigned char _v;
|
||||||
|
|
||||||
@@ -57,8 +63,8 @@ inb_p (unsigned short port)
|
|||||||
return _v;
|
return _v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline unsigned short
|
_EXTERN_INLINE unsigned short int
|
||||||
inw (unsigned short port)
|
inw (unsigned short int port)
|
||||||
{
|
{
|
||||||
unsigned short _v;
|
unsigned short _v;
|
||||||
|
|
||||||
@@ -66,17 +72,17 @@ inw (unsigned short port)
|
|||||||
return _v;
|
return _v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline unsigned short
|
_EXTERN_INLINE unsigned short int
|
||||||
inw_p (unsigned short port)
|
inw_p (unsigned short int port)
|
||||||
{
|
{
|
||||||
unsigned short _v;
|
unsigned short int _v;
|
||||||
|
|
||||||
__asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
|
__asm__ __volatile__ ("inw %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
|
||||||
return _v;
|
return _v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline unsigned int
|
_EXTERN_INLINE unsigned int
|
||||||
inl (unsigned short port)
|
inl (unsigned short int port)
|
||||||
{
|
{
|
||||||
unsigned int _v;
|
unsigned int _v;
|
||||||
|
|
||||||
@@ -84,95 +90,97 @@ inl (unsigned short port)
|
|||||||
return _v;
|
return _v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline unsigned int
|
_EXTERN_INLINE unsigned int
|
||||||
inl_p (unsigned short port)
|
inl_p (unsigned short int port)
|
||||||
{
|
{
|
||||||
unsigned int _v;
|
unsigned int _v;
|
||||||
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
|
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
|
||||||
return _v;
|
return _v;
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outb (unsigned char value, unsigned short port)
|
outb (unsigned char value, unsigned short int port)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("outb %b0,%w1"::"a" (value), "Nd" (port));
|
__asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outb_p (unsigned char value, unsigned short port)
|
outb_p (unsigned char value, unsigned short int port)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80"::"a" (value),
|
__asm__ __volatile__ ("outb %b0,%w1\noutb %%al,$0x80": :"a" (value),
|
||||||
"Nd" (port));
|
"Nd" (port));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outw (unsigned short value, unsigned short port)
|
outw (unsigned short value, unsigned short int port)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("outw %w0,%w1"::"a" (value), "Nd" (port));
|
__asm__ __volatile__ ("outw %w0,%w1": :"a" (value), "Nd" (port));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outw_p (unsigned short value, unsigned short port)
|
outw_p (unsigned short int value, unsigned short int port)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80"::"a" (value),
|
__asm__ __volatile__ ("outw %w0,%w1\noutb %%al,$0x80": :"a" (value),
|
||||||
"Nd" (port));
|
"Nd" (port));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outl (unsigned int value, unsigned short port)
|
outl (unsigned int value, unsigned short int port)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("outl %0,%w1"::"a" (value), "Nd" (port));
|
__asm__ __volatile__ ("outl %0,%w1": :"a" (value), "Nd" (port));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outl_p (unsigned int value, unsigned short port)
|
outl_p (unsigned int value, unsigned short int port)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80"::"a" (value),
|
__asm__ __volatile__ ("outl %0,%w1\noutb %%al,$0x80": :"a" (value),
|
||||||
"Nd" (port));
|
"Nd" (port));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
insb (unsigned short port, void *addr, unsigned long count)
|
insb (unsigned short int port, void *addr, unsigned long int count)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (addr),
|
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (addr),
|
||||||
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
insw (unsigned short port, void *addr, unsigned long count)
|
insw (unsigned short int port, void *addr, unsigned long int count)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (addr),
|
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (addr),
|
||||||
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
insl (unsigned short port, void *addr, unsigned long count)
|
insl (unsigned short int port, void *addr, unsigned long int count)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (addr),
|
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (addr),
|
||||||
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outsb (unsigned short port, const void *addr, unsigned long count)
|
outsb (unsigned short int port, const void *addr, unsigned long int count)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (addr),
|
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (addr),
|
||||||
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outsw (unsigned short port, const void *addr, unsigned long count)
|
outsw (unsigned short int port, const void *addr, unsigned long int count)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (addr),
|
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (addr),
|
||||||
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern inline void
|
_EXTERN_INLINE void
|
||||||
outsl (unsigned short port, const void *addr, unsigned long count)
|
outsl (unsigned short int port, const void *addr, unsigned long int count)
|
||||||
{
|
{
|
||||||
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (addr),
|
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (addr),
|
||||||
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
"=c" (count):"d" (port), "0" (addr), "1" (count));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* GNU C */
|
||||||
|
|
||||||
__END_DECLS
|
__END_DECLS
|
||||||
#endif /* _SYS_IO_H */
|
#endif /* _SYS_IO_H */
|
||||||
|
Reference in New Issue
Block a user