aboutsummaryrefslogtreecommitdiffstats
path: root/scd/scdaemon.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-06-03 19:55:50 +0000
committerWerner Koch <[email protected]>2003-06-03 19:55:50 +0000
commitc3cdaeeff72486e52118054d92ac518c17aa3812 (patch)
tree7abfa77336a37f8f02526498c4f77fba33b965bf /scd/scdaemon.h
parent* options.h, g10.c (main), keylist.c (list_keyblock_print): Add (diff)
downloadgnupg-c3cdaeeff72486e52118054d92ac518c17aa3812.tar.gz
gnupg-c3cdaeeff72486e52118054d92ac518c17aa3812.zip
Make use of libgpg-error
Diffstat (limited to '')
-rw-r--r--scd/scdaemon.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/scd/scdaemon.h b/scd/scdaemon.h
index 9fbf891bb..59d40e519 100644
--- a/scd/scdaemon.h
+++ b/scd/scdaemon.h
@@ -1,5 +1,5 @@
/* scdaemon.h - Global definitions for the SCdaemon
- * Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+ * Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@@ -21,11 +21,27 @@
#ifndef SCDAEMON_H
#define SCDAEMON_H
+#ifdef GPG_ERR_SOURCE_DEFAULT
+#error GPG_ERR_SOURCE_DEFAULT already defined
+#endif
+#define GPG_ERR_SOURCE_DEFAULT GPG_ERR_SOURCE_SCD
+#include <gpg-error.h>
+#include <errno.h>
+
#include <time.h>
#include <gcrypt.h>
#include "../common/util.h"
#include "../common/errors.h"
+/* Convenience funcion to be used instead of returning the old
+ GNUPG_Out_Of_Core. */
+static __inline__ gpg_error_t
+out_of_core (void)
+{
+ return gpg_error (gpg_err_code_from_errno (errno));
+}
+
+
#define MAX_DIGEST_LEN 24
/* A large struct name "opt" to keep global flags */
@@ -48,6 +64,7 @@ struct {
#define DBG_MEMSTAT_VALUE 128 /* show memory statistics */
#define DBG_HASHING_VALUE 512 /* debug hashing operations */
#define DBG_ASSUAN_VALUE 1024
+#define DBG_CARD_IO_VALUE 2048
#define DBG_COMMAND (opt.debug & DBG_COMMAND_VALUE)
#define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
@@ -55,6 +72,7 @@ struct {
#define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
#define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
#define DBG_ASSUAN (opt.debug & DBG_ASSUAN_VALUE)
+#define DBG_CARD_IO (opt.debug & DBG_CARD_IO_VALUE)
struct server_local_s;
struct card_ctx_s;