From e6ed68e8290c4e746210c0df04d0c4d5d18b9c9b Mon Sep 17 00:00:00 2001 From: Marcus Brinkmann Date: Mon, 26 Oct 2009 16:45:05 +0000 Subject: 2009-10-26 Marcus Brinkmann * src/gpg-error.h.in (GPG_ERR_SOURCE_DIM): Reduce to 128. --- ChangeLog | 4 ++++ src/gpg-error.h.in | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ff41933..d658fea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-10-26 Marcus Brinkmann + + * src/gpg-error.h.in (GPG_ERR_SOURCE_DIM): Reduce to 128. + 2009-09-21 Werner Koch * src/err-sources.h.in (GPG_ERR_SOURCE_G13): New. diff --git a/src/gpg-error.h.in b/src/gpg-error.h.in index 46325c5..f86201c 100644 --- a/src/gpg-error.h.in +++ b/src/gpg-error.h.in @@ -74,7 +74,7 @@ typedef enum @include err-sources.h.in /* This is one more than the largest allowed entry. */ - GPG_ERR_SOURCE_DIM = 256 + GPG_ERR_SOURCE_DIM = 128 } gpg_err_source_t; @@ -109,10 +109,14 @@ typedef unsigned int gpg_error_t; /* Bits 17 to 24 are reserved. */ -/* We use the upper 8 bits of gpg_error_t for error sources. */ +/* We use the upper 7 bits of gpg_error_t for error sources. */ #define GPG_ERR_SOURCE_MASK (GPG_ERR_SOURCE_DIM - 1) #define GPG_ERR_SOURCE_SHIFT 24 +/* The highest bit is reserved. It shouldn't be used to prevent + potential negative numbers when transmitting error values as + text. */ + /* GCC feature test. */ #undef _GPG_ERR_HAVE_CONSTRUCTOR -- cgit v1.2.3