mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-04 20:38:50 +01:00
* status.c (do_get_from_fd, do_shm_get): s/bool/getbool/ to
overcome problems with Mac OS 10.5 which seems to include stdbool.h silently.
This commit is contained in:
parent
a426c89ae3
commit
14296f338f
1
AUTHORS
1
AUTHORS
@ -2,6 +2,7 @@ Program: GnuPG
|
|||||||
Maintainer: Werner Koch <wk@gnupg.org>
|
Maintainer: Werner Koch <wk@gnupg.org>
|
||||||
Bug reports: <bug-gnupg@gnu.org>
|
Bug reports: <bug-gnupg@gnu.org>
|
||||||
Security related bug reports: <security@gnupg.org>
|
Security related bug reports: <security@gnupg.org>
|
||||||
|
License: GPLv3+
|
||||||
|
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
|
@ -1338,5 +1338,6 @@ you could search in the mailing list archive.
|
|||||||
[H hr]
|
[H hr]
|
||||||
|
|
||||||
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.,
|
Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.,
|
||||||
|
|
||||||
Verbatim copying and distribution of this entire article is permitted in
|
Verbatim copying and distribution of this entire article is permitted in
|
||||||
any medium, provided this notice is preserved.
|
any medium, provided this notice is preserved.
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2007-11-12 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* status.c (do_get_from_fd, do_shm_get): s/bool/getbool/ to
|
||||||
|
overcome problems with Mac OS 10.5 which seems to include
|
||||||
|
stdbool.h silently.
|
||||||
|
|
||||||
2007-10-27 David Shaw <dshaw@jabberwocky.com>
|
2007-10-27 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* parse-packet.c (parse_onepass_sig): Sigclass is hex, so include
|
* parse-packet.c (parse_onepass_sig): Sigclass is hex, so include
|
||||||
|
16
g10/status.c
16
g10/status.c
@ -468,10 +468,10 @@ init_shm_coprocessing ( ulong requested_shm_size, int lock_mem )
|
|||||||
|
|
||||||
/****************
|
/****************
|
||||||
* Request a string from client
|
* Request a string from client
|
||||||
* If bool, returns static string on true (do not free) or NULL for false
|
* If GETBOOL, returns static string on true (do not free) or NULL for false
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
do_shm_get( const char *keyword, int hidden, int bool )
|
do_shm_get( const char *keyword, int hidden, int getbool )
|
||||||
{
|
{
|
||||||
size_t n;
|
size_t n;
|
||||||
byte *p;
|
byte *p;
|
||||||
@ -485,7 +485,7 @@ do_shm_get( const char *keyword, int hidden, int bool )
|
|||||||
shm_area[2] = 1; /* indicate that we are waiting on a reply */
|
shm_area[2] = 1; /* indicate that we are waiting on a reply */
|
||||||
shm_area[3] = 0; /* clear data available flag */
|
shm_area[3] = 0; /* clear data available flag */
|
||||||
|
|
||||||
write_status_text( bool? STATUS_SHM_GET_BOOL :
|
write_status_text( getbool? STATUS_SHM_GET_BOOL :
|
||||||
hidden? STATUS_SHM_GET_HIDDEN : STATUS_SHM_GET, keyword );
|
hidden? STATUS_SHM_GET_HIDDEN : STATUS_SHM_GET, keyword );
|
||||||
|
|
||||||
do {
|
do {
|
||||||
@ -500,7 +500,7 @@ do_shm_get( const char *keyword, int hidden, int bool )
|
|||||||
if( n+32+2+1 > 4095 )
|
if( n+32+2+1 > 4095 )
|
||||||
log_fatal("client returns too large data (%u bytes)\n", (unsigned)n );
|
log_fatal("client returns too large data (%u bytes)\n", (unsigned)n );
|
||||||
|
|
||||||
if( bool )
|
if( getbool )
|
||||||
return p[0]? "" : NULL;
|
return p[0]? "" : NULL;
|
||||||
|
|
||||||
string = hidden? xmalloc_secure( n+1 ) : xmalloc( n+1 );
|
string = hidden? xmalloc_secure( n+1 ) : xmalloc( n+1 );
|
||||||
@ -543,10 +543,10 @@ myread(int fd, void *buf, size_t count)
|
|||||||
|
|
||||||
/****************
|
/****************
|
||||||
* Request a string from the client over the command-fd
|
* Request a string from the client over the command-fd
|
||||||
* If bool, returns static string on true (do not free) or NULL for false
|
* If getbool, returns static string on true (do not free) or NULL for false
|
||||||
*/
|
*/
|
||||||
static char *
|
static char *
|
||||||
do_get_from_fd( const char *keyword, int hidden, int bool )
|
do_get_from_fd( const char *keyword, int hidden, int getbool )
|
||||||
{
|
{
|
||||||
int i, len;
|
int i, len;
|
||||||
char *string;
|
char *string;
|
||||||
@ -554,7 +554,7 @@ do_get_from_fd( const char *keyword, int hidden, int bool )
|
|||||||
if(statusfp!=stdout)
|
if(statusfp!=stdout)
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
|
|
||||||
write_status_text( bool? STATUS_GET_BOOL :
|
write_status_text( getbool? STATUS_GET_BOOL :
|
||||||
hidden? STATUS_GET_HIDDEN : STATUS_GET_LINE, keyword );
|
hidden? STATUS_GET_HIDDEN : STATUS_GET_LINE, keyword );
|
||||||
|
|
||||||
for( string = NULL, i = len = 200; ; i++ ) {
|
for( string = NULL, i = len = 200; ; i++ ) {
|
||||||
@ -581,7 +581,7 @@ do_get_from_fd( const char *keyword, int hidden, int bool )
|
|||||||
|
|
||||||
write_status( STATUS_GOT_IT );
|
write_status( STATUS_GOT_IT );
|
||||||
|
|
||||||
if( bool ) /* Fixme: is this correct??? */
|
if( getbool ) /* Fixme: is this correct??? */
|
||||||
return (string[0] == 'Y' || string[0] == 'y') ? "" : NULL;
|
return (string[0] == 'Y' || string[0] == 'y') ? "" : NULL;
|
||||||
|
|
||||||
return string;
|
return string;
|
||||||
|
Loading…
Reference in New Issue
Block a user