From 705341a92faad6305f47511f57ab46af19c10645 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Fri, 24 Apr 2009 16:25:51 +0000 Subject: * locale/locarchive.h (struct locarhandle): Rename len field to mmaped and add new reserved field. * locale/programs/locarchive.c (RESERVE_MMAP_SIZE): Define. (create_archive): Reserve address space and then map file into it. (open_archive): Likewise. (file_data_available_p): New function. (compare_from_file): New function. (close_archive): Adjust to member name changes. (add_locale): Before comparing locale data, check it is mapped. Otherwise fall back to reading from the file. --- locale/locarchive.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'locale/locarchive.h') diff --git a/locale/locarchive.h b/locale/locarchive.h index e94bc2b480..eb3353d316 100644 --- a/locale/locarchive.h +++ b/locale/locarchive.h @@ -1,5 +1,5 @@ /* Definitions for locale archive handling. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2009 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or @@ -83,7 +83,8 @@ struct locarhandle { int fd; void *addr; - size_t len; + size_t mmaped; + size_t reserved; }; -- cgit 1.4.1