Blame intl/loadmsgcat.c

Packit Service a721b1
/* Load needed message catalogs.
Packit Service a721b1
   Copyright (C) 1995-1999, 2000-2007 Free Software Foundation, Inc.
Packit Service a721b1
Packit Service a721b1
   This program is free software; you can redistribute it and/or modify it
Packit Service a721b1
   under the terms of the GNU Library General Public License as published
Packit Service a721b1
   by the Free Software Foundation; either version 2, or (at your option)
Packit Service a721b1
   any later version.
Packit Service a721b1
Packit Service a721b1
   This program is distributed in the hope that it will be useful,
Packit Service a721b1
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service a721b1
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service a721b1
   Library General Public License for more details.
Packit Service a721b1
Packit Service a721b1
   You should have received a copy of the GNU Library General Public
Packit Service a721b1
   License along with this program; if not, write to the Free Software
Packit Service a721b1
   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
Packit Service a721b1
   USA.  */
Packit Service a721b1
Packit Service a721b1
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
Packit Service a721b1
   This must come before <config.h> because <config.h> may include
Packit Service a721b1
   <features.h>, and once <features.h> has been included, it's too late.  */
Packit Service a721b1
#ifndef _GNU_SOURCE
Packit Service a721b1
# define _GNU_SOURCE    1
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#ifdef HAVE_CONFIG_H
Packit Service a721b1
# include <config.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#include <ctype.h>
Packit Service a721b1
#include <errno.h>
Packit Service a721b1
#include <fcntl.h>
Packit Service a721b1
#include <sys/types.h>
Packit Service a721b1
#include <sys/stat.h>
Packit Service a721b1
Packit Service a721b1
#ifdef __GNUC__
Packit Service a721b1
# undef  alloca
Packit Service a721b1
# define alloca __builtin_alloca
Packit Service a721b1
# define HAVE_ALLOCA 1
Packit Service a721b1
#else
Packit Service a721b1
# ifdef _MSC_VER
Packit Service a721b1
#  include <malloc.h>
Packit Service a721b1
#  define alloca _alloca
Packit Service a721b1
# else
Packit Service a721b1
#  if defined HAVE_ALLOCA_H || defined _LIBC
Packit Service a721b1
#   include <alloca.h>
Packit Service a721b1
#  else
Packit Service a721b1
#   ifdef _AIX
Packit Service a721b1
 #pragma alloca
Packit Service a721b1
#   else
Packit Service a721b1
#    ifndef alloca
Packit Service a721b1
char *alloca ();
Packit Service a721b1
#    endif
Packit Service a721b1
#   endif
Packit Service a721b1
#  endif
Packit Service a721b1
# endif
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#include <stdlib.h>
Packit Service a721b1
#include <string.h>
Packit Service a721b1
Packit Service a721b1
#if defined HAVE_UNISTD_H || defined _LIBC
Packit Service a721b1
# include <unistd.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
# include <langinfo.h>
Packit Service a721b1
# include <locale.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
Packit Service a721b1
    || (defined _LIBC && defined _POSIX_MAPPED_FILES)
Packit Service a721b1
# include <sys/mman.h>
Packit Service a721b1
# undef HAVE_MMAP
Packit Service a721b1
# define HAVE_MMAP	1
Packit Service a721b1
#else
Packit Service a721b1
# undef HAVE_MMAP
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
Packit Service a721b1
# include <stdint.h>
Packit Service a721b1
#endif
Packit Service a721b1
#if defined HAVE_INTTYPES_H || defined _LIBC
Packit Service a721b1
# include <inttypes.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
#include "gmo.h"
Packit Service a721b1
#include "gettextP.h"
Packit Service a721b1
#include "hash-string.h"
Packit Service a721b1
#include "plural-exp.h"
Packit Service a721b1
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
# include "../locale/localeinfo.h"
Packit Service a721b1
# include <not-cancel.h>
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* Handle multi-threaded applications.  */
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
# include <bits/libc-lock.h>
Packit Service a721b1
#else
Packit Service a721b1
# include "lock.h"
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
Packit Service a721b1
   Note that our fallback values need not be literal strings, because we don't
Packit Service a721b1
   use them with preprocessor string concatenation.  */
