`byte' typedef?

Werner Koch wk at gnupg.org
Mon Jul 1 10:36:01 CEST 2002


On Wed, 12 Jun 2002 14:04:07 -0500, David Champion said:

> I was cleaning these up when I realized that the use of "byte" types was
> intentional. What's the reasoning for this? What would be the preferred

In general I believe that unsigned char* makes much more sense than a
signed char.  However most Posix function expect char * and most
compilers default to signed for char.  One major problem I encountered
over the years are C libs not implementing the isfoo() suite correctly
(e.g. HPUX).  So you have to use either unsigned char * or cast to
that before using any of these functions or you will pretty sure get a
SEGV.

> where it didn't appear to matter whether they were unsigned, but perhaps
> casts are preferred?

casts are only required very rarely today since we now have the void*.



More information about the Gnupg-devel mailing list