1 /* Internal header for GNU gettext internationalization functions.
2 Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
23 #if HAVE_LIMITS_H || _LIBC
27 /* @@ end of prolog @@ */
29 /* The magic number of the GNU message catalog format. */
30 #define _MAGIC 0x950412de
31 #define _MAGIC_SWAPPED 0xde120495
33 /* Revision number of the currently used .mo (binary) file format. */
34 #define MO_REVISION_NUMBER 0
36 /* The following contortions are an attempt to use the C preprocessor
37 to determine an unsigned integral type that is 32 bits wide. An
38 alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
39 as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
40 when cross-compiling. */
43 # define UINT_MAX_32_BITS 4294967295U
45 # define UINT_MAX_32_BITS 0xFFFFFFFF
48 /* If UINT_MAX isn't defined, assume it's a 32-bit type.
49 This should be valid for all systems GNU cares about because
50 that doesn't include 16-bit systems, and only modern systems
51 (that certainly have <limits.h>) have 64+-bit integral types. */
54 # define UINT_MAX UINT_MAX_32_BITS
57 #if UINT_MAX == UINT_MAX_32_BITS
58 typedef unsigned nls_uint32
;
60 # if USHRT_MAX == UINT_MAX_32_BITS
61 typedef unsigned short nls_uint32
;
63 # if ULONG_MAX == UINT_MAX_32_BITS
64 typedef unsigned long nls_uint32
;
66 /* The following line is intended to throw an error. Using #error is
67 not portable enough. */
68 "Cannot determine unsigned 32-bit data type."
74 /* Header for binary .mo file format. */
77 /* The magic number. */
79 /* The revision number of the file format. */
81 /* The number of strings pairs. */
83 /* Offset of table with start offsets of original strings. */
84 nls_uint32 orig_tab_offset
;
85 /* Offset of table with start offsets of translation strings. */
86 nls_uint32 trans_tab_offset
;
87 /* Size of hashing table. */
88 nls_uint32 hash_tab_size
;
89 /* Offset of first hashing entry. */
90 nls_uint32 hash_tab_offset
;
95 /* Length of addressed string. */
97 /* Offset of string in file. */
101 /* @@ begin of epilog @@ */
103 #endif /* gettext.h */