summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog49
-rw-r--r--catgets/catgets.c18
-rw-r--r--catgets/gencat.c91
-rw-r--r--catgets/open_catalog.c175
-rw-r--r--linuxthreads/ChangeLog8
-rw-r--r--linuxthreads/condvar.c22
-rw-r--r--locale/loadlocale.c53
-rw-r--r--localedata/ChangeLog4
-rw-r--r--localedata/locales/af_ZA16
-rw-r--r--rt/aio_misc.c4
-rw-r--r--sysdeps/powerpc/fpu/libm-test-ulps (renamed from sysdeps/powerpc/fpu/libm-ulps)0
-rw-r--r--sysdeps/unix/sysv/linux/arm/Makefile4
-rw-r--r--sysdeps/unix/sysv/linux/arm/Versions2
-rw-r--r--sysdeps/unix/sysv/linux/arm/syscalls.list2
-rw-r--r--sysdeps/unix/sysv/linux/i386/Versions2
-rw-r--r--sysdeps/unix/sysv/linux/i386/getrlimit.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/getrlimit64.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/setrlimit.c2
-rw-r--r--sysdeps/unix/sysv/linux/i386/sys/io.h94
19 files changed, 311 insertions, 239 deletions
diff --git a/ChangeLog b/ChangeLog
index 4d88955fe4..b7a21ef046 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,54 @@
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>
+
* locale/programs/ld-numeric.c (numeric_output): Increment cnt in
correct place to avoid uninitialized memory passed to writev.
diff --git a/catgets/catgets.c b/catgets/catgets.c
index c6fd13d4b4..86ff0ff831 100644
--- a/catgets/catgets.c
+++ b/catgets/catgets.c
@@ -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.
Contributed by Ulrich Drepper, <drepper@gnu.org>.
@@ -19,6 +19,7 @@
#include <alloca.h>
#include <errno.h>
+#include <locale.h>
#include <nl_types.h>
#include <stdlib.h>
#include <string.h>
@@ -43,20 +44,15 @@ catopen (const char *cat_name, int flag)
if (strchr (cat_name, '/') == NULL)
{
if (flag == NL_CAT_LOCALE)
- {
- env_var = getenv ("LC_ALL");
- if (env_var == NULL)
- env_var = getenv ("LC_MESSAGES");
-
- if (env_var != NULL)
- goto have_env_var;
- }
+ /* Use the current locale setting for LC_MESSAGES. */
+ env_var = setlocale (LC_MESSAGES, NULL);
+ else
+ /* Use the LANG environment variable. */
+ env_var = getenv ("LANG");
- env_var = getenv ("LANG");
if (env_var == NULL)
env_var = "C";
- have_env_var:
env_var_len = strlen (env_var) + 1;
nlspath = __secure_getenv ("NLSPATH");
diff --git a/catgets/gencat.c b/catgets/gencat.c
index eaeb59ca60..4609c63681 100644
--- a/catgets/gencat.c
+++ b/catgets/gencat.c
@@ -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.
- 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
modify it under the terms of the GNU Library General Public License as
@@ -32,6 +32,7 @@
#include <limits.h>
#include <nl_types.h>
#include <obstack.h>
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -237,7 +238,7 @@ print_version (FILE *stream, struct argp_state *state)
Copyright (C) %s Free Software Foundation, Inc.\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\
-"), "1999");
+"), "2000");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
@@ -492,13 +493,12 @@ this is the first definition"));
{
const char *ident = this_line;
int message_number;
- int any_space;
do
++this_line;
while (this_line[0] != '\0' && !isspace (this_line[0]));
- any_space = isspace (*this_line);
- *this_line++ = '\0'; /* Terminate the identifier. */
+ if (this_line[0] != '\0')
+ *this_line++ = '\0'; /* Terminate the identifier. */
/* Now we found the beginning of the message itself. */
@@ -522,24 +522,12 @@ this is the first definition"));
}
if (runp != NULL)
{
- if (any_space)
- {
- /* Oh, oh. There is already a message with this
- number in the message set. */
- error_at_line (0, 0, fname, start_line,
- gettext ("duplicated message number"));
- 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);
- }
+ /* Oh, oh. There is already a message with this
+ number in the message set. */
+ error_at_line (0, 0, fname, start_line,
+ gettext ("duplicated message number"));
+ error_at_line (0, 0, runp->fname, runp->line,
+ gettext ("this is the first definition"));
message_number = 0;
}
ident = NULL; /* We don't have a symbol. */
@@ -564,24 +552,11 @@ this is the first definition"));
runp = runp->next;
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"));
- 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);
- }
+ error_at_line (0, 0, runp->fname, runp->line,
+ gettext ("this is the first definition"));
message_number = 0;
}
else
@@ -673,7 +648,7 @@ write_out (struct catalog *catalog, const char *output_name,
struct obstack string_pool;
const char *strings;
size_t strings_size;
- u_int32_t *array1, *array2;
+ uint32_t *array1, *array2;
size_t cnt;
int fd;
@@ -751,10 +726,10 @@ write_out (struct catalog *catalog, const char *output_name,
/* Allocate room for all needed arrays. */
array1 =
- (u_int32_t *) alloca (best_size * best_depth * sizeof (u_int32_t) * 3);
- memset (array1, '\0', 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 (uint32_t) * 3);
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);
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
arrays. */
#if __BYTE_ORDER == __LITTLE_ENDIAN
- write (fd, array1, best_size * best_depth * sizeof (u_int32_t) * 3);
- write (fd, array2, 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 (uint32_t) * 3);
#elif __BYTE_ORDER == __BIG_ENDIAN
- write (fd, array2, best_size * best_depth * sizeof (u_int32_t) * 3);
- write (fd, array1, 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 (uint32_t) * 3);
#else
# error Cannot handle __BYTE_ORDER byte order
#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
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)
{
struct message_list *message, *last;
@@ -1043,7 +1019,7 @@ read_old (struct catalog *catalog, const char *file_name)
/* No message in this slot. */
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;
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;
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;
last = message;
message = message->next;
}
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.
Insert it at the right position. */
@@ -1082,5 +1058,14 @@ read_old (struct catalog *catalog, const char *file_name)
++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;
+ }
}
}
diff --git a/catgets/open_catalog.c b/catgets/open_catalog.c
index aefa34f3fa..c5193e166d 100644
--- a/catgets/open_catalog.c
+++ b/catgets/open_catalog.c
@@ -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.
Contributed by Ulrich Drepper, <drepper@gnu.org>.
@@ -84,89 +84,100 @@ __open_catalog (__nl_catd catalog)
while (*run_nlspath != '\0')
{
bufact = 0;
- while (*run_nlspath != ':' && *run_nlspath != '\0')
- if (*run_nlspath == '%')
- {
- const char *tmp;
-
- ++run_nlspath; /* We have seen the `%'. */
- switch (*run_nlspath++)
- {
- case 'N':
- /* Use the catalog name. */
- len = strlen (catalog->cat_name);
- ENOUGH (len);
- memcpy (&buf[bufact], catalog->cat_name, len);
- bufact += len;
- break;
- case 'L':
- /* Use the current locale category value. */
- len = strlen (catalog->env_var);
- ENOUGH (len);
- memcpy (&buf[bufact], catalog->env_var, len);
- bufact += len;
- break;
- case 'l':
- /* Use language element of locale category value. */
- 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;
- while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
- if (*tmp == '_')
- {
+
+ if (*run_nlspath == ':')
+ {
+ /* Leading colon or adjacent colons - treat same as %N. */
+ len = strlen (catalog->cat_name);
+ ENOUGH (len);
+ memcpy (&buf[bufact], catalog->cat_name, len);
+ bufact += len;
+ }
+ else
+ while (*run_nlspath != ':' && *run_nlspath != '\0')
+ if (*run_nlspath == '%')
+ {
+ const char *tmp;
+
+ ++run_nlspath; /* We have seen the `%'. */
+ switch (*run_nlspath++)
+ {
+ case 'N':
+ /* Use the catalog name. */
+ len = strlen (catalog->cat_name);
+ ENOUGH (len);
+ memcpy (&buf[bufact], catalog->cat_name, len);
+ bufact += len;
+ break;
+ case 'L':
+ /* Use the current locale category value. */
+ len = strlen (catalog->env_var);
+ ENOUGH (len);
+ memcpy (&buf[bufact], catalog->env_var, len);
+ bufact += len;
+ break;
+ case 'l':
+ /* Use language element of locale category value. */
+ 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;
- do
- {
- ENOUGH (1);
- buf[bufact++] = *tmp;
- }
- while (*tmp != '\0' && *tmp != '.');
- }
- break;
- case 'c':
- /* Use code set element of locale category value. */
- tmp = catalog->env_var;
- do
- ++tmp;
- while (*tmp != '\0' && *tmp != '.');
- if (*tmp == '.')
- {
+ while (*tmp != '\0' && *tmp != '_' && *tmp != '.');
+ if (*tmp == '_')
+ {
+ ++tmp;
+ do
+ {
+ ENOUGH (1);
+ buf[bufact++] = *tmp++;
+ }
+ while (*tmp != '\0' && *tmp != '.');
+ }
+ break;
+ case 'c':
+ /* Use code set element of locale category value. */
+ tmp = catalog->env_var;
+ do
++tmp;
- do
- {
- ENOUGH (1);
- buf[bufact++] = *tmp;
- }
- while (*tmp != '\0');
- }
- break;
- case '%':
- ENOUGH (1);
- buf[bufact++] = '%';
- break;
- default:
- /* Unknown variable: ignore this path element. */
- bufact = 0;
- while (*run_nlspath != '\0' && *run_nlspath != ':')
- ++run_nlspath;
- break;
- }
- }
- else
- {
- ENOUGH (1);
- buf[bufact++] = *run_nlspath++;
- }
+ while (*tmp != '\0' && *tmp != '.');
+ if (*tmp == '.')
+ {
+ ++tmp;
+ do
+ {
+ ENOUGH (1);
+ buf[bufact++] = *tmp++;
+ }
+ while (*tmp != '\0');
+ }
+ break;
+ case '%':
+ ENOUGH (1);
+ buf[bufact++] = '%';
+ break;
+ default:
+ /* Unknown variable: ignore this path element. */
+ bufact = 0;
+ while (*run_nlspath != '\0' && *run_nlspath != ':')
+ ++run_nlspath;
+ break;
+ }
+ }
+ else
+ {
+ ENOUGH (1);
+ buf[bufact++] = *run_nlspath++;
+ }
+
ENOUGH (1);
buf[bufact] = '\0';
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index e8b0ae12b2..00678616e1 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -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>
* manager.c (pthread_allocate_stack): Compute guard page address
diff --git a/linuxthreads/condvar.c b/linuxthreads/condvar.c
index 87a93a9115..aab3ff257b 100644
--- a/linuxthreads/condvar.c
+++ b/linuxthreads/condvar.c
@@ -26,13 +26,13 @@
#include "restart.h"
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 *,
- pthread_mutex_t *, const struct timespec *);
+ pthread_mutex_t *, struct timespec *);
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 */
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
pthread_cond_timedwait_relative_old(pthread_cond_t *cond,
pthread_mutex_t *mutex,
- const struct timespec * reltime)
+ struct timespec * reltime)
{
volatile pthread_descr self = thread_self();
sigset_t unblock, initial_mask;
@@ -179,7 +179,7 @@ requeue_and_wait_again:
sigaddset(&unblock, __pthread_sig_restart);
sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
/* Sleep for the required duration */
- retsleep = __libc_nanosleep(reltime, NULL);
+ retsleep = __libc_nanosleep(reltime, reltime);
/* Block the restart signal again */
sigprocmask(SIG_SETMASK, &initial_mask, NULL);
was_signalled = 0;
@@ -219,8 +219,8 @@ requeue_and_wait_again:
if (retsleep == 0)
return ETIMEDOUT;
- /* Woken by a signal: resume waiting as
- required by Single Unix Specification. */
+ /* Woken by a signal: resume waiting as required by Single Unix
+ Specification. */
goto requeue_and_wait_again;
}
@@ -250,7 +250,7 @@ requeue_and_wait_again:
static int
pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
pthread_mutex_t *mutex,
- const struct timespec * reltime)
+ struct timespec * reltime)
{
volatile pthread_descr self = thread_self();
sigset_t unblock, initial_mask;
@@ -298,7 +298,7 @@ pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
sigaddset(&unblock, __pthread_sig_restart);
sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);
/* Sleep for the required duration */
- retsleep = __libc_nanosleep(reltime, NULL);
+ retsleep = __libc_nanosleep(reltime, reltime);
/* Block the restart signal again */
sigprocmask(SIG_SETMASK, &initial_mask, NULL);
was_signalled = 0;
@@ -335,8 +335,8 @@ pthread_cond_timedwait_relative_new(pthread_cond_t *cond,
if (retsleep == 0)
return ETIMEDOUT;
- /* Woken by a signal: resume waiting as
- required by Single Unix Specification. */
+ /* Woken by a signal: resume waiting as required by Single Unix
+ Specification. */
goto requeue_and_wait_again;
}
diff --git a/locale/loadlocale.c b/locale/loadlocale.c
index 0bb517ca44..c2d5b89bc1 100644
--- a/locale/loadlocale.c
+++ b/locale/loadlocale.c
@@ -1,5 +1,5 @@
/* 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.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@@ -23,7 +23,9 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <sys/mman.h>
+#ifdef _POSIX_MAPPED_FILES
+# include <sys/mman.h>
+#endif
#include <sys/stat.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
instead. */
char *newp;
+ size_t filenamelen;
__close (fd);
- newp = (char *) alloca (strlen (file->filename)
+ filenamelen = strlen (file->filename);
+ newp = (char *) alloca (filenamelen
+ 5 + _nl_category_name_sizes[category] + 1);
- __stpcpy (__stpcpy (__stpcpy (newp, file->filename), "/SYS_"),
- _nl_category_names[category]);
+ __mempcpy (__mempcpy (__mempcpy (newp, file->filename, filenamelen),
+ "/SYS_", 5),
+ _nl_category_names[category],
+ _nl_category_name_sizes[category] + 1);
fd = __open (newp, O_RDONLY);
if (fd < 0)
@@ -105,24 +111,32 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
/* Map in the file's data. */
save_err = errno;
-#ifndef MAP_COPY
+#ifdef _POSIX_MAPPED_FILES
+# ifndef MAP_COPY
/* Linux seems to lack read-only copy-on-write. */
-#define MAP_COPY MAP_PRIVATE
-#endif
-#ifndef MAP_FILE
+# define MAP_COPY MAP_PRIVATE
+# endif
+# ifndef MAP_FILE
/* Some systems do not have this flag; it is superfluous. */
-#define MAP_FILE 0
-#endif
-#ifndef MAP_INHERIT
+# define MAP_FILE 0
+# endif
+# ifndef MAP_INHERIT
/* Some systems might lack this; they lose. */
-#define MAP_INHERIT 0
-#endif
+# define MAP_INHERIT 0
+# endif
filedata = (void *) __mmap ((caddr_t) 0, st.st_size, PROT_READ,
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)
{
+#endif /* _POSIX_MAPPED_FILES */
/* No mmap; allocate a buffer and read from the file. */
mmaped = 0;
filedata = malloc (st.st_size);
@@ -148,19 +162,20 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
else
goto puntfd;
__set_errno (save_err);
+#ifdef _POSIX_MAPPED_FILES
}
else
goto puntfd;
}
- else if (st.st_size < sizeof (*filedata))
- /* This cannot be a locale data file since it's too small. */
- goto puntfd;
+#endif /* _POSIX_MAPPED_FILES */
if (filedata->magic != LIMAGIC (category))
/* Bad data file in either byte order. */
{
puntmap:
+#ifdef _POSIX_MAPPED_FILES
__munmap ((caddr_t) filedata, st.st_size);
+#endif
puntfd:
__close (fd);
return;
@@ -208,9 +223,11 @@ _nl_load_locale (struct loaded_l10nfile *file, int category)
void
_nl_unload_locale (struct locale_data *locale)
{
+#ifdef _POSIX_MAPPED_FILES
if (locale->mmaped)
__munmap ((caddr_t) locale->filedata, locale->filesize);
else
+#endif
free ((void *) locale->filedata);
free (locale);
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 4001a4dcbb..4d398bce63 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -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>
* tst-locale.sh: Also enable test5.
diff --git a/localedata/locales/af_ZA b/localedata/locales/af_ZA
index ed20e1ef51..3b786ca60c 100644
--- a/localedata/locales/af_ZA
+++ b/localedata/locales/af_ZA
@@ -1938,14 +1938,14 @@ UNDEFINED IGNORE;IGNORE;IGNORE
<8a> <8>;<8a>;IGNORE;IGNORE
<9a> <9>;<9a>;IGNORE;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
-<la-> <l+><a+>;<l+><a+->;<la-><la->;IGNORE
-<la.> <l+><a+>;<l+><a+.>;<la.><la.>;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
+<la-> "<l+><a+>";"<l+><a+->";"<la-><la->";IGNORE
+<la.> "<l+><a+>";"<l+><a+.>";"<la.><la.>";IGNORE
% katakana/hiragana sorting
% base is katakana, as this is present in most charsets
diff --git a/rt/aio_misc.c b/rt/aio_misc.c
index 97ef69f3f1..a9fe3591c5 100644
--- a/rt/aio_misc.c
+++ b/rt/aio_misc.c
@@ -98,7 +98,7 @@ get_elem (void)
struct requestlist *new_row;
size_t new_size;
- assert(sizeof(struct aiocb) == sizeof(struct aiocb64));
+ assert (sizeof (struct aiocb) == sizeof (struct aiocb64));
/* Compute new size. */
new_size = pool_size ? pool_size + ENTRIES_PER_ROW : optim.aio_num;
@@ -139,7 +139,7 @@ get_elem (void)
if (new_row == 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. */
diff --git a/sysdeps/powerpc/fpu/libm-ulps b/sysdeps/powerpc/fpu/libm-test-ulps
index c39808f033..c39808f033 100644
--- a/sysdeps/powerpc/fpu/libm-ulps
+++ b/sysdeps/powerpc/fpu/libm-test-ulps
diff --git a/sysdeps/unix/sysv/linux/arm/Makefile b/sysdeps/unix/sysv/linux/arm/Makefile
index 6040b20193..939c74cea7 100644
--- a/sysdeps/unix/sysv/linux/arm/Makefile
+++ b/sysdeps/unix/sysv/linux/arm/Makefile
@@ -8,7 +8,3 @@ sysdep_routines += rt_sigsuspend rt_sigprocmask rt_sigtimedwait \
rt_sigqueueinfo rt_sigaction rt_sigpending \
sigrestorer
endif
-
-ifeq ($(subdir),resource)
-sysdep_routines += oldgetrlimit64
-endif
diff --git a/sysdeps/unix/sysv/linux/arm/Versions b/sysdeps/unix/sysv/linux/arm/Versions
index 531817f737..7e71a8604d 100644
--- a/sysdeps/unix/sysv/linux/arm/Versions
+++ b/sysdeps/unix/sysv/linux/arm/Versions
@@ -4,7 +4,7 @@ libc {
inb; inw; inl;
outb; outw; outl;
}
- GLIBC_2.1.3 {
+ GLIBC_2.2 {
# New rlimit interface
getrlimit; setrlimit; getrlimit64;
}
diff --git a/sysdeps/unix/sysv/linux/arm/syscalls.list b/sysdeps/unix/sysv/linux/arm/syscalls.list
index 53da8bbb7d..60303d3df7 100644
--- a/sysdeps/unix/sysv/linux/arm/syscalls.list
+++ b/sysdeps/unix/sysv/linux/arm/syscalls.list
@@ -12,5 +12,3 @@ s_setresuid setresuid setresuid 3 __syscall_setresuid
s_setreuid setreuid setreuid 2 __syscall_setreuid
s_setuid setuid setuid 1 __syscall_setuid
syscall - syscall 7 syscall
-oldgetrlimit EXTRA getrlimit 2 __old_getrlimit getrlimit@GLIBC_2.0
-oldsetrlimit EXTRA setrlimit 2 __old_setrlimit setrlimit@GLIBC_2.0
diff --git a/sysdeps/unix/sysv/linux/i386/Versions b/sysdeps/unix/sysv/linux/i386/Versions
index 68b0ee4730..9860ff8def 100644
--- a/sysdeps/unix/sysv/linux/i386/Versions
+++ b/sysdeps/unix/sysv/linux/i386/Versions
@@ -7,7 +7,7 @@ libc {
GLIBC_2.1 {
__modify_ldt; modify_ldt;
}
- GLIBC_2.1.3 {
+ GLIBC_2.2 {
# New rlimit interface
getrlimit; setrlimit; getrlimit64;
}
diff --git a/sysdeps/unix/sysv/linux/i386/getrlimit.c b/sysdeps/unix/sysv/linux/i386/getrlimit.c
index 14a879c5df..4fae122038 100644
--- a/sysdeps/unix/sysv/linux/i386/getrlimit.c
+++ b/sysdeps/unix/sysv/linux/i386/getrlimit.c
@@ -78,7 +78,7 @@ __new_getrlimit (enum __rlimit_resource resource, struct rlimit *rlimits)
weak_alias (__new_getrlimit, __getrlimit);
#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
weak_alias (__new_getrlimit, getrlimit);
#endif
diff --git a/sysdeps/unix/sysv/linux/i386/getrlimit64.c b/sysdeps/unix/sysv/linux/i386/getrlimit64.c
index 602dd28d8a..8e7c9c6c1e 100644
--- a/sysdeps/unix/sysv/linux/i386/getrlimit64.c
+++ b/sysdeps/unix/sysv/linux/i386/getrlimit64.c
@@ -22,7 +22,7 @@
#undef getrlimit64
#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
weak_alias (__new_getrlimit64, getrlimit64);
#endif
diff --git a/sysdeps/unix/sysv/linux/i386/setrlimit.c b/sysdeps/unix/sysv/linux/i386/setrlimit.c
index e8adeed5e9..f9fd23ef54 100644
--- a/sysdeps/unix/sysv/linux/i386/setrlimit.c
+++ b/sysdeps/unix/sysv/linux/i386/setrlimit.c
@@ -76,7 +76,7 @@ __new_setrlimit (enum __rlimit_resource resource, const struct rlimit *rlimits)
weak_alias (__new_setrlimit, __setrlimit);
#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
weak_alias (__new_setrlimit, setrlimit);
#endif
diff --git a/sysdeps/unix/sysv/linux/i386/sys/io.h b/sysdeps/unix/sysv/linux/i386/sys/io.h
index 8310525456..27cd5ff719 100644
--- a/sysdeps/unix/sysv/linux/i386/sys/io.h
+++ b/sysdeps/unix/sysv/linux/i386/sys/io.h
@@ -38,9 +38,15 @@ extern int ioperm (unsigned long int __from, unsigned long int __num,
privileges. */
extern int iopl (int __level) __THROW;
+#if defined __GNUC__ && __GNUC__ >= 2
-extern inline unsigned char
-inb (unsigned short port)
+# ifndef _EXTERN_INLINE
+# define _EXTERN_INLINE extern __inline
+# endif
+
+
+_EXTERN_INLINE unsigned char
+inb (unsigned short int port)
{
unsigned char _v;
@@ -48,8 +54,8 @@ inb (unsigned short port)
return _v;
}
-extern inline unsigned char
-inb_p (unsigned short port)
+_EXTERN_INLINE unsigned char
+inb_p (unsigned short int port)
{
unsigned char _v;
@@ -57,8 +63,8 @@ inb_p (unsigned short port)
return _v;
}
-extern inline unsigned short
-inw (unsigned short port)
+_EXTERN_INLINE unsigned short int
+inw (unsigned short int port)
{
unsigned short _v;
@@ -66,17 +72,17 @@ inw (unsigned short port)
return _v;
}
-extern inline unsigned short
-inw_p (unsigned short port)
+_EXTERN_INLINE unsigned short int
+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));
return _v;
}
-extern inline unsigned int
-inl (unsigned short port)
+_EXTERN_INLINE unsigned int
+inl (unsigned short int port)
{
unsigned int _v;
@@ -84,95 +90,97 @@ inl (unsigned short port)
return _v;
}
-extern inline unsigned int
-inl_p (unsigned short port)
+_EXTERN_INLINE unsigned int
+inl_p (unsigned short int port)
{
unsigned int _v;
__asm__ __volatile__ ("inl %w1,%0\noutb %%al,$0x80":"=a" (_v):"Nd" (port));
return _v;
}
-extern inline void
-outb (unsigned char value, unsigned short port)
+_EXTERN_INLINE void
+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
-outb_p (unsigned char value, unsigned short port)
+_EXTERN_INLINE void
+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));
}
-extern inline void
-outw (unsigned short value, unsigned short port)
+_EXTERN_INLINE void
+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
-outw_p (unsigned short value, unsigned short port)
+_EXTERN_INLINE void
+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));
}
-extern inline void
-outl (unsigned int value, unsigned short port)
+_EXTERN_INLINE void
+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
-outl_p (unsigned int value, unsigned short port)
+_EXTERN_INLINE void
+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));
}
-extern inline void
-insb (unsigned short port, void *addr, unsigned long count)
+_EXTERN_INLINE void
+insb (unsigned short int port, void *addr, unsigned long int count)
{
__asm__ __volatile__ ("cld ; rep ; insb":"=D" (addr),
"=c" (count):"d" (port), "0" (addr), "1" (count));
}
-extern inline void
-insw (unsigned short port, void *addr, unsigned long count)
+_EXTERN_INLINE void
+insw (unsigned short int port, void *addr, unsigned long int count)
{
__asm__ __volatile__ ("cld ; rep ; insw":"=D" (addr),
"=c" (count):"d" (port), "0" (addr), "1" (count));
}
-extern inline void
-insl (unsigned short port, void *addr, unsigned long count)
+_EXTERN_INLINE void
+insl (unsigned short int port, void *addr, unsigned long int count)
{
__asm__ __volatile__ ("cld ; rep ; insl":"=D" (addr),
"=c" (count):"d" (port), "0" (addr), "1" (count));
}
-extern inline void
-outsb (unsigned short port, const void *addr, unsigned long count)
+_EXTERN_INLINE void
+outsb (unsigned short int port, const void *addr, unsigned long int count)
{
__asm__ __volatile__ ("cld ; rep ; outsb":"=S" (addr),
"=c" (count):"d" (port), "0" (addr), "1" (count));
}
-extern inline void
-outsw (unsigned short port, const void *addr, unsigned long count)
+_EXTERN_INLINE void
+outsw (unsigned short int port, const void *addr, unsigned long int count)
{
__asm__ __volatile__ ("cld ; rep ; outsw":"=S" (addr),
"=c" (count):"d" (port), "0" (addr), "1" (count));
}
-extern inline void
-outsl (unsigned short port, const void *addr, unsigned long count)
+_EXTERN_INLINE void
+outsl (unsigned short int port, const void *addr, unsigned long int count)
{
__asm__ __volatile__ ("cld ; rep ; outsl":"=S" (addr),
"=c" (count):"d" (port), "0" (addr), "1" (count));
}
+#endif /* GNU C */
+
__END_DECLS
#endif /* _SYS_IO_H */