Packit Service a721b1
#if !defined PRId8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRId8
Packit Service a721b1
# define PRId8 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIi8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIi8
Packit Service a721b1
# define PRIi8 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIo8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIo8
Packit Service a721b1
# define PRIo8 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIu8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIu8
Packit Service a721b1
# define PRIu8 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIx8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIx8
Packit Service a721b1
# define PRIx8 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIX8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIX8
Packit Service a721b1
# define PRIX8 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRId16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRId16
Packit Service a721b1
# define PRId16 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIi16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIi16
Packit Service a721b1
# define PRIi16 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIo16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIo16
Packit Service a721b1
# define PRIo16 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIu16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIu16
Packit Service a721b1
# define PRIu16 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIx16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIx16
Packit Service a721b1
# define PRIx16 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIX16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIX16
Packit Service a721b1
# define PRIX16 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRId32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRId32
Packit Service a721b1
# define PRId32 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIi32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIi32
Packit Service a721b1
# define PRIi32 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIo32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIo32
Packit Service a721b1
# define PRIo32 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIu32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIu32
Packit Service a721b1
# define PRIu32 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIx32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIx32
Packit Service a721b1
# define PRIx32 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIX32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIX32
Packit Service a721b1
# define PRIX32 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRId64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRId64
Packit Service a721b1
# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIi64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIi64
Packit Service a721b1
# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIo64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIo64
Packit Service a721b1
# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIu64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIu64
Packit Service a721b1
# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIx64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIx64
Packit Service a721b1
# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIX64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIX64
Packit Service a721b1
# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdLEAST8
Packit Service a721b1
# define PRIdLEAST8 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiLEAST8
Packit Service a721b1
# define PRIiLEAST8 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoLEAST8
Packit Service a721b1
# define PRIoLEAST8 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuLEAST8
Packit Service a721b1
# define PRIuLEAST8 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxLEAST8
Packit Service a721b1
# define PRIxLEAST8 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXLEAST8
Packit Service a721b1
# define PRIXLEAST8 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdLEAST16
Packit Service a721b1
# define PRIdLEAST16 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiLEAST16
Packit Service a721b1
# define PRIiLEAST16 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoLEAST16
Packit Service a721b1
# define PRIoLEAST16 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuLEAST16
Packit Service a721b1
# define PRIuLEAST16 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxLEAST16
Packit Service a721b1
# define PRIxLEAST16 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXLEAST16
Packit Service a721b1
# define PRIXLEAST16 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdLEAST32
Packit Service a721b1
# define PRIdLEAST32 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiLEAST32
Packit Service a721b1
# define PRIiLEAST32 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoLEAST32
Packit Service a721b1
# define PRIoLEAST32 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuLEAST32
Packit Service a721b1
# define PRIuLEAST32 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxLEAST32
Packit Service a721b1
# define PRIxLEAST32 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXLEAST32
Packit Service a721b1
# define PRIXLEAST32 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdLEAST64
Packit Service a721b1
# define PRIdLEAST64 PRId64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiLEAST64
Packit Service a721b1
# define PRIiLEAST64 PRIi64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoLEAST64
Packit Service a721b1
# define PRIoLEAST64 PRIo64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuLEAST64
Packit Service a721b1
# define PRIuLEAST64 PRIu64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxLEAST64
Packit Service a721b1
# define PRIxLEAST64 PRIx64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXLEAST64
Packit Service a721b1
# define PRIXLEAST64 PRIX64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdFAST8
Packit Service a721b1
# define PRIdFAST8 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiFAST8
Packit Service a721b1
# define PRIiFAST8 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoFAST8
Packit Service a721b1
# define PRIoFAST8 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuFAST8
Packit Service a721b1
# define PRIuFAST8 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxFAST8
Packit Service a721b1
# define PRIxFAST8 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXFAST8
Packit Service a721b1
# define PRIXFAST8 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdFAST16
Packit Service a721b1
# define PRIdFAST16 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiFAST16
Packit Service a721b1
# define PRIiFAST16 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoFAST16
Packit Service a721b1
# define PRIoFAST16 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuFAST16
Packit Service a721b1
# define PRIuFAST16 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxFAST16
Packit Service a721b1
# define PRIxFAST16 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXFAST16
Packit Service a721b1
# define PRIXFAST16 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdFAST32
Packit Service a721b1
# define PRIdFAST32 "d"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiFAST32
Packit Service a721b1
# define PRIiFAST32 "i"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoFAST32
Packit Service a721b1
# define PRIoFAST32 "o"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuFAST32
Packit Service a721b1
# define PRIuFAST32 "u"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxFAST32
Packit Service a721b1
# define PRIxFAST32 "x"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXFAST32
Packit Service a721b1
# define PRIXFAST32 "X"
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdFAST64
Packit Service a721b1
# define PRIdFAST64 PRId64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiFAST64
Packit Service a721b1
# define PRIiFAST64 PRIi64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoFAST64
Packit Service a721b1
# define PRIoFAST64 PRIo64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuFAST64
Packit Service a721b1
# define PRIuFAST64 PRIu64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxFAST64
Packit Service a721b1
# define PRIxFAST64 PRIx64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXFAST64
Packit Service a721b1
# define PRIXFAST64 PRIX64
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdMAX || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdMAX
Packit Service a721b1
# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiMAX || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiMAX
Packit Service a721b1
# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoMAX || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoMAX
Packit Service a721b1
# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuMAX || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuMAX
Packit Service a721b1
# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxMAX || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxMAX
Packit Service a721b1
# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXMAX || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXMAX
Packit Service a721b1
# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIdPTR || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIdPTR
Packit Service a721b1
# define PRIdPTR \
Packit Service a721b1
  (sizeof (void *) == sizeof (long) ? "ld" : \
Packit Service a721b1
   sizeof (void *) == sizeof (int) ? "d" : \
Packit Service a721b1
   "lld")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIiPTR || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIiPTR
Packit Service a721b1
# define PRIiPTR \
Packit Service a721b1
  (sizeof (void *) == sizeof (long) ? "li" : \
Packit Service a721b1
   sizeof (void *) == sizeof (int) ? "i" : \
Packit Service a721b1
   "lli")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIoPTR || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIoPTR
Packit Service a721b1
# define PRIoPTR \
Packit Service a721b1
  (sizeof (void *) == sizeof (long) ? "lo" : \
Packit Service a721b1
   sizeof (void *) == sizeof (int) ? "o" : \
Packit Service a721b1
   "llo")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIuPTR || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIuPTR
Packit Service a721b1
# define PRIuPTR \
Packit Service a721b1
  (sizeof (void *) == sizeof (long) ? "lu" : \
Packit Service a721b1
   sizeof (void *) == sizeof (int) ? "u" : \
Packit Service a721b1
   "llu")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIxPTR || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIxPTR
Packit Service a721b1
# define PRIxPTR \
Packit Service a721b1
  (sizeof (void *) == sizeof (long) ? "lx" : \
Packit Service a721b1
   sizeof (void *) == sizeof (int) ? "x" : \
Packit Service a721b1
   "llx")
Packit Service a721b1
#endif
Packit Service a721b1
#if !defined PRIXPTR || PRI_MACROS_BROKEN
Packit Service a721b1
# undef PRIXPTR
Packit Service a721b1
# define PRIXPTR \
Packit Service a721b1
  (sizeof (void *) == sizeof (long) ? "lX" : \
Packit Service a721b1
   sizeof (void *) == sizeof (int) ? "X" : \
Packit Service a721b1
   "llX")
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* @@ end of prolog @@ */
Packit Service a721b1
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
/* Rename the non ISO C functions.  This is required by the standard
Packit Service a721b1
   because some ISO C functions will require linking with this object
Packit Service a721b1
   file and the name space must not be polluted.  */
Packit Service a721b1
# define open(name, flags)	open_not_cancel_2 (name, flags)
Packit Service a721b1
# define close(fd)		close_not_cancel_no_status (fd)
Packit Service a721b1
# define read(fd, buf, n)	read_not_cancel (fd, buf, n)
Packit Service a721b1
# define mmap(addr, len, prot, flags, fd, offset) \
Packit Service a721b1
  __mmap (addr, len, prot, flags, fd, offset)
Packit Service a721b1
# define munmap(addr, len)	__munmap (addr, len)
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* For those losing systems which don't have `alloca' we have to add
Packit Service a721b1
   some additional code emulating it.  */
Packit Service a721b1
#ifdef HAVE_ALLOCA
Packit Service a721b1
# define freea(p) /* nothing */
Packit Service a721b1
#else
Packit Service a721b1
# define alloca(n) malloc (n)
Packit Service a721b1
# define freea(p) free (p)
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
/* For systems that distinguish between text and binary I/O.
Packit Service a721b1
   O_BINARY is usually declared in <fcntl.h>. */
