LCOV - code coverage report
Current view: top level - usr/include - gpg-error.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 3 10 30.0 %
Date: 2015-11-05 17:10:59 Functions: 1 4 25.0 %

          Line data    Source code
       1             : /* gpg-error.h - Public interface to libgpg-error.               -*- c -*-
       2             :    Copyright (C) 2003, 2004, 2010, 2013, 2014, 2015 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             :    Do not edit.  Generated from gpg-error.h.in for:
      20             :                  x86_64-pc-linux-gnu
      21             :  */
      22             : 
      23             : 
      24             : #ifndef GPG_ERROR_H
      25             : #define GPG_ERROR_H     1
      26             : 
      27             : #include <stddef.h>
      28             : #include <stdio.h>
      29             : #include <stdarg.h>
      30             : 
      31             : #ifdef __GNUC__
      32             : #define GPG_ERR_INLINE __inline__
      33             : #elif _MSC_VER >= 1300
      34             : #define GPG_ERR_INLINE __inline
      35             : #elif __STDC_VERSION__ >= 199901L
      36             : #define GPG_ERR_INLINE inline
      37             : #else
      38             : #ifndef GPG_ERR_INLINE
      39             : #define GPG_ERR_INLINE
      40             : #endif
      41             : #endif
      42             : 
      43             : #ifdef __cplusplus
      44             : extern "C" {
      45             : #if 0 /* just to make Emacs auto-indent happy */
      46             : }
      47             : #endif
      48             : #endif /* __cplusplus */
      49             : 
      50             : /* The GnuPG project consists of many components.  Error codes are
      51             :    exchanged between all components.  The common error codes and their
      52             :    user-presentable descriptions are kept into a shared library to
      53             :    allow adding new error codes and components without recompiling any
      54             :    of the other components.  The interface will not change in a
      55             :    backward incompatible way.
      56             : 
      57             :    An error code together with an error source build up an error
      58             :    value.  As the error value is been passed from one component to
      59             :    another, it preserver the information about the source and nature
      60             :    of the error.
      61             : 
      62             :    A component of the GnuPG project can define the following macros to
      63             :    tune the behaviour of the library:
      64             : 
      65             :    GPG_ERR_SOURCE_DEFAULT: Define to an error source of type
      66             :    gpg_err_source_t to make that source the default for gpg_error().
      67             :    Otherwise GPG_ERR_SOURCE_UNKNOWN is used as default.
      68             : 
      69             :    GPG_ERR_ENABLE_GETTEXT_MACROS: Define to provide macros to map the
      70             :    internal gettext API to standard names.  This has only an effect on
      71             :    Windows platforms.
      72             : 
      73             :    GPGRT_ENABLE_ES_MACROS: Define to provide "es_" macros for the
      74             :    estream functions.
      75             : 
      76             :    In addition to the error codes, Libgpg-error also provides a set of
      77             :    functions used by most GnuPG components.  */
      78             : 
      79             : 
      80             : /* The error source type gpg_err_source_t.
      81             : 
      82             :    Where as the Poo out of a welle small
      83             :    Taketh his firste springing and his sours.
      84             :                                         --Chaucer.  */
      85             : 
      86             : /* Only use free slots, never change or reorder the existing
      87             :    entries.  */
      88             : typedef enum
      89             :   {
      90             :     GPG_ERR_SOURCE_UNKNOWN = 0,
      91             :     GPG_ERR_SOURCE_GCRYPT = 1,
      92             :     GPG_ERR_SOURCE_GPG = 2,
      93             :     GPG_ERR_SOURCE_GPGSM = 3,
      94             :     GPG_ERR_SOURCE_GPGAGENT = 4,
      95             :     GPG_ERR_SOURCE_PINENTRY = 5,
      96             :     GPG_ERR_SOURCE_SCD = 6,
      97             :     GPG_ERR_SOURCE_GPGME = 7,
      98             :     GPG_ERR_SOURCE_KEYBOX = 8,
      99             :     GPG_ERR_SOURCE_KSBA = 9,
     100             :     GPG_ERR_SOURCE_DIRMNGR = 10,
     101             :     GPG_ERR_SOURCE_GSTI = 11,
     102             :     GPG_ERR_SOURCE_GPA = 12,
     103             :     GPG_ERR_SOURCE_KLEO = 13,
     104             :     GPG_ERR_SOURCE_G13 = 14,
     105             :     GPG_ERR_SOURCE_ASSUAN = 15,
     106             :     GPG_ERR_SOURCE_TLS = 17,
     107             :     GPG_ERR_SOURCE_ANY = 31,
     108             :     GPG_ERR_SOURCE_USER_1 = 32,
     109             :     GPG_ERR_SOURCE_USER_2 = 33,
     110             :     GPG_ERR_SOURCE_USER_3 = 34,
     111             :     GPG_ERR_SOURCE_USER_4 = 35,
     112             : 
     113             :     /* This is one more than the largest allowed entry.  */
     114             :     GPG_ERR_SOURCE_DIM = 128
     115             :   } gpg_err_source_t;
     116             : 
     117             : 
     118             : /* The error code type gpg_err_code_t.  */
     119             : 
     120             : /* Only use free slots, never change or reorder the existing
     121             :    entries.  */
     122             : typedef enum
     123             :   {
     124             :     GPG_ERR_NO_ERROR = 0,
     125             :     GPG_ERR_GENERAL = 1,
     126             :     GPG_ERR_UNKNOWN_PACKET = 2,
     127             :     GPG_ERR_UNKNOWN_VERSION = 3,
     128             :     GPG_ERR_PUBKEY_ALGO = 4,
     129             :     GPG_ERR_DIGEST_ALGO = 5,
     130             :     GPG_ERR_BAD_PUBKEY = 6,
     131             :     GPG_ERR_BAD_SECKEY = 7,
     132             :     GPG_ERR_BAD_SIGNATURE = 8,
     133             :     GPG_ERR_NO_PUBKEY = 9,
     134             :     GPG_ERR_CHECKSUM = 10,
     135             :     GPG_ERR_BAD_PASSPHRASE = 11,
     136             :     GPG_ERR_CIPHER_ALGO = 12,
     137             :     GPG_ERR_KEYRING_OPEN = 13,
     138             :     GPG_ERR_INV_PACKET = 14,
     139             :     GPG_ERR_INV_ARMOR = 15,
     140             :     GPG_ERR_NO_USER_ID = 16,
     141             :     GPG_ERR_NO_SECKEY = 17,
     142             :     GPG_ERR_WRONG_SECKEY = 18,
     143             :     GPG_ERR_BAD_KEY = 19,
     144             :     GPG_ERR_COMPR_ALGO = 20,
     145             :     GPG_ERR_NO_PRIME = 21,
     146             :     GPG_ERR_NO_ENCODING_METHOD = 22,
     147             :     GPG_ERR_NO_ENCRYPTION_SCHEME = 23,
     148             :     GPG_ERR_NO_SIGNATURE_SCHEME = 24,
     149             :     GPG_ERR_INV_ATTR = 25,
     150             :     GPG_ERR_NO_VALUE = 26,
     151             :     GPG_ERR_NOT_FOUND = 27,
     152             :     GPG_ERR_VALUE_NOT_FOUND = 28,
     153             :     GPG_ERR_SYNTAX = 29,
     154             :     GPG_ERR_BAD_MPI = 30,
     155             :     GPG_ERR_INV_PASSPHRASE = 31,
     156             :     GPG_ERR_SIG_CLASS = 32,
     157             :     GPG_ERR_RESOURCE_LIMIT = 33,
     158             :     GPG_ERR_INV_KEYRING = 34,
     159             :     GPG_ERR_TRUSTDB = 35,
     160             :     GPG_ERR_BAD_CERT = 36,
     161             :     GPG_ERR_INV_USER_ID = 37,
     162             :     GPG_ERR_UNEXPECTED = 38,
     163             :     GPG_ERR_TIME_CONFLICT = 39,
     164             :     GPG_ERR_KEYSERVER = 40,
     165             :     GPG_ERR_WRONG_PUBKEY_ALGO = 41,
     166             :     GPG_ERR_TRIBUTE_TO_D_A = 42,
     167             :     GPG_ERR_WEAK_KEY = 43,
     168             :     GPG_ERR_INV_KEYLEN = 44,
     169             :     GPG_ERR_INV_ARG = 45,
     170             :     GPG_ERR_BAD_URI = 46,
     171             :     GPG_ERR_INV_URI = 47,
     172             :     GPG_ERR_NETWORK = 48,
     173             :     GPG_ERR_UNKNOWN_HOST = 49,
     174             :     GPG_ERR_SELFTEST_FAILED = 50,
     175             :     GPG_ERR_NOT_ENCRYPTED = 51,
     176             :     GPG_ERR_NOT_PROCESSED = 52,
     177             :     GPG_ERR_UNUSABLE_PUBKEY = 53,
     178             :     GPG_ERR_UNUSABLE_SECKEY = 54,
     179             :     GPG_ERR_INV_VALUE = 55,
     180             :     GPG_ERR_BAD_CERT_CHAIN = 56,
     181             :     GPG_ERR_MISSING_CERT = 57,
     182             :     GPG_ERR_NO_DATA = 58,
     183             :     GPG_ERR_BUG = 59,
     184             :     GPG_ERR_NOT_SUPPORTED = 60,
     185             :     GPG_ERR_INV_OP = 61,
     186             :     GPG_ERR_TIMEOUT = 62,
     187             :     GPG_ERR_INTERNAL = 63,
     188             :     GPG_ERR_EOF_GCRYPT = 64,
     189             :     GPG_ERR_INV_OBJ = 65,
     190             :     GPG_ERR_TOO_SHORT = 66,
     191             :     GPG_ERR_TOO_LARGE = 67,
     192             :     GPG_ERR_NO_OBJ = 68,
     193             :     GPG_ERR_NOT_IMPLEMENTED = 69,
     194             :     GPG_ERR_CONFLICT = 70,
     195             :     GPG_ERR_INV_CIPHER_MODE = 71,
     196             :     GPG_ERR_INV_FLAG = 72,
     197             :     GPG_ERR_INV_HANDLE = 73,
     198             :     GPG_ERR_TRUNCATED = 74,
     199             :     GPG_ERR_INCOMPLETE_LINE = 75,
     200             :     GPG_ERR_INV_RESPONSE = 76,
     201             :     GPG_ERR_NO_AGENT = 77,
     202             :     GPG_ERR_AGENT = 78,
     203             :     GPG_ERR_INV_DATA = 79,
     204             :     GPG_ERR_ASSUAN_SERVER_FAULT = 80,
     205             :     GPG_ERR_ASSUAN = 81,
     206             :     GPG_ERR_INV_SESSION_KEY = 82,
     207             :     GPG_ERR_INV_SEXP = 83,
     208             :     GPG_ERR_UNSUPPORTED_ALGORITHM = 84,
     209             :     GPG_ERR_NO_PIN_ENTRY = 85,
     210             :     GPG_ERR_PIN_ENTRY = 86,
     211             :     GPG_ERR_BAD_PIN = 87,
     212             :     GPG_ERR_INV_NAME = 88,
     213             :     GPG_ERR_BAD_DATA = 89,
     214             :     GPG_ERR_INV_PARAMETER = 90,
     215             :     GPG_ERR_WRONG_CARD = 91,
     216             :     GPG_ERR_NO_DIRMNGR = 92,
     217             :     GPG_ERR_DIRMNGR = 93,
     218             :     GPG_ERR_CERT_REVOKED = 94,
     219             :     GPG_ERR_NO_CRL_KNOWN = 95,
     220             :     GPG_ERR_CRL_TOO_OLD = 96,
     221             :     GPG_ERR_LINE_TOO_LONG = 97,
     222             :     GPG_ERR_NOT_TRUSTED = 98,
     223             :     GPG_ERR_CANCELED = 99,
     224             :     GPG_ERR_BAD_CA_CERT = 100,
     225             :     GPG_ERR_CERT_EXPIRED = 101,
     226             :     GPG_ERR_CERT_TOO_YOUNG = 102,
     227             :     GPG_ERR_UNSUPPORTED_CERT = 103,
     228             :     GPG_ERR_UNKNOWN_SEXP = 104,
     229             :     GPG_ERR_UNSUPPORTED_PROTECTION = 105,
     230             :     GPG_ERR_CORRUPTED_PROTECTION = 106,
     231             :     GPG_ERR_AMBIGUOUS_NAME = 107,
     232             :     GPG_ERR_CARD = 108,
     233             :     GPG_ERR_CARD_RESET = 109,
     234             :     GPG_ERR_CARD_REMOVED = 110,
     235             :     GPG_ERR_INV_CARD = 111,
     236             :     GPG_ERR_CARD_NOT_PRESENT = 112,
     237             :     GPG_ERR_NO_PKCS15_APP = 113,
     238             :     GPG_ERR_NOT_CONFIRMED = 114,
     239             :     GPG_ERR_CONFIGURATION = 115,
     240             :     GPG_ERR_NO_POLICY_MATCH = 116,
     241             :     GPG_ERR_INV_INDEX = 117,
     242             :     GPG_ERR_INV_ID = 118,
     243             :     GPG_ERR_NO_SCDAEMON = 119,
     244             :     GPG_ERR_SCDAEMON = 120,
     245             :     GPG_ERR_UNSUPPORTED_PROTOCOL = 121,
     246             :     GPG_ERR_BAD_PIN_METHOD = 122,
     247             :     GPG_ERR_CARD_NOT_INITIALIZED = 123,
     248             :     GPG_ERR_UNSUPPORTED_OPERATION = 124,
     249             :     GPG_ERR_WRONG_KEY_USAGE = 125,
     250             :     GPG_ERR_NOTHING_FOUND = 126,
     251             :     GPG_ERR_WRONG_BLOB_TYPE = 127,
     252             :     GPG_ERR_MISSING_VALUE = 128,
     253             :     GPG_ERR_HARDWARE = 129,
     254             :     GPG_ERR_PIN_BLOCKED = 130,
     255             :     GPG_ERR_USE_CONDITIONS = 131,
     256             :     GPG_ERR_PIN_NOT_SYNCED = 132,
     257             :     GPG_ERR_INV_CRL = 133,
     258             :     GPG_ERR_BAD_BER = 134,
     259             :     GPG_ERR_INV_BER = 135,
     260             :     GPG_ERR_ELEMENT_NOT_FOUND = 136,
     261             :     GPG_ERR_IDENTIFIER_NOT_FOUND = 137,
     262             :     GPG_ERR_INV_TAG = 138,
     263             :     GPG_ERR_INV_LENGTH = 139,
     264             :     GPG_ERR_INV_KEYINFO = 140,
     265             :     GPG_ERR_UNEXPECTED_TAG = 141,
     266             :     GPG_ERR_NOT_DER_ENCODED = 142,
     267             :     GPG_ERR_NO_CMS_OBJ = 143,
     268             :     GPG_ERR_INV_CMS_OBJ = 144,
     269             :     GPG_ERR_UNKNOWN_CMS_OBJ = 145,
     270             :     GPG_ERR_UNSUPPORTED_CMS_OBJ = 146,
     271             :     GPG_ERR_UNSUPPORTED_ENCODING = 147,
     272             :     GPG_ERR_UNSUPPORTED_CMS_VERSION = 148,
     273             :     GPG_ERR_UNKNOWN_ALGORITHM = 149,
     274             :     GPG_ERR_INV_ENGINE = 150,
     275             :     GPG_ERR_PUBKEY_NOT_TRUSTED = 151,
     276             :     GPG_ERR_DECRYPT_FAILED = 152,
     277             :     GPG_ERR_KEY_EXPIRED = 153,
     278             :     GPG_ERR_SIG_EXPIRED = 154,
     279             :     GPG_ERR_ENCODING_PROBLEM = 155,
     280             :     GPG_ERR_INV_STATE = 156,
     281             :     GPG_ERR_DUP_VALUE = 157,
     282             :     GPG_ERR_MISSING_ACTION = 158,
     283             :     GPG_ERR_MODULE_NOT_FOUND = 159,
     284             :     GPG_ERR_INV_OID_STRING = 160,
     285             :     GPG_ERR_INV_TIME = 161,
     286             :     GPG_ERR_INV_CRL_OBJ = 162,
     287             :     GPG_ERR_UNSUPPORTED_CRL_VERSION = 163,
     288             :     GPG_ERR_INV_CERT_OBJ = 164,
     289             :     GPG_ERR_UNKNOWN_NAME = 165,
     290             :     GPG_ERR_LOCALE_PROBLEM = 166,
     291             :     GPG_ERR_NOT_LOCKED = 167,
     292             :     GPG_ERR_PROTOCOL_VIOLATION = 168,
     293             :     GPG_ERR_INV_MAC = 169,
     294             :     GPG_ERR_INV_REQUEST = 170,
     295             :     GPG_ERR_UNKNOWN_EXTN = 171,
     296             :     GPG_ERR_UNKNOWN_CRIT_EXTN = 172,
     297             :     GPG_ERR_LOCKED = 173,
     298             :     GPG_ERR_UNKNOWN_OPTION = 174,
     299             :     GPG_ERR_UNKNOWN_COMMAND = 175,
     300             :     GPG_ERR_NOT_OPERATIONAL = 176,
     301             :     GPG_ERR_NO_PASSPHRASE = 177,
     302             :     GPG_ERR_NO_PIN = 178,
     303             :     GPG_ERR_NOT_ENABLED = 179,
     304             :     GPG_ERR_NO_ENGINE = 180,
     305             :     GPG_ERR_MISSING_KEY = 181,
     306             :     GPG_ERR_TOO_MANY = 182,
     307             :     GPG_ERR_LIMIT_REACHED = 183,
     308             :     GPG_ERR_NOT_INITIALIZED = 184,
     309             :     GPG_ERR_MISSING_ISSUER_CERT = 185,
     310             :     GPG_ERR_NO_KEYSERVER = 186,
     311             :     GPG_ERR_INV_CURVE = 187,
     312             :     GPG_ERR_UNKNOWN_CURVE = 188,
     313             :     GPG_ERR_DUP_KEY = 189,
     314             :     GPG_ERR_AMBIGUOUS = 190,
     315             :     GPG_ERR_NO_CRYPT_CTX = 191,
     316             :     GPG_ERR_WRONG_CRYPT_CTX = 192,
     317             :     GPG_ERR_BAD_CRYPT_CTX = 193,
     318             :     GPG_ERR_CRYPT_CTX_CONFLICT = 194,
     319             :     GPG_ERR_BROKEN_PUBKEY = 195,
     320             :     GPG_ERR_BROKEN_SECKEY = 196,
     321             :     GPG_ERR_MAC_ALGO = 197,
     322             :     GPG_ERR_FULLY_CANCELED = 198,
     323             :     GPG_ERR_UNFINISHED = 199,
     324             :     GPG_ERR_BUFFER_TOO_SHORT = 200,
     325             :     GPG_ERR_SEXP_INV_LEN_SPEC = 201,
     326             :     GPG_ERR_SEXP_STRING_TOO_LONG = 202,
     327             :     GPG_ERR_SEXP_UNMATCHED_PAREN = 203,
     328             :     GPG_ERR_SEXP_NOT_CANONICAL = 204,
     329             :     GPG_ERR_SEXP_BAD_CHARACTER = 205,
     330             :     GPG_ERR_SEXP_BAD_QUOTATION = 206,
     331             :     GPG_ERR_SEXP_ZERO_PREFIX = 207,
     332             :     GPG_ERR_SEXP_NESTED_DH = 208,
     333             :     GPG_ERR_SEXP_UNMATCHED_DH = 209,
     334             :     GPG_ERR_SEXP_UNEXPECTED_PUNC = 210,
     335             :     GPG_ERR_SEXP_BAD_HEX_CHAR = 211,
     336             :     GPG_ERR_SEXP_ODD_HEX_NUMBERS = 212,
     337             :     GPG_ERR_SEXP_BAD_OCT_CHAR = 213,
     338             :     GPG_ERR_LEGACY_KEY = 222,
     339             :     GPG_ERR_REQUEST_TOO_SHORT = 223,
     340             :     GPG_ERR_REQUEST_TOO_LONG = 224,
     341             :     GPG_ERR_OBJ_TERM_STATE = 225,
     342             :     GPG_ERR_NO_CERT_CHAIN = 226,
     343             :     GPG_ERR_CERT_TOO_LARGE = 227,
     344             :     GPG_ERR_INV_RECORD = 228,
     345             :     GPG_ERR_BAD_MAC = 229,
     346             :     GPG_ERR_UNEXPECTED_MSG = 230,
     347             :     GPG_ERR_COMPR_FAILED = 231,
     348             :     GPG_ERR_WOULD_WRAP = 232,
     349             :     GPG_ERR_FATAL_ALERT = 233,
     350             :     GPG_ERR_NO_CIPHER = 234,
     351             :     GPG_ERR_MISSING_CLIENT_CERT = 235,
     352             :     GPG_ERR_CLOSE_NOTIFY = 236,
     353             :     GPG_ERR_TICKET_EXPIRED = 237,
     354             :     GPG_ERR_BAD_TICKET = 238,
     355             :     GPG_ERR_UNKNOWN_IDENTITY = 239,
     356             :     GPG_ERR_BAD_HS_CERT = 240,
     357             :     GPG_ERR_BAD_HS_CERT_REQ = 241,
     358             :     GPG_ERR_BAD_HS_CERT_VER = 242,
     359             :     GPG_ERR_BAD_HS_CHANGE_CIPHER = 243,
     360             :     GPG_ERR_BAD_HS_CLIENT_HELLO = 244,
     361             :     GPG_ERR_BAD_HS_SERVER_HELLO = 245,
     362             :     GPG_ERR_BAD_HS_SERVER_HELLO_DONE = 246,
     363             :     GPG_ERR_BAD_HS_FINISHED = 247,
     364             :     GPG_ERR_BAD_HS_SERVER_KEX = 248,
     365             :     GPG_ERR_BAD_HS_CLIENT_KEX = 249,
     366             :     GPG_ERR_BOGUS_STRING = 250,
     367             :     GPG_ERR_FORBIDDEN = 251,
     368             :     GPG_ERR_KEY_DISABLED = 252,
     369             :     GPG_ERR_KEY_ON_CARD = 253,
     370             :     GPG_ERR_INV_LOCK_OBJ = 254,
     371             :     GPG_ERR_ASS_GENERAL = 257,
     372             :     GPG_ERR_ASS_ACCEPT_FAILED = 258,
     373             :     GPG_ERR_ASS_CONNECT_FAILED = 259,
     374             :     GPG_ERR_ASS_INV_RESPONSE = 260,
     375             :     GPG_ERR_ASS_INV_VALUE = 261,
     376             :     GPG_ERR_ASS_INCOMPLETE_LINE = 262,
     377             :     GPG_ERR_ASS_LINE_TOO_LONG = 263,
     378             :     GPG_ERR_ASS_NESTED_COMMANDS = 264,
     379             :     GPG_ERR_ASS_NO_DATA_CB = 265,
     380             :     GPG_ERR_ASS_NO_INQUIRE_CB = 266,
     381             :     GPG_ERR_ASS_NOT_A_SERVER = 267,
     382             :     GPG_ERR_ASS_NOT_A_CLIENT = 268,
     383             :     GPG_ERR_ASS_SERVER_START = 269,
     384             :     GPG_ERR_ASS_READ_ERROR = 270,
     385             :     GPG_ERR_ASS_WRITE_ERROR = 271,
     386             :     GPG_ERR_ASS_TOO_MUCH_DATA = 273,
     387             :     GPG_ERR_ASS_UNEXPECTED_CMD = 274,
     388             :     GPG_ERR_ASS_UNKNOWN_CMD = 275,
     389             :     GPG_ERR_ASS_SYNTAX = 276,
     390             :     GPG_ERR_ASS_CANCELED = 277,
     391             :     GPG_ERR_ASS_NO_INPUT = 278,
     392             :     GPG_ERR_ASS_NO_OUTPUT = 279,
     393             :     GPG_ERR_ASS_PARAMETER = 280,
     394             :     GPG_ERR_ASS_UNKNOWN_INQUIRE = 281,
     395             :     GPG_ERR_LDAP_GENERAL = 721,
     396             :     GPG_ERR_LDAP_ATTR_GENERAL = 722,
     397             :     GPG_ERR_LDAP_NAME_GENERAL = 723,
     398             :     GPG_ERR_LDAP_SECURITY_GENERAL = 724,
     399             :     GPG_ERR_LDAP_SERVICE_GENERAL = 725,
     400             :     GPG_ERR_LDAP_UPDATE_GENERAL = 726,
     401             :     GPG_ERR_LDAP_E_GENERAL = 727,
     402             :     GPG_ERR_LDAP_X_GENERAL = 728,
     403             :     GPG_ERR_LDAP_OTHER_GENERAL = 729,
     404             :     GPG_ERR_LDAP_X_CONNECTING = 750,
     405             :     GPG_ERR_LDAP_REFERRAL_LIMIT = 751,
     406             :     GPG_ERR_LDAP_CLIENT_LOOP = 752,
     407             :     GPG_ERR_LDAP_NO_RESULTS = 754,
     408             :     GPG_ERR_LDAP_CONTROL_NOT_FOUND = 755,
     409             :     GPG_ERR_LDAP_NOT_SUPPORTED = 756,
     410             :     GPG_ERR_LDAP_CONNECT = 757,
     411             :     GPG_ERR_LDAP_NO_MEMORY = 758,
     412             :     GPG_ERR_LDAP_PARAM = 759,
     413             :     GPG_ERR_LDAP_USER_CANCELLED = 760,
     414             :     GPG_ERR_LDAP_FILTER = 761,
     415             :     GPG_ERR_LDAP_AUTH_UNKNOWN = 762,
     416             :     GPG_ERR_LDAP_TIMEOUT = 763,
     417             :     GPG_ERR_LDAP_DECODING = 764,
     418             :     GPG_ERR_LDAP_ENCODING = 765,
     419             :     GPG_ERR_LDAP_LOCAL = 766,
     420             :     GPG_ERR_LDAP_SERVER_DOWN = 767,
     421             :     GPG_ERR_LDAP_SUCCESS = 768,
     422             :     GPG_ERR_LDAP_OPERATIONS = 769,
     423             :     GPG_ERR_LDAP_PROTOCOL = 770,
     424             :     GPG_ERR_LDAP_TIMELIMIT = 771,
     425             :     GPG_ERR_LDAP_SIZELIMIT = 772,
     426             :     GPG_ERR_LDAP_COMPARE_FALSE = 773,
     427             :     GPG_ERR_LDAP_COMPARE_TRUE = 774,
     428             :     GPG_ERR_LDAP_UNSUPPORTED_AUTH = 775,
     429             :     GPG_ERR_LDAP_STRONG_AUTH_RQRD = 776,
     430             :     GPG_ERR_LDAP_PARTIAL_RESULTS = 777,
     431             :     GPG_ERR_LDAP_REFERRAL = 778,
     432             :     GPG_ERR_LDAP_ADMINLIMIT = 779,
     433             :     GPG_ERR_LDAP_UNAVAIL_CRIT_EXTN = 780,
     434             :     GPG_ERR_LDAP_CONFIDENT_RQRD = 781,
     435             :     GPG_ERR_LDAP_SASL_BIND_INPROG = 782,
     436             :     GPG_ERR_LDAP_NO_SUCH_ATTRIBUTE = 784,
     437             :     GPG_ERR_LDAP_UNDEFINED_TYPE = 785,
     438             :     GPG_ERR_LDAP_BAD_MATCHING = 786,
     439             :     GPG_ERR_LDAP_CONST_VIOLATION = 787,
     440             :     GPG_ERR_LDAP_TYPE_VALUE_EXISTS = 788,
     441             :     GPG_ERR_LDAP_INV_SYNTAX = 789,
     442             :     GPG_ERR_LDAP_NO_SUCH_OBJ = 800,
     443             :     GPG_ERR_LDAP_ALIAS_PROBLEM = 801,
     444             :     GPG_ERR_LDAP_INV_DN_SYNTAX = 802,
     445             :     GPG_ERR_LDAP_IS_LEAF = 803,
     446             :     GPG_ERR_LDAP_ALIAS_DEREF = 804,
     447             :     GPG_ERR_LDAP_X_PROXY_AUTH_FAIL = 815,
     448             :     GPG_ERR_LDAP_BAD_AUTH = 816,
     449             :     GPG_ERR_LDAP_INV_CREDENTIALS = 817,
     450             :     GPG_ERR_LDAP_INSUFFICIENT_ACC = 818,
     451             :     GPG_ERR_LDAP_BUSY = 819,
     452             :     GPG_ERR_LDAP_UNAVAILABLE = 820,
     453             :     GPG_ERR_LDAP_UNWILL_TO_PERFORM = 821,
     454             :     GPG_ERR_LDAP_LOOP_DETECT = 822,
     455             :     GPG_ERR_LDAP_NAMING_VIOLATION = 832,
     456             :     GPG_ERR_LDAP_OBJ_CLS_VIOLATION = 833,
     457             :     GPG_ERR_LDAP_NOT_ALLOW_NONLEAF = 834,
     458             :     GPG_ERR_LDAP_NOT_ALLOW_ON_RDN = 835,
     459             :     GPG_ERR_LDAP_ALREADY_EXISTS = 836,
     460             :     GPG_ERR_LDAP_NO_OBJ_CLASS_MODS = 837,
     461             :     GPG_ERR_LDAP_RESULTS_TOO_LARGE = 838,
     462             :     GPG_ERR_LDAP_AFFECTS_MULT_DSAS = 839,
     463             :     GPG_ERR_LDAP_VLV = 844,
     464             :     GPG_ERR_LDAP_OTHER = 848,
     465             :     GPG_ERR_LDAP_CUP_RESOURCE_LIMIT = 881,
     466             :     GPG_ERR_LDAP_CUP_SEC_VIOLATION = 882,
     467             :     GPG_ERR_LDAP_CUP_INV_DATA = 883,
     468             :     GPG_ERR_LDAP_CUP_UNSUP_SCHEME = 884,
     469             :     GPG_ERR_LDAP_CUP_RELOAD = 885,
     470             :     GPG_ERR_LDAP_CANCELLED = 886,
     471             :     GPG_ERR_LDAP_NO_SUCH_OPERATION = 887,
     472             :     GPG_ERR_LDAP_TOO_LATE = 888,
     473             :     GPG_ERR_LDAP_CANNOT_CANCEL = 889,
     474             :     GPG_ERR_LDAP_ASSERTION_FAILED = 890,
     475             :     GPG_ERR_LDAP_PROX_AUTH_DENIED = 891,
     476             :     GPG_ERR_USER_1 = 1024,
     477             :     GPG_ERR_USER_2 = 1025,
     478             :     GPG_ERR_USER_3 = 1026,
     479             :     GPG_ERR_USER_4 = 1027,
     480             :     GPG_ERR_USER_5 = 1028,
     481             :     GPG_ERR_USER_6 = 1029,
     482             :     GPG_ERR_USER_7 = 1030,
     483             :     GPG_ERR_USER_8 = 1031,
     484             :     GPG_ERR_USER_9 = 1032,
     485             :     GPG_ERR_USER_10 = 1033,
     486             :     GPG_ERR_USER_11 = 1034,
     487             :     GPG_ERR_USER_12 = 1035,
     488             :     GPG_ERR_USER_13 = 1036,
     489             :     GPG_ERR_USER_14 = 1037,
     490             :     GPG_ERR_USER_15 = 1038,
     491             :     GPG_ERR_USER_16 = 1039,
     492             :     GPG_ERR_MISSING_ERRNO = 16381,
     493             :     GPG_ERR_UNKNOWN_ERRNO = 16382,
     494             :     GPG_ERR_EOF = 16383,
     495             : 
     496             :     /* The following error codes are used to map system errors.  */
     497             : #define GPG_ERR_SYSTEM_ERROR    (1 << 15)
     498             :     GPG_ERR_E2BIG = GPG_ERR_SYSTEM_ERROR | 0,
     499             :     GPG_ERR_EACCES = GPG_ERR_SYSTEM_ERROR | 1,
     500             :     GPG_ERR_EADDRINUSE = GPG_ERR_SYSTEM_ERROR | 2,
     501             :     GPG_ERR_EADDRNOTAVAIL = GPG_ERR_SYSTEM_ERROR | 3,
     502             :     GPG_ERR_EADV = GPG_ERR_SYSTEM_ERROR | 4,
     503             :     GPG_ERR_EAFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 5,
     504             :     GPG_ERR_EAGAIN = GPG_ERR_SYSTEM_ERROR | 6,
     505             :     GPG_ERR_EALREADY = GPG_ERR_SYSTEM_ERROR | 7,
     506             :     GPG_ERR_EAUTH = GPG_ERR_SYSTEM_ERROR | 8,
     507             :     GPG_ERR_EBACKGROUND = GPG_ERR_SYSTEM_ERROR | 9,
     508             :     GPG_ERR_EBADE = GPG_ERR_SYSTEM_ERROR | 10,
     509             :     GPG_ERR_EBADF = GPG_ERR_SYSTEM_ERROR | 11,
     510             :     GPG_ERR_EBADFD = GPG_ERR_SYSTEM_ERROR | 12,
     511             :     GPG_ERR_EBADMSG = GPG_ERR_SYSTEM_ERROR | 13,
     512             :     GPG_ERR_EBADR = GPG_ERR_SYSTEM_ERROR | 14,
     513             :     GPG_ERR_EBADRPC = GPG_ERR_SYSTEM_ERROR | 15,
     514             :     GPG_ERR_EBADRQC = GPG_ERR_SYSTEM_ERROR | 16,
     515             :     GPG_ERR_EBADSLT = GPG_ERR_SYSTEM_ERROR | 17,
     516             :     GPG_ERR_EBFONT = GPG_ERR_SYSTEM_ERROR | 18,
     517             :     GPG_ERR_EBUSY = GPG_ERR_SYSTEM_ERROR | 19,
     518             :     GPG_ERR_ECANCELED = GPG_ERR_SYSTEM_ERROR | 20,
     519             :     GPG_ERR_ECHILD = GPG_ERR_SYSTEM_ERROR | 21,
     520             :     GPG_ERR_ECHRNG = GPG_ERR_SYSTEM_ERROR | 22,
     521             :     GPG_ERR_ECOMM = GPG_ERR_SYSTEM_ERROR | 23,
     522             :     GPG_ERR_ECONNABORTED = GPG_ERR_SYSTEM_ERROR | 24,
     523             :     GPG_ERR_ECONNREFUSED = GPG_ERR_SYSTEM_ERROR | 25,
     524             :     GPG_ERR_ECONNRESET = GPG_ERR_SYSTEM_ERROR | 26,
     525             :     GPG_ERR_ED = GPG_ERR_SYSTEM_ERROR | 27,
     526             :     GPG_ERR_EDEADLK = GPG_ERR_SYSTEM_ERROR | 28,
     527             :     GPG_ERR_EDEADLOCK = GPG_ERR_SYSTEM_ERROR | 29,
     528             :     GPG_ERR_EDESTADDRREQ = GPG_ERR_SYSTEM_ERROR | 30,
     529             :     GPG_ERR_EDIED = GPG_ERR_SYSTEM_ERROR | 31,
     530             :     GPG_ERR_EDOM = GPG_ERR_SYSTEM_ERROR | 32,
     531             :     GPG_ERR_EDOTDOT = GPG_ERR_SYSTEM_ERROR | 33,
     532             :     GPG_ERR_EDQUOT = GPG_ERR_SYSTEM_ERROR | 34,
     533             :     GPG_ERR_EEXIST = GPG_ERR_SYSTEM_ERROR | 35,
     534             :     GPG_ERR_EFAULT = GPG_ERR_SYSTEM_ERROR | 36,
     535             :     GPG_ERR_EFBIG = GPG_ERR_SYSTEM_ERROR | 37,
     536             :     GPG_ERR_EFTYPE = GPG_ERR_SYSTEM_ERROR | 38,
     537             :     GPG_ERR_EGRATUITOUS = GPG_ERR_SYSTEM_ERROR | 39,
     538             :     GPG_ERR_EGREGIOUS = GPG_ERR_SYSTEM_ERROR | 40,
     539             :     GPG_ERR_EHOSTDOWN = GPG_ERR_SYSTEM_ERROR | 41,
     540             :     GPG_ERR_EHOSTUNREACH = GPG_ERR_SYSTEM_ERROR | 42,
     541             :     GPG_ERR_EIDRM = GPG_ERR_SYSTEM_ERROR | 43,
     542             :     GPG_ERR_EIEIO = GPG_ERR_SYSTEM_ERROR | 44,
     543             :     GPG_ERR_EILSEQ = GPG_ERR_SYSTEM_ERROR | 45,
     544             :     GPG_ERR_EINPROGRESS = GPG_ERR_SYSTEM_ERROR | 46,
     545             :     GPG_ERR_EINTR = GPG_ERR_SYSTEM_ERROR | 47,
     546             :     GPG_ERR_EINVAL = GPG_ERR_SYSTEM_ERROR | 48,
     547             :     GPG_ERR_EIO = GPG_ERR_SYSTEM_ERROR | 49,
     548             :     GPG_ERR_EISCONN = GPG_ERR_SYSTEM_ERROR | 50,
     549             :     GPG_ERR_EISDIR = GPG_ERR_SYSTEM_ERROR | 51,
     550             :     GPG_ERR_EISNAM = GPG_ERR_SYSTEM_ERROR | 52,
     551             :     GPG_ERR_EL2HLT = GPG_ERR_SYSTEM_ERROR | 53,
     552             :     GPG_ERR_EL2NSYNC = GPG_ERR_SYSTEM_ERROR | 54,
     553             :     GPG_ERR_EL3HLT = GPG_ERR_SYSTEM_ERROR | 55,
     554             :     GPG_ERR_EL3RST = GPG_ERR_SYSTEM_ERROR | 56,
     555             :     GPG_ERR_ELIBACC = GPG_ERR_SYSTEM_ERROR | 57,
     556             :     GPG_ERR_ELIBBAD = GPG_ERR_SYSTEM_ERROR | 58,
     557             :     GPG_ERR_ELIBEXEC = GPG_ERR_SYSTEM_ERROR | 59,
     558             :     GPG_ERR_ELIBMAX = GPG_ERR_SYSTEM_ERROR | 60,
     559             :     GPG_ERR_ELIBSCN = GPG_ERR_SYSTEM_ERROR | 61,
     560             :     GPG_ERR_ELNRNG = GPG_ERR_SYSTEM_ERROR | 62,
     561             :     GPG_ERR_ELOOP = GPG_ERR_SYSTEM_ERROR | 63,
     562             :     GPG_ERR_EMEDIUMTYPE = GPG_ERR_SYSTEM_ERROR | 64,
     563             :     GPG_ERR_EMFILE = GPG_ERR_SYSTEM_ERROR | 65,
     564             :     GPG_ERR_EMLINK = GPG_ERR_SYSTEM_ERROR | 66,
     565             :     GPG_ERR_EMSGSIZE = GPG_ERR_SYSTEM_ERROR | 67,
     566             :     GPG_ERR_EMULTIHOP = GPG_ERR_SYSTEM_ERROR | 68,
     567             :     GPG_ERR_ENAMETOOLONG = GPG_ERR_SYSTEM_ERROR | 69,
     568             :     GPG_ERR_ENAVAIL = GPG_ERR_SYSTEM_ERROR | 70,
     569             :     GPG_ERR_ENEEDAUTH = GPG_ERR_SYSTEM_ERROR | 71,
     570             :     GPG_ERR_ENETDOWN = GPG_ERR_SYSTEM_ERROR | 72,
     571             :     GPG_ERR_ENETRESET = GPG_ERR_SYSTEM_ERROR | 73,
     572             :     GPG_ERR_ENETUNREACH = GPG_ERR_SYSTEM_ERROR | 74,
     573             :     GPG_ERR_ENFILE = GPG_ERR_SYSTEM_ERROR | 75,
     574             :     GPG_ERR_ENOANO = GPG_ERR_SYSTEM_ERROR | 76,
     575             :     GPG_ERR_ENOBUFS = GPG_ERR_SYSTEM_ERROR | 77,
     576             :     GPG_ERR_ENOCSI = GPG_ERR_SYSTEM_ERROR | 78,
     577             :     GPG_ERR_ENODATA = GPG_ERR_SYSTEM_ERROR | 79,
     578             :     GPG_ERR_ENODEV = GPG_ERR_SYSTEM_ERROR | 80,
     579             :     GPG_ERR_ENOENT = GPG_ERR_SYSTEM_ERROR | 81,
     580             :     GPG_ERR_ENOEXEC = GPG_ERR_SYSTEM_ERROR | 82,
     581             :     GPG_ERR_ENOLCK = GPG_ERR_SYSTEM_ERROR | 83,
     582             :     GPG_ERR_ENOLINK = GPG_ERR_SYSTEM_ERROR | 84,
     583             :     GPG_ERR_ENOMEDIUM = GPG_ERR_SYSTEM_ERROR | 85,
     584             :     GPG_ERR_ENOMEM = GPG_ERR_SYSTEM_ERROR | 86,
     585             :     GPG_ERR_ENOMSG = GPG_ERR_SYSTEM_ERROR | 87,
     586             :     GPG_ERR_ENONET = GPG_ERR_SYSTEM_ERROR | 88,
     587             :     GPG_ERR_ENOPKG = GPG_ERR_SYSTEM_ERROR | 89,
     588             :     GPG_ERR_ENOPROTOOPT = GPG_ERR_SYSTEM_ERROR | 90,
     589             :     GPG_ERR_ENOSPC = GPG_ERR_SYSTEM_ERROR | 91,
     590             :     GPG_ERR_ENOSR = GPG_ERR_SYSTEM_ERROR | 92,
     591             :     GPG_ERR_ENOSTR = GPG_ERR_SYSTEM_ERROR | 93,
     592             :     GPG_ERR_ENOSYS = GPG_ERR_SYSTEM_ERROR | 94,
     593             :     GPG_ERR_ENOTBLK = GPG_ERR_SYSTEM_ERROR | 95,
     594             :     GPG_ERR_ENOTCONN = GPG_ERR_SYSTEM_ERROR | 96,
     595             :     GPG_ERR_ENOTDIR = GPG_ERR_SYSTEM_ERROR | 97,
     596             :     GPG_ERR_ENOTEMPTY = GPG_ERR_SYSTEM_ERROR | 98,
     597             :     GPG_ERR_ENOTNAM = GPG_ERR_SYSTEM_ERROR | 99,
     598             :     GPG_ERR_ENOTSOCK = GPG_ERR_SYSTEM_ERROR | 100,
     599             :     GPG_ERR_ENOTSUP = GPG_ERR_SYSTEM_ERROR | 101,
     600             :     GPG_ERR_ENOTTY = GPG_ERR_SYSTEM_ERROR | 102,
     601             :     GPG_ERR_ENOTUNIQ = GPG_ERR_SYSTEM_ERROR | 103,
     602             :     GPG_ERR_ENXIO = GPG_ERR_SYSTEM_ERROR | 104,
     603             :     GPG_ERR_EOPNOTSUPP = GPG_ERR_SYSTEM_ERROR | 105,
     604             :     GPG_ERR_EOVERFLOW = GPG_ERR_SYSTEM_ERROR | 106,
     605             :     GPG_ERR_EPERM = GPG_ERR_SYSTEM_ERROR | 107,
     606             :     GPG_ERR_EPFNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 108,
     607             :     GPG_ERR_EPIPE = GPG_ERR_SYSTEM_ERROR | 109,
     608             :     GPG_ERR_EPROCLIM = GPG_ERR_SYSTEM_ERROR | 110,
     609             :     GPG_ERR_EPROCUNAVAIL = GPG_ERR_SYSTEM_ERROR | 111,
     610             :     GPG_ERR_EPROGMISMATCH = GPG_ERR_SYSTEM_ERROR | 112,
     611             :     GPG_ERR_EPROGUNAVAIL = GPG_ERR_SYSTEM_ERROR | 113,
     612             :     GPG_ERR_EPROTO = GPG_ERR_SYSTEM_ERROR | 114,
     613             :     GPG_ERR_EPROTONOSUPPORT = GPG_ERR_SYSTEM_ERROR | 115,
     614             :     GPG_ERR_EPROTOTYPE = GPG_ERR_SYSTEM_ERROR | 116,
     615             :     GPG_ERR_ERANGE = GPG_ERR_SYSTEM_ERROR | 117,
     616             :     GPG_ERR_EREMCHG = GPG_ERR_SYSTEM_ERROR | 118,
     617             :     GPG_ERR_EREMOTE = GPG_ERR_SYSTEM_ERROR | 119,
     618             :     GPG_ERR_EREMOTEIO = GPG_ERR_SYSTEM_ERROR | 120,
     619             :     GPG_ERR_ERESTART = GPG_ERR_SYSTEM_ERROR | 121,
     620             :     GPG_ERR_EROFS = GPG_ERR_SYSTEM_ERROR | 122,
     621             :     GPG_ERR_ERPCMISMATCH = GPG_ERR_SYSTEM_ERROR | 123,
     622             :     GPG_ERR_ESHUTDOWN = GPG_ERR_SYSTEM_ERROR | 124,
     623             :     GPG_ERR_ESOCKTNOSUPPORT = GPG_ERR_SYSTEM_ERROR | 125,
     624             :     GPG_ERR_ESPIPE = GPG_ERR_SYSTEM_ERROR | 126,
     625             :     GPG_ERR_ESRCH = GPG_ERR_SYSTEM_ERROR | 127,
     626             :     GPG_ERR_ESRMNT = GPG_ERR_SYSTEM_ERROR | 128,
     627             :     GPG_ERR_ESTALE = GPG_ERR_SYSTEM_ERROR | 129,
     628             :     GPG_ERR_ESTRPIPE = GPG_ERR_SYSTEM_ERROR | 130,
     629             :     GPG_ERR_ETIME = GPG_ERR_SYSTEM_ERROR | 131,
     630             :     GPG_ERR_ETIMEDOUT = GPG_ERR_SYSTEM_ERROR | 132,
     631             :     GPG_ERR_ETOOMANYREFS = GPG_ERR_SYSTEM_ERROR | 133,
     632             :     GPG_ERR_ETXTBSY = GPG_ERR_SYSTEM_ERROR | 134,
     633             :     GPG_ERR_EUCLEAN = GPG_ERR_SYSTEM_ERROR | 135,
     634             :     GPG_ERR_EUNATCH = GPG_ERR_SYSTEM_ERROR | 136,
     635             :     GPG_ERR_EUSERS = GPG_ERR_SYSTEM_ERROR | 137,
     636             :     GPG_ERR_EWOULDBLOCK = GPG_ERR_SYSTEM_ERROR | 138,
     637             :     GPG_ERR_EXDEV = GPG_ERR_SYSTEM_ERROR | 139,
     638             :     GPG_ERR_EXFULL = GPG_ERR_SYSTEM_ERROR | 140,
     639             : 
     640             :     /* This is one more than the largest allowed entry.  */
     641             :     GPG_ERR_CODE_DIM = 65536
     642             :   } gpg_err_code_t;
     643             : 
     644             : 
     645             : /* The error value type gpg_error_t.  */
     646             : 
     647             : /* We would really like to use bit-fields in a struct, but using
     648             :    structs as return values can cause binary compatibility issues, in
     649             :    particular if you want to do it effeciently (also see
     650             :    -freg-struct-return option to GCC).  */
     651             : typedef unsigned int gpg_error_t;
     652             : 
     653             : /* We use the lowest 16 bits of gpg_error_t for error codes.  The 16th
     654             :    bit indicates system errors.  */
     655             : #define GPG_ERR_CODE_MASK       (GPG_ERR_CODE_DIM - 1)
     656             : 
     657             : /* Bits 17 to 24 are reserved.  */
     658             : 
     659             : /* We use the upper 7 bits of gpg_error_t for error sources.  */
     660             : #define GPG_ERR_SOURCE_MASK     (GPG_ERR_SOURCE_DIM - 1)
     661             : #define GPG_ERR_SOURCE_SHIFT    24
     662             : 
     663             : /* The highest bit is reserved.  It shouldn't be used to prevent
     664             :    potential negative numbers when transmitting error values as
     665             :    text.  */
     666             : 
     667             : 
     668             : /* GCC feature test.  */
     669             : #if __GNUC__
     670             : # define _GPG_ERR_GCC_VERSION (__GNUC__ * 10000 \
     671             :                                + __GNUC_MINOR__ * 100 \
     672             :                                + __GNUC_PATCHLEVEL__)
     673             : #else
     674             : # define _GPG_ERR_GCC_VERSION 0
     675             : #endif
     676             : 
     677             : #undef _GPG_ERR_HAVE_CONSTRUCTOR
     678             : #if _GPG_ERR_GCC_VERSION > 30100
     679             : # define _GPG_ERR_CONSTRUCTOR   __attribute__ ((__constructor__))
     680             : # define _GPG_ERR_HAVE_CONSTRUCTOR
     681             : #else
     682             : # define _GPG_ERR_CONSTRUCTOR
     683             : #endif
     684             : 
     685             : #if _GPG_ERR_GCC_VERSION >= 40400
     686             : # define _GPGRT_GCC_A_PRINTF(f, a) __attribute__ ((format(__gnu_printf__,f,a)))
     687             : #elif _GPG_ERR_GCC_VERSION >= 20500
     688             : # define _GPGRT_GCC_A_PRINTF(f, a) __attribute__ ((format(printf,f,a)))
     689             : #else
     690             : # define _GPGRT_GCC_A_PRINTF(f, a)
     691             : #endif
     692             : 
     693             : #if _GPG_ERR_GCC_VERSION >= 29200
     694             : # define _GPGRT__RESTRICT __restrict__
     695             : #else
     696             : # define _GPGRT__RESTRICT
     697             : #endif
     698             : 
     699             : 
     700             : 
     701             : /* Initialization function.  */
     702             : 
     703             : /* Initialize the library.  This function should be run early.  */
     704             : gpg_error_t gpg_err_init (void) _GPG_ERR_CONSTRUCTOR;
     705             : 
     706             : /* If this is defined, the library is already initialized by the
     707             :    constructor and does not need to be initialized explicitely.  */
     708             : #undef GPG_ERR_INITIALIZED
     709             : #ifdef _GPG_ERR_HAVE_CONSTRUCTOR
     710             : # define GPG_ERR_INITIALIZED    1
     711             : # define gpgrt_init() do { gpg_err_init (); } while (0)
     712             : #else
     713             : # define gpgrt_init() do { ; } while (0)
     714             : #endif
     715             : 
     716             : /* See the source on how to use the deinit function; it is usually not
     717             :    required.  */
     718             : void gpg_err_deinit (int mode);
     719             : 
     720             : /* Register blocking system I/O clamping functions.  */
     721             : void gpgrt_set_syscall_clamp (void (*pre)(void), void (*post)(void));
     722             : 
     723             : /* Register a custom malloc/realloc/free function.  */
     724             : void gpgrt_set_alloc_func  (void *(*f)(void *a, size_t n));
     725             : 
     726             : 
     727             : 
     728             : /* Constructor and accessor functions.  */
     729             : 
     730             : /* Construct an error value from an error code and source.  Within a
     731             :    subsystem, use gpg_error.  */
     732             : static GPG_ERR_INLINE gpg_error_t
     733           6 : gpg_err_make (gpg_err_source_t source, gpg_err_code_t code)
     734             : {
     735           6 :   return code == GPG_ERR_NO_ERROR ? GPG_ERR_NO_ERROR
     736           6 :     : (((source & GPG_ERR_SOURCE_MASK) << GPG_ERR_SOURCE_SHIFT)
     737           0 :        | (code & GPG_ERR_CODE_MASK));
     738             : }
     739             : 
     740             : 
     741             : /* The user should define GPG_ERR_SOURCE_DEFAULT before including this
     742             :    file to specify a default source for gpg_error.  */
     743             : #ifndef GPG_ERR_SOURCE_DEFAULT
     744             : #define GPG_ERR_SOURCE_DEFAULT  GPG_ERR_SOURCE_UNKNOWN
     745             : #endif
     746             : 
     747             : static GPG_ERR_INLINE gpg_error_t
     748           0 : gpg_error (gpg_err_code_t code)
     749             : {
     750           0 :   return gpg_err_make (GPG_ERR_SOURCE_DEFAULT, code);
     751             : }
     752             : 
     753             : 
     754             : /* Retrieve the error code from an error value.  */
     755             : static GPG_ERR_INLINE gpg_err_code_t
     756           0 : gpg_err_code (gpg_error_t err)
     757             : {
     758           0 :   return (gpg_err_code_t) (err & GPG_ERR_CODE_MASK);
     759             : }
     760             : 
     761             : 
     762             : /* Retrieve the error source from an error value.  */
     763             : static GPG_ERR_INLINE gpg_err_source_t
     764             : gpg_err_source (gpg_error_t err)
     765             : {
     766             :   return (gpg_err_source_t) ((err >> GPG_ERR_SOURCE_SHIFT)
     767             :                              & GPG_ERR_SOURCE_MASK);
     768             : }
     769             : 
     770             : 
     771             : /* String functions.  */
     772             : 
     773             : /* Return a pointer to a string containing a description of the error
     774             :    code in the error value ERR.  This function is not thread-safe.  */
     775             : const char *gpg_strerror (gpg_error_t err);
     776             : 
     777             : /* Return the error string for ERR in the user-supplied buffer BUF of
     778             :    size BUFLEN.  This function is, in contrast to gpg_strerror,
     779             :    thread-safe if a thread-safe strerror_r() function is provided by
     780             :    the system.  If the function succeeds, 0 is returned and BUF
     781             :    contains the string describing the error.  If the buffer was not
     782             :    large enough, ERANGE is returned and BUF contains as much of the
     783             :    beginning of the error string as fits into the buffer.  */
     784             : int gpg_strerror_r (gpg_error_t err, char *buf, size_t buflen);
     785             : 
     786             : /* Return a pointer to a string containing a description of the error
     787             :    source in the error value ERR.  */
     788             : const char *gpg_strsource (gpg_error_t err);
     789             : 
     790             : 
     791             : /* Mapping of system errors (errno).  */
     792             : 
     793             : /* Retrieve the error code for the system error ERR.  This returns
     794             :    GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped (report
     795             :    this). */
     796             : gpg_err_code_t gpg_err_code_from_errno (int err);
     797             : 
     798             : 
     799             : /* Retrieve the system error for the error code CODE.  This returns 0
     800             :    if CODE is not a system error code.  */
     801             : int gpg_err_code_to_errno (gpg_err_code_t code);
     802             : 
     803             : 
     804             : /* Retrieve the error code directly from the ERRNO variable.  This
     805             :    returns GPG_ERR_UNKNOWN_ERRNO if the system error is not mapped
     806             :    (report this) and GPG_ERR_MISSING_ERRNO if ERRNO has the value 0. */
     807             : gpg_err_code_t gpg_err_code_from_syserror (void);
     808             : 
     809             : 
     810             : /* Set the ERRNO variable.  This function is the preferred way to set
     811             :    ERRNO due to peculiarities on WindowsCE.  */
     812             : void gpg_err_set_errno (int err);
     813             : 
     814             : /* Return or check the version.  Both functions are identical.  */
     815             : const char *gpgrt_check_version (const char *req_version);
     816             : const char *gpg_error_check_version (const char *req_version);
     817             : 
     818             : /* The version string of this header. */
     819             : #define GPG_ERROR_VERSION "1.19"
     820             : 
     821             : /* The version number of this header. */
     822             : #define GPG_ERROR_VERSION_NUMBER 0x011300
     823             : 
     824             : /* System specific type definitions.  */
     825             : #include <sys/types.h>
     826             : typedef ssize_t gpgrt_ssize_t;
     827             : 
     828             : typedef long gpgrt_off_t;
     829             : 
     830             : 
     831             : 
     832             : 
     833             : /* Self-documenting convenience functions.  */
     834             : 
     835             : static GPG_ERR_INLINE gpg_error_t
     836             : gpg_err_make_from_errno (gpg_err_source_t source, int err)
     837             : {
     838             :   return gpg_err_make (source, gpg_err_code_from_errno (err));
     839             : }
     840             : 
     841             : 
     842             : static GPG_ERR_INLINE gpg_error_t
     843             : gpg_error_from_errno (int err)
     844             : {
     845             :   return gpg_error (gpg_err_code_from_errno (err));
     846             : }
     847             : 
     848             : static GPG_ERR_INLINE gpg_error_t
     849           0 : gpg_error_from_syserror (void)
     850             : {
     851           0 :   return gpg_error (gpg_err_code_from_syserror ());
     852             : }
     853             : 
     854             : 
     855             : 
     856             : /* Lock functions.  */
     857             : 
     858             : 
     859             : typedef struct
     860             : {
     861             :   long _vers;
     862             :   union {
     863             :     volatile char _priv[40];
     864             :     long _x_align;
     865             :     long *_xp_align;
     866             :   } u;
     867             : } gpgrt_lock_t;
     868             : 
     869             : #define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
     870             :                                     0,0,0,0,0,0,0,0, \
     871             :                                     0,0,0,0,0,0,0,0, \
     872             :                                     0,0,0,0,0,0,0,0, \
     873             :                                     0,0,0,0,0,0,0,0}}}
     874             : 
     875             : 
     876             : #define GPGRT_LOCK_DEFINE(name) \
     877             :   static gpgrt_lock_t name  = GPGRT_LOCK_INITIALIZER
     878             : 
     879             : /* NB: If GPGRT_LOCK_DEFINE is not used, zero out the lock variable
     880             :    before passing it to gpgrt_lock_init.  */
     881             : gpg_err_code_t gpgrt_lock_init (gpgrt_lock_t *lockhd);
     882             : gpg_err_code_t gpgrt_lock_lock (gpgrt_lock_t *lockhd);
     883             : gpg_err_code_t gpgrt_lock_trylock (gpgrt_lock_t *lockhd);
     884             : gpg_err_code_t gpgrt_lock_unlock (gpgrt_lock_t *lockhd);
     885             : gpg_err_code_t gpgrt_lock_destroy (gpgrt_lock_t *lockhd);
     886             : 
     887             : 
     888             : 
     889             : /* Thread functions.  */
     890             : 
     891             : gpg_err_code_t gpgrt_yield (void);
     892             : 
     893             : 
     894             : 
     895             : 
     896             : /* Estream */
     897             : 
     898             : /* The definition of this struct is entirely private.  You must not
     899             :    use it for anything.  It is only here so some functions can be
     900             :    implemented as macros.  */
     901             : struct _gpgrt_stream_internal;
     902             : struct _gpgrt__stream
     903             : {
     904             :   /* The layout of this struct must never change.  It may be grown,
     905             :      but only if all functions which access the new members are
     906             :      versioned.  */
     907             : 
     908             :   /* Various flags.  */
     909             :   struct {
     910             :     unsigned int magic: 16;
     911             :     unsigned int writing: 1;
     912             :     unsigned int reserved: 15;
     913             :   } flags;
     914             : 
     915             :   /* A pointer to the stream buffer.  */
     916             :   unsigned char *buffer;
     917             : 
     918             :   /* The size of the buffer in bytes.  */
     919             :   size_t buffer_size;
     920             : 
     921             :   /* The length of the usable data in the buffer, only valid when in
     922             :      read mode (see flags).  */
     923             :   size_t data_len;
     924             : 
     925             :   /* The current position of the offset pointer, valid in read and
     926             :      write mode.  */
     927             :   size_t data_offset;
     928             : 
     929             :   size_t data_flushed;
     930             :   unsigned char *unread_buffer;
     931             :   size_t unread_buffer_size;
     932             : 
     933             :   /* The number of unread bytes.  */
     934             :   size_t unread_data_len;
     935             : 
     936             :   /* A pointer to our internal data for this stream.  */
     937             :   struct _gpgrt_stream_internal *intern;
     938             : };
     939             : 
     940             : /* The opaque type for an estream.  */
     941             : typedef struct _gpgrt__stream *gpgrt_stream_t;
     942             : #ifdef GPGRT_ENABLE_ES_MACROS
     943             : typedef struct _gpgrt__stream *estream_t;
     944             : #endif
     945             : 
     946             : typedef ssize_t (*gpgrt_cookie_read_function_t) (void *cookie,
     947             :                                                  void *buffer, size_t size);
     948             : typedef ssize_t (*gpgrt_cookie_write_function_t) (void *cookie,
     949             :                                                   const void *buffer,
     950             :                                                   size_t size);
     951             : typedef int (*gpgrt_cookie_seek_function_t) (void *cookie,
     952             :                                              gpgrt_off_t *pos, int whence);
     953             : typedef int (*gpgrt_cookie_close_function_t) (void *cookie);
     954             : 
     955             : struct _gpgrt_cookie_io_functions
     956             : {
     957             :   gpgrt_cookie_read_function_t func_read;
     958             :   gpgrt_cookie_write_function_t func_write;
     959             :   gpgrt_cookie_seek_function_t func_seek;
     960             :   gpgrt_cookie_close_function_t func_close;
     961             : };
     962             : typedef struct _gpgrt_cookie_io_functions gpgrt_cookie_io_functions_t;
     963             : #ifdef GPGRT_ENABLE_ES_MACROS
     964             : typedef struct _gpgrt_cookie_io_functions  es_cookie_io_functions_t;
     965             : #define es_cookie_read_function_t  gpgrt_cookie_read_function_t
     966             : #define es_cookie_write_function_t gpgrt_cookie_read_function_t
     967             : #define es_cookie_seek_function_t  gpgrt_cookie_read_function_t
     968             : #define es_cookie_close_function_t gpgrt_cookie_read_function_t
     969             : #endif
     970             : 
     971             : enum gpgrt_syshd_types
     972             :   {
     973             :     GPGRT_SYSHD_NONE = 0,  /* No system handle available.                   */
     974             :     GPGRT_SYSHD_FD = 1,    /* A file descriptor as returned by open().      */
     975             :     GPGRT_SYSHD_SOCK = 2,  /* A socket as returned by socket().             */
     976             :     GPGRT_SYSHD_RVID = 3,  /* A rendevous id (see libassuan's gpgcedev.c).  */
     977             :     GPGRT_SYSHD_HANDLE = 4 /* A HANDLE object (Windows).                    */
     978             :   };
     979             : 
     980             : struct _gpgrt_syshd
     981             : {
     982             :   enum gpgrt_syshd_types type;
     983             :   union {
     984             :     int fd;
     985             :     int sock;
     986             :     int rvid;
     987             :     void *handle;
     988             :   } u;
     989             : };
     990             : typedef struct _gpgrt_syshd gpgrt_syshd_t;
     991             : #ifdef GPGRT_ENABLE_ES_MACROS
     992             : typedef struct _gpgrt_syshd es_syshd_t;
     993             : #define ES_SYSHD_NONE   GPGRT_SYSHD_NONE
     994             : #define ES_SYSHD_FD     GPGRT_SYSHD_FD
     995             : #define ES_SYSHD_SOCK   GPGRT_SYSHD_SOCK
     996             : #define ES_SYSHD_RVID   GPGRT_SYSHD_RVID
     997             : #define ES_SYSHD_HANDLE GPGRT_SYSHD_HANDLE
     998             : #endif
     999             : 
    1000             : gpgrt_stream_t gpgrt_fopen (const char *_GPGRT__RESTRICT path,
    1001             :                             const char *_GPGRT__RESTRICT mode);
    1002             : gpgrt_stream_t gpgrt_mopen (void *_GPGRT__RESTRICT data,
    1003             :                             size_t data_n, size_t data_len,
    1004             :                             unsigned int grow,
    1005             :                             void *(*func_realloc) (void *mem, size_t size),
    1006             :                             void (*func_free) (void *mem),
    1007             :                             const char *_GPGRT__RESTRICT mode);
    1008             : gpgrt_stream_t gpgrt_fopenmem (size_t memlimit,
    1009             :                                const char *_GPGRT__RESTRICT mode);
    1010             : gpgrt_stream_t gpgrt_fopenmem_init (size_t memlimit,
    1011             :                                     const char *_GPGRT__RESTRICT mode,
    1012             :                                     const void *data, size_t datalen);
    1013             : gpgrt_stream_t gpgrt_fdopen    (int filedes, const char *mode);
    1014             : gpgrt_stream_t gpgrt_fdopen_nc (int filedes, const char *mode);
    1015             : gpgrt_stream_t gpgrt_sysopen    (gpgrt_syshd_t *syshd, const char *mode);
    1016             : gpgrt_stream_t gpgrt_sysopen_nc (gpgrt_syshd_t *syshd, const char *mode);
    1017             : gpgrt_stream_t gpgrt_fpopen    (FILE *fp, const char *mode);
    1018             : gpgrt_stream_t gpgrt_fpopen_nc (FILE *fp, const char *mode);
    1019             : gpgrt_stream_t gpgrt_freopen (const char *_GPGRT__RESTRICT path,
    1020             :                               const char *_GPGRT__RESTRICT mode,
    1021             :                               gpgrt_stream_t _GPGRT__RESTRICT stream);
    1022             : gpgrt_stream_t gpgrt_fopencookie (void *_GPGRT__RESTRICT cookie,
    1023             :                                   const char *_GPGRT__RESTRICT mode,
    1024             :                                   gpgrt_cookie_io_functions_t functions);
    1025             : int gpgrt_fclose (gpgrt_stream_t stream);
    1026             : int gpgrt_fclose_snatch (gpgrt_stream_t stream,
    1027             :                          void **r_buffer, size_t *r_buflen);
    1028             : int gpgrt_onclose (gpgrt_stream_t stream, int mode,
    1029             :                    void (*fnc) (gpgrt_stream_t, void*), void *fnc_value);
    1030             : int gpgrt_fileno (gpgrt_stream_t stream);
    1031             : int gpgrt_fileno_unlocked (gpgrt_stream_t stream);
    1032             : int gpgrt_syshd (gpgrt_stream_t stream, gpgrt_syshd_t *syshd);
    1033             : int gpgrt_syshd_unlocked (gpgrt_stream_t stream, gpgrt_syshd_t *syshd);
    1034             : 
    1035             : void _gpgrt_set_std_fd (int no, int fd);
    1036             : gpgrt_stream_t _gpgrt_get_std_stream (int fd);
    1037             : 
    1038             : #define gpgrt_stdin  _gpgrt_get_std_stream (0)
    1039             : #define gpgrt_stdout _gpgrt_get_std_stream (1)
    1040             : #define gpgrt_stderr _gpgrt_get_std_stream (2)
    1041             : 
    1042             : 
    1043             : void gpgrt_flockfile (gpgrt_stream_t stream);
    1044             : int  gpgrt_ftrylockfile (gpgrt_stream_t stream);
    1045             : void gpgrt_funlockfile (gpgrt_stream_t stream);
    1046             : 
    1047             : int gpgrt_feof (gpgrt_stream_t stream);
    1048             : int gpgrt_feof_unlocked (gpgrt_stream_t stream);
    1049             : int gpgrt_ferror (gpgrt_stream_t stream);
    1050             : int gpgrt_ferror_unlocked (gpgrt_stream_t stream);
    1051             : void gpgrt_clearerr (gpgrt_stream_t stream);
    1052             : void gpgrt_clearerr_unlocked (gpgrt_stream_t stream);
    1053             : 
    1054             : int _gpgrt_pending (gpgrt_stream_t stream);          /* (private) */
    1055             : int _gpgrt_pending_unlocked (gpgrt_stream_t stream); /* (private) */
    1056             : 
    1057             : #define gpgrt_pending(stream) _gpgrt_pending (stream)
    1058             : 
    1059             : #define gpgrt_pending_unlocked(stream)                          \
    1060             :   (((!(stream)->flags.writing)                                       \
    1061             :     && (((stream)->data_offset < (stream)->data_len)           \
    1062             :         || ((stream)->unread_data_len)))                        \
    1063             :    ? 1 : _gpgrt_pending_unlocked ((stream)))
    1064             : 
    1065             : int gpgrt_fflush (gpgrt_stream_t stream);
    1066             : int gpgrt_fseek (gpgrt_stream_t stream, long int offset, int whence);
    1067             : int gpgrt_fseeko (gpgrt_stream_t stream, gpgrt_off_t offset, int whence);
    1068             : long int gpgrt_ftell (gpgrt_stream_t stream);
    1069             : gpgrt_off_t gpgrt_ftello (gpgrt_stream_t stream);
    1070             : void gpgrt_rewind (gpgrt_stream_t stream);
    1071             : 
    1072             : int gpgrt_fgetc (gpgrt_stream_t stream);
    1073             : int gpgrt_fputc (int c, gpgrt_stream_t stream);
    1074             : 
    1075             : int _gpgrt_getc_underflow (gpgrt_stream_t stream);       /* (private) */
    1076             : int _gpgrt_putc_overflow (int c, gpgrt_stream_t stream); /* (private) */
    1077             : 
    1078             : #define gpgrt_getc_unlocked(stream)                             \
    1079             :   (((!(stream)->flags.writing)                                       \
    1080             :     && ((stream)->data_offset < (stream)->data_len)            \
    1081             :     && (! (stream)->unread_data_len))                                \
    1082             :   ? ((int) (stream)->buffer[((stream)->data_offset)++])           \
    1083             :   : _gpgrt_getc_underflow ((stream)))
    1084             : 
    1085             : #define gpgrt_putc_unlocked(c, stream)                          \
    1086             :   (((stream)->flags.writing                                  \
    1087             :     && ((stream)->data_offset < (stream)->buffer_size)         \
    1088             :     && (c != '\n'))                                             \
    1089             :   ? ((int) ((stream)->buffer[((stream)->data_offset)++] = (c)))   \
    1090             :   : _gpgrt_putc_overflow ((c), (stream)))
    1091             : 
    1092             : #define gpgrt_getc(stream)    gpgrt_fgetc (stream)
    1093             : #define gpgrt_putc(c, stream) gpgrt_fputc (c, stream)
    1094             : 
    1095             : int gpgrt_ungetc (int c, gpgrt_stream_t stream);
    1096             : 
    1097             : int gpgrt_read (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1098             :                 void *_GPGRT__RESTRICT buffer, size_t bytes_to_read,
    1099             :                 size_t *_GPGRT__RESTRICT bytes_read);
    1100             : int gpgrt_write (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1101             :                  const void *_GPGRT__RESTRICT buffer, size_t bytes_to_write,
    1102             :                  size_t *_GPGRT__RESTRICT bytes_written);
    1103             : int gpgrt_write_sanitized (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1104             :                            const void *_GPGRT__RESTRICT buffer, size_t length,
    1105             :                            const char *delimiters,
    1106             :                            size_t *_GPGRT__RESTRICT bytes_written);
    1107             : int gpgrt_write_hexstring (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1108             :                            const void *_GPGRT__RESTRICT buffer, size_t length,
    1109             :                            int reserved,
    1110             :                            size_t *_GPGRT__RESTRICT bytes_written);
    1111             : 
    1112             : size_t gpgrt_fread (void *_GPGRT__RESTRICT ptr, size_t size, size_t nitems,
    1113             :                     gpgrt_stream_t _GPGRT__RESTRICT stream);
    1114             : size_t gpgrt_fwrite (const void *_GPGRT__RESTRICT ptr, size_t size, size_t memb,
    1115             :                      gpgrt_stream_t _GPGRT__RESTRICT stream);
    1116             : 
    1117             : char *gpgrt_fgets (char *_GPGRT__RESTRICT s, int n,
    1118             :                    gpgrt_stream_t _GPGRT__RESTRICT stream);
    1119             : int gpgrt_fputs (const char *_GPGRT__RESTRICT s,
    1120             :                  gpgrt_stream_t _GPGRT__RESTRICT stream);
    1121             : int gpgrt_fputs_unlocked (const char *_GPGRT__RESTRICT s,
    1122             :                           gpgrt_stream_t _GPGRT__RESTRICT stream);
    1123             : 
    1124             : ssize_t gpgrt_getline (char *_GPGRT__RESTRICT *_GPGRT__RESTRICT lineptr,
    1125             :                        size_t *_GPGRT__RESTRICT n,
    1126             :                        gpgrt_stream_t stream);
    1127             : ssize_t gpgrt_read_line (gpgrt_stream_t stream,
    1128             :                          char **addr_of_buffer, size_t *length_of_buffer,
    1129             :                          size_t *max_length);
    1130             : void gpgrt_free (void *a);
    1131             : 
    1132             : int gpgrt_fprintf (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1133             :                    const char *_GPGRT__RESTRICT format, ...)
    1134             :                    _GPGRT_GCC_A_PRINTF(2,3);
    1135             : int gpgrt_fprintf_unlocked (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1136             :                             const char *_GPGRT__RESTRICT format, ...)
    1137             :                             _GPGRT_GCC_A_PRINTF(2,3);
    1138             : 
    1139             : int gpgrt_printf (const char *_GPGRT__RESTRICT format, ...)
    1140             :                   _GPGRT_GCC_A_PRINTF(1,2);
    1141             : int gpgrt_printf_unlocked (const char *_GPGRT__RESTRICT format, ...)
    1142             :                            _GPGRT_GCC_A_PRINTF(1,2);
    1143             : 
    1144             : int gpgrt_vfprintf (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1145             :                     const char *_GPGRT__RESTRICT format, va_list ap)
    1146             :                     _GPGRT_GCC_A_PRINTF(2,0);
    1147             : int gpgrt_vfprintf_unlocked (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1148             :                              const char *_GPGRT__RESTRICT format, va_list ap)
    1149             :                              _GPGRT_GCC_A_PRINTF(2,0);
    1150             : 
    1151             : int gpgrt_setvbuf (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1152             :                    char *_GPGRT__RESTRICT buf, int mode, size_t size);
    1153             : void gpgrt_setbuf (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1154             :                    char *_GPGRT__RESTRICT buf);
    1155             : 
    1156             : void gpgrt_set_binary (gpgrt_stream_t stream);
    1157             : 
    1158             : gpgrt_stream_t gpgrt_tmpfile (void);
    1159             : 
    1160             : void gpgrt_opaque_set (gpgrt_stream_t _GPGRT__RESTRICT stream,
    1161             :                        void *_GPGRT__RESTRICT opaque);
    1162             : void *gpgrt_opaque_get (gpgrt_stream_t stream);
    1163             : 
    1164             : void gpgrt_fname_set (gpgrt_stream_t stream, const char *fname);
    1165             : const char *gpgrt_fname_get (gpgrt_stream_t stream);
    1166             : 
    1167             : int gpgrt_asprintf (char **r_buf, const char * _GPGRT__RESTRICT format, ...)
    1168             :                     _GPGRT_GCC_A_PRINTF(2,3);
    1169             : int gpgrt_vasprintf (char **r_buf, const char * _GPGRT__RESTRICT format,
    1170             :                      va_list ap)
    1171             :                      _GPGRT_GCC_A_PRINTF(2,0);
    1172             : char *gpgrt_bsprintf (const char * _GPGRT__RESTRICT format, ...)
    1173             :                       _GPGRT_GCC_A_PRINTF(1,2);
    1174             : char *gpgrt_vbsprintf (const char * _GPGRT__RESTRICT format, va_list ap)
    1175             :                        _GPGRT_GCC_A_PRINTF(1,0);
    1176             : int gpgrt_snprintf (char *buf, size_t bufsize,
    1177             :                     const char * _GPGRT__RESTRICT format, ...)
    1178             :                     _GPGRT_GCC_A_PRINTF(3,4);
    1179             : int gpgrt_vsnprintf (char *buf,size_t bufsize,
    1180             :                      const char * _GPGRT__RESTRICT format, va_list arg_ptr)
    1181             :                      _GPGRT_GCC_A_PRINTF(3,0);
    1182             : 
    1183             : 
    1184             : #ifdef GPGRT_ENABLE_ES_MACROS
    1185             : # define es_fopen             gpgrt_fopen
    1186             : # define es_mopen             gpgrt_mopen
    1187             : # define es_fopenmem          gpgrt_fopenmem
    1188             : # define es_fopenmem_init     gpgrt_fopenmem_init
    1189             : # define es_fdopen            gpgrt_fdopen
    1190             : # define es_fdopen_nc         gpgrt_fdopen_nc
    1191             : # define es_sysopen           gpgrt_sysopen
    1192             : # define es_sysopen_nc        gpgrt_sysopen_nc
    1193             : # define es_fpopen            gpgrt_fpopen
    1194             : # define es_fpopen_nc         gpgrt_fpopen_nc
    1195             : # define es_freopen           gpgrt_freopen
    1196             : # define es_fopencookie       gpgrt_fopencookie
    1197             : # define es_fclose            gpgrt_fclose
    1198             : # define es_fclose_snatch     gpgrt_fclose_snatch
    1199             : # define es_onclose           gpgrt_onclose
    1200             : # define es_fileno            gpgrt_fileno
    1201             : # define es_fileno_unlocked   gpgrt_fileno_unlocked
    1202             : # define es_syshd             gpgrt_syshd
    1203             : # define es_syshd_unlocked    gpgrt_syshd_unlocked
    1204             : # define es_stdin             _gpgrt_get_std_stream (0)
    1205             : # define es_stdout            _gpgrt_get_std_stream (1)
    1206             : # define es_stderr            _gpgrt_get_std_stream (2)
    1207             : # define es_flockfile         gpgrt_flockfile
    1208             : # define es_ftrylockfile      gpgrt_ftrylockfile
    1209             : # define es_funlockfile       gpgrt_funlockfile
    1210             : # define es_feof              gpgrt_feof
    1211             : # define es_feof_unlocked     gpgrt_feof_unlocked
    1212             : # define es_ferror            gpgrt_ferror
    1213             : # define es_ferror_unlocked   gpgrt_ferror_unlocked
    1214             : # define es_clearerr          gpgrt_clearerr
    1215             : # define es_clearerr_unlocked gpgrt_clearerr_unlocked
    1216             : # define es_pending           gpgrt_pending
    1217             : # define es_pending_unlocked  gpgrt_pending_unlocked
    1218             : # define es_fflush            gpgrt_fflush
    1219             : # define es_fseek             gpgrt_fseek
    1220             : # define es_fseeko            gpgrt_fseeko
    1221             : # define es_ftell             gpgrt_ftell
    1222             : # define es_ftello            gpgrt_ftello
    1223             : # define es_rewind            gpgrt_rewind
    1224             : # define es_fgetc             gpgrt_fgetc
    1225             : # define es_fputc             gpgrt_fputc
    1226             : # define es_getc_unlocked     gpgrt_getc_unlocked
    1227             : # define es_putc_unlocked     gpgrt_putc_unlocked
    1228             : # define es_getc              gpgrt_getc
    1229             : # define es_putc              gpgrt_putc
    1230             : # define es_ungetc            gpgrt_ungetc
    1231             : # define es_read              gpgrt_read
    1232             : # define es_write             gpgrt_write
    1233             : # define es_write_sanitized   gpgrt_write_sanitized
    1234             : # define es_write_hexstring   gpgrt_write_hexstring
    1235             : # define es_fread             gpgrt_fread
    1236             : # define es_fwrite            gpgrt_fwrite
    1237             : # define es_fgets             gpgrt_fgets
    1238             : # define es_fputs             gpgrt_fputs
    1239             : # define es_fputs_unlocked    gpgrt_fputs_unlocked
    1240             : # define es_getline           gpgrt_getline
    1241             : # define es_read_line         gpgrt_read_line
    1242             : # define es_free              gpgrt_free
    1243             : # define es_fprintf           gpgrt_fprintf
    1244             : # define es_fprintf_unlocked  gpgrt_fprintf_unlocked
    1245             : # define es_printf            gpgrt_printf
    1246             : # define es_printf_unlocked   gpgrt_printf_unlocked
    1247             : # define es_vfprintf          gpgrt_vfprintf
    1248             : # define es_vfprintf_unlocked gpgrt_vfprintf_unlocked
    1249             : # define es_setvbuf           gpgrt_setvbuf
    1250             : # define es_setbuf            gpgrt_setbuf
    1251             : # define es_set_binary        gpgrt_set_binary
    1252             : # define es_tmpfile           gpgrt_tmpfile
    1253             : # define es_opaque_set        gpgrt_opaque_set
    1254             : # define es_opaque_get        gpgrt_opaque_get
    1255             : # define es_fname_set         gpgrt_fname_set
    1256             : # define es_fname_get         gpgrt_fname_get
    1257             : # define es_asprintf          gpgrt_asprintf
    1258             : # define es_vasprintf         gpgrt_vasprintf
    1259             : # define es_bsprintf          gpgrt_bsprintf
    1260             : # define es_vbsprintf         gpgrt_vbsprintf
    1261             : #endif /*GPGRT_ENABLE_ES_MACROS*/
    1262             : 
    1263             : #ifdef __cplusplus
    1264             : }
    1265             : #endif
    1266             : #endif  /* GPG_ERROR_H */
    1267             : /*
    1268             : Local Variables:
    1269             : buffer-read-only: t
    1270             : End:
    1271             : */

Generated by: LCOV version 1.11