Updating to version 1.13. Libgcrypt depends on libgpg-error
[platform/upstream/libgpg-error.git] / src / init.h
1 /* init.h - Declarations for init.c
2    Copyright (C) 2010 g10 Code GmbH
3
4    This file is part of libgpg-error.
5
6    libgpg-error is free software; you can redistribute it and/or
7    modify it under the terms of the GNU Lesser General Public License
8    as published by the Free Software Foundation; either version 2.1 of
9    the License, or (at your option) any later version.
10  
11    libgpg-error is distributed in the hope that it will be useful, but
12    WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14    Lesser General Public License for more details.
15  
16    You should have received a copy of the GNU Lesser General Public
17    License along with this program; if not, see <http://www.gnu.org/licenses/>.
18  */
19
20 #ifndef INIT_H
21 #define INIT_H
22
23 #if HAVE_W32_SYSTEM
24
25 /* Forward declaration - defined in w32-gettext.c.  */
26 struct loaded_domain;
27
28 /* An item for a linked list of loaded domains. */
29 struct domainlist_s
30 {
31   struct domainlist_s *next;
32   char *dname;                   /* Directory name for the mo file.   */
33   char *fname;                   /* File name for the MO file.  */
34   int load_failed;               /* True if loading the domain failed. */
35   struct loaded_domain *domain;  /* NULL if not loaded.  Never changed
36                                     once set to non-NULL. */
37   char name[1];                  /* Name of the domain.  Never changed
38                                     once set. */
39 };
40
41
42
43 /* 119 bytes for an error message should be enough.  With this size we
44    can assume that the allocation does not take up more than 128 bytes
45    per thread.  Note that this is only used for W32CE.  */
46 #define STRBUFFER_SIZE 120
47
48 /* The TLS space definition. */
49 struct tls_space_s
50 {
51   /* Flag used by w32-gettext.  */
52   int gt_use_utf8;
53   
54 #ifdef HAVE_W32CE_SYSTEM
55   char strerror_buffer[STRBUFFER_SIZE];
56 #endif
57 };
58
59 /* Return the TLS.  */
60 struct tls_space_s *get_tls (void);
61
62
63 /* Explicit constructor for w32-gettext.c  */
64 #ifndef DLL_EXPORT
65 void _gpg_w32__init_gettext_module (void);
66 #endif
67
68 #endif /*HAVE_W32_SYSTEM*/
69
70 #endif /*INIT_H*/