Packit Service a721b1
#if !defined O_BINARY && defined _O_BINARY
Packit Service a721b1
  /* For MSC-compatible compilers.  */
Packit Service a721b1
# define O_BINARY _O_BINARY
Packit Service a721b1
# define O_TEXT _O_TEXT
Packit Service a721b1
#endif
Packit Service a721b1
#ifdef __BEOS__
Packit Service a721b1
  /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect.  */
Packit Service a721b1
# undef O_BINARY
Packit Service a721b1
# undef O_TEXT
Packit Service a721b1
#endif
Packit Service a721b1
/* On reasonable systems, binary I/O is the default.  */
Packit Service a721b1
#ifndef O_BINARY
Packit Service a721b1
# define O_BINARY 0
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
/* We need a sign, whether a new catalog was loaded, which can be associated
Packit Service a721b1
   with all translations.  This is important if the translations are
Packit Service a721b1
   cached by one of GCC's features.  */
Packit Service a721b1
int _nl_msg_cat_cntr;
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
/* Expand a system dependent string segment.  Return NULL if unsupported.  */
Packit Service a721b1
static const char *
Packit Service a721b1
get_sysdep_segment_value (const char *name)
Packit Service a721b1
{
Packit Service a721b1
  /* Test for an ISO C 99 section 7.8.1 format string directive.
Packit Service a721b1
     Syntax:
Packit Service a721b1
     P R I { d | i | o | u | x | X }
Packit Service a721b1
     { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR }  */
Packit Service a721b1
  /* We don't use a table of 14 times 6 'const char *' strings here, because
Packit Service a721b1
     data relocations cost startup time.  */
Packit Service a721b1
  if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
Packit Service a721b1
    {
Packit Service a721b1
      if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
Packit Service a721b1
	  || name[3] == 'x' || name[3] == 'X')
Packit Service a721b1
	{
Packit Service a721b1
	  if (name[4] == '8' && name[5] == '\0')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[3] == 'd')
Packit Service a721b1
		return PRId8;
Packit Service a721b1
	      if (name[3] == 'i')
Packit Service a721b1
		return PRIi8;
Packit Service a721b1
	      if (name[3] == 'o')
Packit Service a721b1
		return PRIo8;
Packit Service a721b1
	      if (name[3] == 'u')
Packit Service a721b1
		return PRIu8;
Packit Service a721b1
	      if (name[3] == 'x')
Packit Service a721b1
		return PRIx8;
Packit Service a721b1
	      if (name[3] == 'X')
Packit Service a721b1
		return PRIX8;
Packit Service a721b1
	      abort ();
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[3] == 'd')
Packit Service a721b1
		return PRId16;
Packit Service a721b1
	      if (name[3] == 'i')
Packit Service a721b1
		return PRIi16;
Packit Service a721b1
	      if (name[3] == 'o')
Packit Service a721b1
		return PRIo16;
Packit Service a721b1
	      if (name[3] == 'u')
Packit Service a721b1
		return PRIu16;
Packit Service a721b1
	      if (name[3] == 'x')
Packit Service a721b1
		return PRIx16;
Packit Service a721b1
	      if (name[3] == 'X')
Packit Service a721b1
		return PRIX16;
Packit Service a721b1
	      abort ();
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[3] == 'd')
Packit Service a721b1
		return PRId32;
Packit Service a721b1
	      if (name[3] == 'i')
Packit Service a721b1
		return PRIi32;
Packit Service a721b1
	      if (name[3] == 'o')
Packit Service a721b1
		return PRIo32;
Packit Service a721b1
	      if (name[3] == 'u')
Packit Service a721b1
		return PRIu32;
Packit Service a721b1
	      if (name[3] == 'x')
Packit Service a721b1
		return PRIx32;
Packit Service a721b1
	      if (name[3] == 'X')
Packit Service a721b1
		return PRIX32;
Packit Service a721b1
	      abort ();
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[3] == 'd')
Packit Service a721b1
		return PRId64;
Packit Service a721b1
	      if (name[3] == 'i')
Packit Service a721b1
		return PRIi64;
Packit Service a721b1
	      if (name[3] == 'o')
Packit Service a721b1
		return PRIo64;
Packit Service a721b1
	      if (name[3] == 'u')
Packit Service a721b1
		return PRIu64;
Packit Service a721b1
	      if (name[3] == 'x')
Packit Service a721b1
		return PRIx64;
Packit Service a721b1
	      if (name[3] == 'X')
Packit Service a721b1
		return PRIX64;
Packit Service a721b1
	      abort ();
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
Packit Service a721b1
	      && name[7] == 'S' && name[8] == 'T')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[9] == '8' && name[10] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdLEAST8;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiLEAST8;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoLEAST8;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuLEAST8;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxLEAST8;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXLEAST8;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	      if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdLEAST16;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiLEAST16;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoLEAST16;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuLEAST16;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxLEAST16;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXLEAST16;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	      if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdLEAST32;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiLEAST32;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoLEAST32;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuLEAST32;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxLEAST32;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXLEAST32;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	      if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdLEAST64;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiLEAST64;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoLEAST64;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuLEAST64;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxLEAST64;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXLEAST64;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
Packit Service a721b1
	      && name[7] == 'T')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[8] == '8' && name[9] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdFAST8;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiFAST8;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoFAST8;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuFAST8;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxFAST8;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXFAST8;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	      if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdFAST16;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiFAST16;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoFAST16;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuFAST16;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxFAST16;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXFAST16;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	      if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdFAST32;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiFAST32;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoFAST32;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuFAST32;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxFAST32;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXFAST32;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	      if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
Packit Service a721b1
		{
Packit Service a721b1
		  if (name[3] == 'd')
Packit Service a721b1
		    return PRIdFAST64;
Packit Service a721b1
		  if (name[3] == 'i')
Packit Service a721b1
		    return PRIiFAST64;
Packit Service a721b1
		  if (name[3] == 'o')
Packit Service a721b1
		    return PRIoFAST64;
Packit Service a721b1
		  if (name[3] == 'u')
Packit Service a721b1
		    return PRIuFAST64;
Packit Service a721b1
		  if (name[3] == 'x')
Packit Service a721b1
		    return PRIxFAST64;
Packit Service a721b1
		  if (name[3] == 'X')
Packit Service a721b1
		    return PRIXFAST64;
Packit Service a721b1
		  abort ();
Packit Service a721b1
		}
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
Packit Service a721b1
	      && name[7] == '\0')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[3] == 'd')
Packit Service a721b1
		return PRIdMAX;
Packit Service a721b1
	      if (name[3] == 'i')
Packit Service a721b1
		return PRIiMAX;
Packit Service a721b1
	      if (name[3] == 'o')
Packit Service a721b1
		return PRIoMAX;
Packit Service a721b1
	      if (name[3] == 'u')
Packit Service a721b1
		return PRIuMAX;
Packit Service a721b1
	      if (name[3] == 'x')
Packit Service a721b1
		return PRIxMAX;
Packit Service a721b1
	      if (name[3] == 'X')
Packit Service a721b1
		return PRIXMAX;
Packit Service a721b1
	      abort ();
Packit Service a721b1
	    }
Packit Service a721b1
	  if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
Packit Service a721b1
	      && name[7] == '\0')
Packit Service a721b1
	    {
Packit Service a721b1
	      if (name[3] == 'd')
Packit Service a721b1
		return PRIdPTR;
Packit Service a721b1
	      if (name[3] == 'i')
Packit Service a721b1
		return PRIiPTR;
Packit Service a721b1
	      if (name[3] == 'o')
Packit Service a721b1
		return PRIoPTR;
Packit Service a721b1
	      if (name[3] == 'u')
Packit Service a721b1
		return PRIuPTR;
Packit Service a721b1
	      if (name[3] == 'x')
Packit Service a721b1
		return PRIxPTR;
Packit Service a721b1
	      if (name[3] == 'X')
Packit Service a721b1
		return PRIXPTR;
Packit Service a721b1
	      abort ();
Packit Service a721b1
	    }
Packit Service a721b1
	}
Packit Service a721b1
    }
Packit Service a721b1
  /* Test for a glibc specific printf() format directive flag.  */
Packit Service a721b1
  if (name[0] == 'I' && name[1] == '\0')
Packit Service a721b1
    {
Packit Service a721b1
#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
Packit Service a721b1
      /* The 'I' flag, in numeric format directives, replaces ASCII digits
Packit Service a721b1
	 with the 'outdigits' defined in the LC_CTYPE locale facet.  This is
Packit Service a721b1
	 used for Farsi (Persian) and maybe Arabic.  */
Packit Service a721b1
      return "I";
Packit Service a721b1
#else
Packit Service a721b1
      return "";
Packit Service a721b1
#endif
Packit Service a721b1
    }
Packit Service a721b1
  /* Other system dependent strings are not valid.  */
Packit Service a721b1
  return NULL;
Packit Service a721b1
}
Packit Service a721b1
Packit Service a721b1
/* Load the message catalogs specified by FILENAME.  If it is no valid
Packit Service a721b1
   message catalog do nothing.  */
Packit Service a721b1
void
Packit Service a721b1
internal_function
Packit Service a721b1
_nl_load_domain (struct loaded_l10nfile *domain_file,
Packit Service a721b1
		 struct binding *domainbinding)
Packit Service a721b1
{
Packit Service a721b1
  __libc_lock_define_initialized_recursive (static, lock)
Packit Service a721b1
  int fd = -1;
Packit Service a721b1
  size_t size;
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
  struct stat64 st;
Packit Service a721b1
#else
Packit Service a721b1
  struct stat st;
Packit Service a721b1
#endif
Packit Service a721b1
  struct mo_file_header *data = (struct mo_file_header *) -1;
Packit Service a721b1
  int use_mmap = 0;
Packit Service a721b1
  struct loaded_domain *domain;
Packit Service a721b1
  int revision;
Packit Service a721b1
  const char *nullentry;
Packit Service a721b1
  size_t nullentrylen;
Packit Service a721b1
Packit Service a721b1
  __libc_lock_lock_recursive (lock);
Packit Service a721b1
  if (domain_file->decided != 0)
Packit Service a721b1
    {
Packit Service a721b1
      /* There are two possibilities:
Packit Service a721b1
Packit Service a721b1
	 + this is the same thread calling again during this initialization
Packit Service a721b1
	   via _nl_find_msg.  We have initialized everything this call needs.
Packit Service a721b1
Packit Service a721b1
	 + this is another thread which tried to initialize this object.
Packit Service a721b1
	   Not necessary anymore since if the lock is available this
Packit Service a721b1
	   is finished.
Packit Service a721b1
      */
Packit Service a721b1
      goto done;
Packit Service a721b1
    }
Packit Service a721b1
Packit Service a721b1
  domain_file->decided = -1;
Packit Service a721b1
  domain_file->data = NULL;
Packit Service a721b1
Packit Service a721b1
  /* Note that it would be useless to store domainbinding in domain_file
Packit Service a721b1
     because domainbinding might be == NULL now but != NULL later (after
Packit Service a721b1
     a call to bind_textdomain_codeset).  */
Packit Service a721b1
Packit Service a721b1
  /* If the record does not represent a valid locale the FILENAME
Packit Service a721b1
     might be NULL.  This can happen when according to the given
Packit Service a721b1
     specification the locale file name is different for XPG and CEN
Packit Service a721b1
     syntax.  */
Packit Service a721b1
  if (domain_file->filename == NULL)
Packit Service a721b1
    goto out;
Packit Service a721b1
Packit Service a721b1
  /* Try to open the addressed file.  */
Packit Service a721b1
  fd = open (domain_file->filename, O_RDONLY | O_BINARY);
Packit Service a721b1
  if (fd == -1)
Packit Service a721b1
    goto out;
Packit Service a721b1
Packit Service a721b1
  /* We must know about the size of the file.  */
Packit Service a721b1
  if (
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
      __builtin_expect (fstat64 (fd, &st) != 0, 0)
Packit Service a721b1
#else
Packit Service a721b1
      __builtin_expect (fstat (fd, &st) != 0, 0)
Packit Service a721b1
#endif
Packit Service a721b1
      || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
Packit Service a721b1
      || __builtin_expect (size < sizeof (struct mo_file_header), 0))
Packit Service a721b1
    /* Something went wrong.  */
Packit Service a721b1
    goto out;
Packit Service a721b1
Packit Service a721b1
#ifdef HAVE_MMAP
Packit Service a721b1
  /* Now we are ready to load the file.  If mmap() is available we try
Packit Service a721b1
     this first.  If not available or it failed we try to load it.  */
Packit Service a721b1
  data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
Packit Service a721b1
					 MAP_PRIVATE, fd, 0);
Packit Service a721b1
Packit Service a721b1
  if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
Packit Service a721b1
    {
Packit Service a721b1
      /* mmap() call was successful.  */
Packit Service a721b1
      close (fd);
Packit Service a721b1
      fd = -1;
Packit Service a721b1
      use_mmap = 1;
Packit Service a721b1
    }
Packit Service a721b1
#endif
Packit Service a721b1
Packit Service a721b1
  /* If the data is not yet available (i.e. mmap'ed) we try to load
Packit Service a721b1
     it manually.  */
Packit Service a721b1
  if (data == (struct mo_file_header *) -1)
Packit Service a721b1
    {
Packit Service a721b1
      size_t to_read;
Packit Service a721b1
      char *read_ptr;
Packit Service a721b1
Packit Service a721b1
      data = (struct mo_file_header *) malloc (size);
Packit Service a721b1
      if (data == NULL)
Packit Service a721b1
	goto out;
Packit Service a721b1
Packit Service a721b1
      to_read = size;
Packit Service a721b1
      read_ptr = (char *) data;
Packit Service a721b1
      do
Packit Service a721b1
	{
Packit Service a721b1
	  long int nb = (long int) read (fd, read_ptr, to_read);
Packit Service a721b1
	  if (nb <= 0)
Packit Service a721b1
	    {
Packit Service a721b1
#ifdef EINTR
Packit Service a721b1
	      if (nb == -1 && errno == EINTR)
Packit Service a721b1
		continue;
Packit Service a721b1
#endif
Packit Service a721b1
	      goto out;
Packit Service a721b1
	    }
Packit Service a721b1
	  read_ptr += nb;
Packit Service a721b1
	  to_read -= nb;
Packit Service a721b1
	}
Packit Service a721b1
      while (to_read > 0);
Packit Service a721b1
Packit Service a721b1
      close (fd);
Packit Service a721b1
      fd = -1;
Packit Service a721b1
    }
Packit Service a721b1
Packit Service a721b1
  /* Using the magic number we can test whether it really is a message
Packit Service a721b1
     catalog file.  */
Packit Service a721b1
  if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
Packit Service a721b1
			0))
Packit Service a721b1
    {
Packit Service a721b1
      /* The magic number is wrong: not a message catalog file.  */
Packit Service a721b1
#ifdef HAVE_MMAP
Packit Service a721b1
      if (use_mmap)
Packit Service a721b1
	munmap ((caddr_t) data, size);
Packit Service a721b1
      else
Packit Service a721b1
#endif
Packit Service a721b1
	free (data);
Packit Service a721b1
      goto out;
Packit Service a721b1
    }
Packit Service a721b1
Packit Service a721b1
  domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
Packit Service a721b1
  if (domain == NULL)
Packit Service a721b1
    goto out;
Packit Service a721b1
  domain_file->data = domain;
Packit Service a721b1
Packit Service a721b1
  domain->data = (char *) data;
Packit Service a721b1
  domain->use_mmap = use_mmap;
Packit Service a721b1
  domain->mmap_size = size;
Packit Service a721b1
  domain->must_swap = data->magic != _MAGIC;
Packit Service a721b1
  domain->malloced = NULL;
Packit Service a721b1
Packit Service a721b1
  /* Fill in the information about the available tables.  */
Packit Service a721b1
  revision = W (domain->must_swap, data->revision);
Packit Service a721b1
  /* We support only the major revisions 0 and 1.  */
Packit Service a721b1
  switch (revision >> 16)
Packit Service a721b1
    {
Packit Service a721b1
    case 0:
Packit Service a721b1
    case 1:
Packit Service a721b1
      domain->nstrings = W (domain->must_swap, data->nstrings);
Packit Service a721b1
      domain->orig_tab = (const struct string_desc *)
Packit Service a721b1
	((char *) data + W (domain->must_swap, data->orig_tab_offset));
Packit Service a721b1
      domain->trans_tab = (const struct string_desc *)
Packit Service a721b1
	((char *) data + W (domain->must_swap, data->trans_tab_offset));
Packit Service a721b1
      domain->hash_size = W (domain->must_swap, data->hash_tab_size);
Packit Service a721b1
      domain->hash_tab =
Packit Service a721b1
	(domain->hash_size > 2
Packit Service a721b1
	 ? (const nls_uint32 *)
Packit Service a721b1
	   ((char *) data + W (domain->must_swap, data->hash_tab_offset))
Packit Service a721b1
	 : NULL);
Packit Service a721b1
      domain->must_swap_hash_tab = domain->must_swap;
Packit Service a721b1
Packit Service a721b1
      /* Now dispatch on the minor revision.  */
Packit Service a721b1
      switch (revision & 0xffff)
Packit Service a721b1
	{
Packit Service a721b1
	case 0:
Packit Service a721b1
	  domain->n_sysdep_strings = 0;
Packit Service a721b1
	  domain->orig_sysdep_tab = NULL;
Packit Service a721b1
	  domain->trans_sysdep_tab = NULL;
Packit Service a721b1
	  break;
Packit Service a721b1
	case 1:
Packit Service a721b1
	default:
Packit Service a721b1
	  {
Packit Service a721b1
	    nls_uint32 n_sysdep_strings;
Packit Service a721b1
Packit Service a721b1
	    if (domain->hash_tab == NULL)
Packit Service a721b1
	      /* This is invalid.  These minor revisions need a hash table.  */
Packit Service a721b1
	      goto invalid;
Packit Service a721b1
Packit Service a721b1
	    n_sysdep_strings =
Packit Service a721b1
	      W (domain->must_swap, data->n_sysdep_strings);
Packit Service a721b1
	    if (n_sysdep_strings > 0)
Packit Service a721b1
	      {
Packit Service a721b1
		nls_uint32 n_sysdep_segments;
Packit Service a721b1
		const struct sysdep_segment *sysdep_segments;
Packit Service a721b1
		const char **sysdep_segment_values;
Packit Service a721b1
		const nls_uint32 *orig_sysdep_tab;
Packit Service a721b1
		const nls_uint32 *trans_sysdep_tab;
Packit Service a721b1
		nls_uint32 n_inmem_sysdep_strings;
Packit Service a721b1
		size_t memneed;
Packit Service a721b1
		char *mem;
Packit Service a721b1
		struct sysdep_string_desc *inmem_orig_sysdep_tab;
Packit Service a721b1
		struct sysdep_string_desc *inmem_trans_sysdep_tab;
Packit Service a721b1
		nls_uint32 *inmem_hash_tab;
Packit Service a721b1
		unsigned int i, j;
Packit Service a721b1
Packit Service a721b1
		/* Get the values of the system dependent segments.  */
Packit Service a721b1
		n_sysdep_segments =
Packit Service a721b1
		  W (domain->must_swap, data->n_sysdep_segments);
Packit Service a721b1
		sysdep_segments = (const struct sysdep_segment *)
Packit Service a721b1
		  ((char *) data
Packit Service a721b1
		   + W (domain->must_swap, data->sysdep_segments_offset));
Packit Service a721b1
		sysdep_segment_values =
Packit Service a721b1
		  (const char **)
Packit Service a721b1
		  alloca (n_sysdep_segments * sizeof (const char *));
Packit Service a721b1
		for (i = 0; i < n_sysdep_segments; i++)
Packit Service a721b1
		  {
Packit Service a721b1
		    const char *name =
Packit Service a721b1
		      (char *) data
Packit Service a721b1
		      + W (domain->must_swap, sysdep_segments[i].offset);
Packit Service a721b1
		    nls_uint32 namelen =
Packit Service a721b1
		      W (domain->must_swap, sysdep_segments[i].length);
Packit Service a721b1
Packit Service a721b1
		    if (!(namelen > 0 && name[namelen - 1] == '\0'))
Packit Service a721b1
		      {
Packit Service a721b1
			freea (sysdep_segment_values);
Packit Service a721b1
			goto invalid;
Packit Service a721b1
		      }
Packit Service a721b1
Packit Service a721b1
		    sysdep_segment_values[i] = get_sysdep_segment_value (name);
Packit Service a721b1
		  }
Packit Service a721b1
Packit Service a721b1
		orig_sysdep_tab = (const nls_uint32 *)
Packit Service a721b1
		  ((char *) data
Packit Service a721b1
		   + W (domain->must_swap, data->orig_sysdep_tab_offset));
Packit Service a721b1
		trans_sysdep_tab = (const nls_uint32 *)
Packit Service a721b1
		  ((char *) data
Packit Service a721b1
		   + W (domain->must_swap, data->trans_sysdep_tab_offset));
Packit Service a721b1
Packit Service a721b1
		/* Compute the amount of additional memory needed for the
Packit Service a721b1
		   system dependent strings and the augmented hash table.
Packit Service a721b1
		   At the same time, also drop string pairs which refer to
Packit Service a721b1
		   an undefined system dependent segment.  */
Packit Service a721b1
		n_inmem_sysdep_strings = 0;
Packit Service a721b1
		memneed = domain->hash_size * sizeof (nls_uint32);
Packit Service a721b1
		for (i = 0; i < n_sysdep_strings; i++)
Packit Service a721b1
		  {
Packit Service a721b1
		    int valid = 1;
Packit Service a721b1
		    size_t needs[2];
Packit Service a721b1
Packit Service a721b1
		    for (j = 0; j < 2; j++)
Packit Service a721b1
		      {
Packit Service a721b1
			const struct sysdep_string *sysdep_string =
Packit Service a721b1
			  (const struct sysdep_string *)
Packit Service a721b1
			  ((char *) data
Packit Service a721b1
			   + W (domain->must_swap,
Packit Service a721b1
				j == 0
Packit Service a721b1
				? orig_sysdep_tab[i]
Packit Service a721b1
				: trans_sysdep_tab[i]));
Packit Service a721b1
			size_t need = 0;
Packit Service a721b1
			const struct segment_pair *p = sysdep_string->segments;
Packit Service a721b1
Packit Service a721b1
			if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
Packit Service a721b1
			  for (p = sysdep_string->segments;; p++)
Packit Service a721b1
			    {
Packit Service a721b1
			      nls_uint32 sysdepref;
Packit Service a721b1
Packit Service a721b1
			      need += W (domain->must_swap, p->segsize);
Packit Service a721b1
Packit Service a721b1
			      sysdepref = W (domain->must_swap, p->sysdepref);
Packit Service a721b1
			      if (sysdepref == SEGMENTS_END)
Packit Service a721b1
				break;
Packit Service a721b1
Packit Service a721b1
			      if (sysdepref >= n_sysdep_segments)
Packit Service a721b1
				{
Packit Service a721b1
				  /* Invalid.  */
Packit Service a721b1
				  freea (sysdep_segment_values);
Packit Service a721b1
				  goto invalid;
Packit Service a721b1
				}
Packit Service a721b1
Packit Service a721b1
			      if (sysdep_segment_values[sysdepref] == NULL)
Packit Service a721b1
				{
Packit Service a721b1
				  /* This particular string pair is invalid.  */
Packit Service a721b1
				  valid = 0;
Packit Service a721b1
				  break;
Packit Service a721b1
				}
Packit Service a721b1
Packit Service a721b1
			      need += strlen (sysdep_segment_values[sysdepref]);
Packit Service a721b1
			    }
Packit Service a721b1
Packit Service a721b1
			needs[j] = need;
Packit Service a721b1
			if (!valid)
Packit Service a721b1
			  break;
Packit Service a721b1
		      }
Packit Service a721b1
Packit Service a721b1
		    if (valid)
Packit Service a721b1
		      {
Packit Service a721b1
			n_inmem_sysdep_strings++;
Packit Service a721b1
			memneed += needs[0] + needs[1];
Packit Service a721b1
		      }
Packit Service a721b1
		  }
Packit Service a721b1
		memneed += 2 * n_inmem_sysdep_strings
Packit Service a721b1
			   * sizeof (struct sysdep_string_desc);
Packit Service a721b1
Packit Service a721b1
		if (n_inmem_sysdep_strings > 0)
Packit Service a721b1
		  {
Packit Service a721b1
		    unsigned int k;
Packit Service a721b1
Packit Service a721b1
		    /* Allocate additional memory.  */
Packit Service a721b1
		    mem = (char *) malloc (memneed);
Packit Service a721b1
		    if (mem == NULL)
Packit Service a721b1
		      goto invalid;
Packit Service a721b1
Packit Service a721b1
		    domain->malloced = mem;
Packit Service a721b1
		    inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
Packit Service a721b1
		    mem += n_inmem_sysdep_strings
Packit Service a721b1
			   * sizeof (struct sysdep_string_desc);
Packit Service a721b1
		    inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
Packit Service a721b1
		    mem += n_inmem_sysdep_strings
Packit Service a721b1
			   * sizeof (struct sysdep_string_desc);
Packit Service a721b1
		    inmem_hash_tab = (nls_uint32 *) mem;
Packit Service a721b1
		    mem += domain->hash_size * sizeof (nls_uint32);
Packit Service a721b1
Packit Service a721b1
		    /* Compute the system dependent strings.  */
Packit Service a721b1
		    k = 0;
Packit Service a721b1
		    for (i = 0; i < n_sysdep_strings; i++)
Packit Service a721b1
		      {
Packit Service a721b1
			int valid = 1;
Packit Service a721b1
Packit Service a721b1
			for (j = 0; j < 2; j++)
Packit Service a721b1
			  {
Packit Service a721b1
			    const struct sysdep_string *sysdep_string =
Packit Service a721b1
			      (const struct sysdep_string *)
Packit Service a721b1
			      ((char *) data
Packit Service a721b1
			       + W (domain->must_swap,
Packit Service a721b1
				    j == 0
Packit Service a721b1
				    ? orig_sysdep_tab[i]
Packit Service a721b1
				    : trans_sysdep_tab[i]));
Packit Service a721b1
			    const struct segment_pair *p =
Packit Service a721b1
			      sysdep_string->segments;
Packit Service a721b1
Packit Service a721b1
			    if (W (domain->must_swap, p->sysdepref)
Packit Service a721b1
				!= SEGMENTS_END)
Packit Service a721b1
			      for (p = sysdep_string->segments;; p++)
Packit Service a721b1
				{
Packit Service a721b1
				  nls_uint32 sysdepref;
Packit Service a721b1
Packit Service a721b1
				  sysdepref =
Packit Service a721b1
				    W (domain->must_swap, p->sysdepref);
Packit Service a721b1
				  if (sysdepref == SEGMENTS_END)
Packit Service a721b1
				    break;
Packit Service a721b1
Packit Service a721b1
				  if (sysdep_segment_values[sysdepref] == NULL)
Packit Service a721b1
				    {
Packit Service a721b1
				      /* This particular string pair is
Packit Service a721b1
					 invalid.  */
Packit Service a721b1
				      valid = 0;
Packit Service a721b1
				      break;
Packit Service a721b1
				    }
Packit Service a721b1
				}
Packit Service a721b1
Packit Service a721b1
			    if (!valid)
Packit Service a721b1
			      break;
Packit Service a721b1
			  }
Packit Service a721b1
Packit Service a721b1
			if (valid)
Packit Service a721b1
			  {
Packit Service a721b1
			    for (j = 0; j < 2; j++)
Packit Service a721b1
			      {
Packit Service a721b1
				const struct sysdep_string *sysdep_string =
Packit Service a721b1
				  (const struct sysdep_string *)
Packit Service a721b1
				  ((char *) data
Packit Service a721b1
				   + W (domain->must_swap,
Packit Service a721b1
					j == 0
Packit Service a721b1
					? orig_sysdep_tab[i]
Packit Service a721b1
					: trans_sysdep_tab[i]));
Packit Service a721b1
				const char *static_segments =
Packit Service a721b1
				  (char *) data
Packit Service a721b1
				  + W (domain->must_swap, sysdep_string->offset);
Packit Service a721b1
				const struct segment_pair *p =
Packit Service a721b1
				  sysdep_string->segments;
Packit Service a721b1
Packit Service a721b1
				/* Concatenate the segments, and fill
Packit Service a721b1
				   inmem_orig_sysdep_tab[k] (for j == 0) and
Packit Service a721b1
				   inmem_trans_sysdep_tab[k] (for j == 1).  */
Packit Service a721b1
Packit Service a721b1
				struct sysdep_string_desc *inmem_tab_entry =
Packit Service a721b1
				  (j == 0
Packit Service a721b1
				   ? inmem_orig_sysdep_tab
Packit Service a721b1
				   : inmem_trans_sysdep_tab)
Packit Service a721b1
				  + k;
Packit Service a721b1
Packit Service a721b1
				if (W (domain->must_swap, p->sysdepref)
Packit Service a721b1
				    == SEGMENTS_END)
Packit Service a721b1
				  {
Packit Service a721b1
				    /* Only one static segment.  */
Packit Service a721b1
				    inmem_tab_entry->length =
Packit Service a721b1
				      W (domain->must_swap, p->segsize);
Packit Service a721b1
				    inmem_tab_entry->pointer = static_segments;
Packit Service a721b1
				  }
Packit Service a721b1
				else
Packit Service a721b1
				  {
Packit Service a721b1
				    inmem_tab_entry->pointer = mem;
Packit Service a721b1
Packit Service a721b1
				    for (p = sysdep_string->segments;; p++)
Packit Service a721b1
				      {
Packit Service a721b1
					nls_uint32 segsize =
Packit Service a721b1
					  W (domain->must_swap, p->segsize);
Packit Service a721b1
					nls_uint32 sysdepref =
Packit Service a721b1
					  W (domain->must_swap, p->sysdepref);
Packit Service a721b1
					size_t n;
Packit Service a721b1
Packit Service a721b1
					if (segsize > 0)
Packit Service a721b1
					  {
Packit Service a721b1
					    memcpy (mem, static_segments, segsize);
Packit Service a721b1
					    mem += segsize;
Packit Service a721b1
					    static_segments += segsize;
Packit Service a721b1
					  }
Packit Service a721b1
Packit Service a721b1
					if (sysdepref == SEGMENTS_END)
Packit Service a721b1
					  break;
Packit Service a721b1
Packit Service a721b1
					n = strlen (sysdep_segment_values[sysdepref]);
Packit Service a721b1
					memcpy (mem, sysdep_segment_values[sysdepref], n);
Packit Service a721b1
					mem += n;
Packit Service a721b1
				      }
Packit Service a721b1
Packit Service a721b1
				    inmem_tab_entry->length =
Packit Service a721b1
				      mem - inmem_tab_entry->pointer;
Packit Service a721b1
				  }
Packit Service a721b1
			      }
Packit Service a721b1
Packit Service a721b1
			    k++;
Packit Service a721b1
			  }
Packit Service a721b1
		      }
Packit Service a721b1
		    if (k != n_inmem_sysdep_strings)
Packit Service a721b1
		      abort ();
Packit Service a721b1
Packit Service a721b1
		    /* Compute the augmented hash table.  */
Packit Service a721b1
		    for (i = 0; i < domain->hash_size; i++)
Packit Service a721b1
		      inmem_hash_tab[i] =
Packit Service a721b1
			W (domain->must_swap_hash_tab, domain->hash_tab[i]);
Packit Service a721b1
		    for (i = 0; i < n_inmem_sysdep_strings; i++)
Packit Service a721b1
		      {
Packit Service a721b1
			const char *msgid = inmem_orig_sysdep_tab[i].pointer;
Packit Service a721b1
			nls_uint32 hash_val = __hash_string (msgid);
Packit Service a721b1
			nls_uint32 idx = hash_val % domain->hash_size;
Packit Service a721b1
			nls_uint32 incr =
Packit Service a721b1
			  1 + (hash_val % (domain->hash_size - 2));
Packit Service a721b1
Packit Service a721b1
			for (;;)
Packit Service a721b1
			  {
Packit Service a721b1
			    if (inmem_hash_tab[idx] == 0)
Packit Service a721b1
			      {
Packit Service a721b1
				/* Hash table entry is empty.  Use it.  */
Packit Service a721b1
				inmem_hash_tab[idx] = 1 + domain->nstrings + i;
Packit Service a721b1
				break;
Packit Service a721b1
			      }
Packit Service a721b1
Packit Service a721b1
			    if (idx >= domain->hash_size - incr)
Packit Service a721b1
			      idx -= domain->hash_size - incr;
Packit Service a721b1
			    else
Packit Service a721b1
			      idx += incr;
Packit Service a721b1
			  }
Packit Service a721b1
		      }
Packit Service a721b1
Packit Service a721b1
		    domain->n_sysdep_strings = n_inmem_sysdep_strings;
Packit Service a721b1
		    domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
Packit Service a721b1
		    domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
Packit Service a721b1
Packit Service a721b1
		    domain->hash_tab = inmem_hash_tab;
Packit Service a721b1
		    domain->must_swap_hash_tab = 0;
Packit Service a721b1
		  }
Packit Service a721b1
		else
Packit Service a721b1
		  {
Packit Service a721b1
		    domain->n_sysdep_strings = 0;
Packit Service a721b1
		    domain->orig_sysdep_tab = NULL;
Packit Service a721b1
		    domain->trans_sysdep_tab = NULL;
Packit Service a721b1
		  }
Packit Service a721b1
Packit Service a721b1
		freea (sysdep_segment_values);
Packit Service a721b1
	      }
Packit Service a721b1
	    else
Packit Service a721b1
	      {
Packit Service a721b1
		domain->n_sysdep_strings = 0;
Packit Service a721b1
		domain->orig_sysdep_tab = NULL;
Packit Service a721b1
		domain->trans_sysdep_tab = NULL;
Packit Service a721b1
	      }
Packit Service a721b1
	  }
Packit Service a721b1
	  break;
Packit Service a721b1
	}
Packit Service a721b1
      break;
Packit Service a721b1
    default:
Packit Service a721b1
      /* This is an invalid revision.  */
Packit Service a721b1
    invalid:
Packit Service a721b1
      /* This is an invalid .mo file.  */
Packit Service a721b1
      if (domain->malloced)
Packit Service a721b1
	free (domain->malloced);
Packit Service a721b1
#ifdef HAVE_MMAP
Packit Service a721b1
      if (use_mmap)
Packit Service a721b1
	munmap ((caddr_t) data, size);
Packit Service a721b1
      else
Packit Service a721b1
#endif
Packit Service a721b1
	free (data);
Packit Service a721b1
      free (domain);
Packit Service a721b1
      domain_file->data = NULL;
Packit Service a721b1
      goto out;
Packit Service a721b1
    }
Packit Service a721b1
Packit Service a721b1
  /* No caches of converted translations so far.  */
Packit Service a721b1
  domain->conversions = NULL;
Packit Service a721b1
  domain->nconversions = 0;
Packit Service a721b1
  gl_rwlock_init (domain->conversions_lock);
Packit Service a721b1
Packit Service a721b1
  /* Get the header entry and look for a plural specification.  */
Packit Service a721b1
#ifdef IN_LIBGLOCALE
Packit Service a721b1
  nullentry =
Packit Service a721b1
    _nl_find_msg (domain_file, domainbinding, NULL, "", &nullentrylen);
Packit Service a721b1
#else
Packit Service a721b1
  nullentry = _nl_find_msg (domain_file, domainbinding, "", 0, &nullentrylen);
Packit Service a721b1
#endif
Packit Service a721b1
  EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
Packit Service a721b1
Packit Service a721b1
 out:
Packit Service a721b1
  if (fd != -1)
Packit Service a721b1
    close (fd);
Packit Service a721b1
Packit Service a721b1
  domain_file->decided = 1;
Packit Service a721b1
Packit Service a721b1
 done:
Packit Service a721b1
  __libc_lock_unlock_recursive (lock);
Packit Service a721b1
}
Packit Service a721b1
Packit Service a721b1
Packit Service a721b1
#ifdef _LIBC
Packit Service a721b1
void
Packit Service a721b1
internal_function __libc_freeres_fn_section
Packit Service a721b1
_nl_unload_domain (struct loaded_domain *domain)
Packit Service a721b1
{
Packit Service a721b1
  size_t i;
Packit Service a721b1
Packit Service a721b1
  if (domain->plural != &__gettext_germanic_plural)
Packit Service a721b1
    __gettext_free_exp ((struct expression *) domain->plural);
Packit Service a721b1
Packit Service a721b1
  for (i = 0; i < domain->nconversions; i++)
Packit Service a721b1
    {
Packit Service a721b1
      struct converted_domain *convd = &domain->conversions[i];
Packit Service a721b1
Packit Service a721b1
      free (convd->encoding);
Packit Service a721b1
      if (convd->conv_tab != NULL && convd->conv_tab != (char **) -1)
Packit Service a721b1
	free (convd->conv_tab);
Packit Service a721b1
      if (convd->conv != (__gconv_t) -1)
Packit Service a721b1
	__gconv_close (convd->conv);
Packit Service a721b1
    }
Packit Service a721b1
  if (domain->conversions != NULL)
Packit Service a721b1
    free (domain->conversions);
Packit Service a721b1
  __libc_rwlock_fini (domain->conversions_lock);
Packit Service a721b1
Packit Service a721b1
  if (domain->malloced)
Packit Service a721b1
    free (domain->malloced);
Packit Service a721b1
Packit Service a721b1
# ifdef _POSIX_MAPPED_FILES
Packit Service a721b1
  if (domain->use_mmap)
Packit Service a721b1
    munmap ((caddr_t) domain->data, domain->mmap_size);
Packit Service a721b1
  else
Packit Service a721b1
# endif	/* _POSIX_MAPPED_FILES */
Packit Service a721b1
    free ((void *) domain->data);
Packit Service a721b1
Packit Service a721b1
  free (domain);
Packit Service a721b1
}
Packit Service a721b1
#endif