1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

common: Rename log and gcc attribute macros (jnlib merge).

* common/logging.h: Rename JNLIB_LOG_* to GPGRT_LOG_*.
* common/mischelp.h: Rename JNLIB_GCC_* to GPGRT_GCC_*.
--

JNLIB has no more meaning.  Thus we switch to a GPGRT_ prefix in
anticipation that some code may eventually be moved to libgpg-error.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2015-04-24 15:49:18 +02:00
parent 575230d91b
commit 26d7e0d7ac
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
21 changed files with 112 additions and 112 deletions

View File

@ -278,7 +278,7 @@ typedef int (*lookup_ttl_t)(const char *hexgrip);
/*-- gpg-agent.c --*/
void agent_exit (int rc) JNLIB_GCC_A_NR; /* Also implemented in other tools */
void agent_exit (int rc) GPGRT_GCC_A_NR; /* Also implemented in other tools */
gpg_error_t agent_copy_startup_env (ctrl_t ctrl);
const char *get_agent_socket_name (void);
const char *get_agent_ssh_socket_name (void);
@ -294,7 +294,7 @@ gpg_error_t agent_write_status (ctrl_t ctrl, const char *keyword, ...)
GNUPG_GCC_A_SENTINEL(0);
gpg_error_t agent_print_status (ctrl_t ctrl, const char *keyword,
const char *format, ...)
JNLIB_GCC_A_PRINTF(3,4);
GPGRT_GCC_A_PRINTF(3,4);
void bump_key_eventcounter (void);
void bump_card_eventcounter (void);
void start_command_handler (ctrl_t, gnupg_fd_t, gnupg_fd_t);

View File

@ -681,7 +681,7 @@ main (int argc, char **argv )
/* Please note that we may running SUID(ROOT), so be very CAREFUL
when adding any stuff between here and the call to INIT_SECMEM()
somewhere after the option parsing */
log_set_prefix (GPG_AGENT_NAME, JNLIB_LOG_WITH_PREFIX|JNLIB_LOG_WITH_PID);
log_set_prefix (GPG_AGENT_NAME, GPGRT_LOG_WITH_PREFIX|GPGRT_LOG_WITH_PID);
/* Make sure that our subsystems are ready. */
i18n_init ();
@ -1071,9 +1071,9 @@ main (int argc, char **argv )
if (logfile)
{
log_set_file (logfile);
log_set_prefix (NULL, (JNLIB_LOG_WITH_PREFIX
|JNLIB_LOG_WITH_TIME
|JNLIB_LOG_WITH_PID));
log_set_prefix (NULL, (GPGRT_LOG_WITH_PREFIX
| GPGRT_LOG_WITH_TIME
| GPGRT_LOG_WITH_PID));
current_logfile = xstrdup (logfile);
}
@ -1303,7 +1303,7 @@ main (int argc, char **argv )
}
log_get_prefix (&oldflags);
log_set_prefix (NULL, oldflags | JNLIB_LOG_RUN_DETACHED);
log_set_prefix (NULL, oldflags | GPGRT_LOG_RUN_DETACHED);
opt.running_detached = 1;
}
@ -1659,7 +1659,7 @@ create_server_socket (char *name, int primary,
server is not yet operational; this would lead to a hang. */
if (primary && !check_for_running_agent (1))
{
log_set_prefix (NULL, JNLIB_LOG_WITH_PREFIX);
log_set_prefix (NULL, GPGRT_LOG_WITH_PREFIX);
log_set_file (NULL);
log_error (_("a gpg-agent is already running - "
"not starting a new one\n"));

View File

@ -85,7 +85,7 @@ my_libassuan_log_handler (assuan_context_t ctx, void *hook,
return 0; /* Assuan debugging is not enabled. */
if (msg)
log_string (JNLIB_LOG_DEBUG, msg);
log_string (GPGRT_LOG_DEBUG, msg);
return 1;
}

View File

@ -81,11 +81,11 @@ start_new_dirmngr (assuan_context_t *r_ctx,
gpg_error_t print_assuan_status (assuan_context_t ctx,
const char *keyword,
const char *format,
...) JNLIB_GCC_A_PRINTF(3,4);
...) GPGRT_GCC_A_PRINTF(3,4);
gpg_error_t vprint_assuan_status (assuan_context_t ctx,
const char *keyword,
const char *format,
va_list arg_ptr) JNLIB_GCC_A_PRINTF(3,0);
va_list arg_ptr) GPGRT_GCC_A_PRINTF(3,0);
#endif /*GNUPG_COMMON_ASSHELP_H*/

View File

@ -72,11 +72,11 @@ struct audit_ctx_s
static void writeout_para (audit_ctx_t ctx,
const char *format, ...) JNLIB_GCC_A_PRINTF(2,3);
const char *format, ...) GPGRT_GCC_A_PRINTF(2,3);
static void writeout_li (audit_ctx_t ctx, const char *oktext,
const char *format, ...) JNLIB_GCC_A_PRINTF(3,4);
const char *format, ...) GPGRT_GCC_A_PRINTF(3,4);
static void writeout_rem (audit_ctx_t ctx,
const char *format, ...) JNLIB_GCC_A_PRINTF(2,3);
const char *format, ...) GPGRT_GCC_A_PRINTF(2,3);
/* Add NAME to the list of help tags. NAME needs to be a const string

View File

@ -268,7 +268,7 @@ check_portable_app (const char *dir)
{
unsigned int flags;
log_get_prefix (&flags);
log_set_prefix (NULL, (flags | JNLIB_LOG_NO_REGISTRY));
log_set_prefix (NULL, (flags | GPGRT_LOG_NO_REGISTRY));
}
/* FIXME: We should read the file to detect special flags
and print a warning if we don't understand them */

View File

@ -570,12 +570,12 @@ log_set_prefix (const char *text, unsigned int flags)
prefix_buffer[sizeof (prefix_buffer)-1] = 0;
}
with_prefix = (flags & JNLIB_LOG_WITH_PREFIX);
with_time = (flags & JNLIB_LOG_WITH_TIME);
with_pid = (flags & JNLIB_LOG_WITH_PID);
running_detached = (flags & JNLIB_LOG_RUN_DETACHED);
with_prefix = (flags & GPGRT_LOG_WITH_PREFIX);
with_time = (flags & GPGRT_LOG_WITH_TIME);
with_pid = (flags & GPGRT_LOG_WITH_PID);
running_detached = (flags & GPGRT_LOG_RUN_DETACHED);
#ifdef HAVE_W32_SYSTEM
no_registry = (flags & JNLIB_LOG_NO_REGISTRY);
no_registry = (flags & GPGRT_LOG_NO_REGISTRY);
#endif
}
@ -587,16 +587,16 @@ log_get_prefix (unsigned int *flags)
{
*flags = 0;
if (with_prefix)
*flags |= JNLIB_LOG_WITH_PREFIX;
*flags |= GPGRT_LOG_WITH_PREFIX;
if (with_time)
*flags |= JNLIB_LOG_WITH_TIME;
*flags |= GPGRT_LOG_WITH_TIME;
if (with_pid)
*flags |= JNLIB_LOG_WITH_PID;
*flags |= GPGRT_LOG_WITH_PID;
if (running_detached)
*flags |= JNLIB_LOG_RUN_DETACHED;
*flags |= GPGRT_LOG_RUN_DETACHED;
#ifdef HAVE_W32_SYSTEM
if (no_registry)
*flags |= JNLIB_LOG_NO_REGISTRY;
*flags |= GPGRT_LOG_NO_REGISTRY;
#endif
}
return prefix_buffer;
@ -657,11 +657,11 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
}
es_flockfile (logstream);
if (missing_lf && level != JNLIB_LOG_CONT)
if (missing_lf && level != GPGRT_LOG_CONT)
es_putc_unlocked ('\n', logstream );
missing_lf = 0;
if (level != JNLIB_LOG_CONT)
if (level != GPGRT_LOG_CONT)
{ /* Note this does not work for multiple line logging as we would
* need to print to a buffer first */
if (with_time && !force_prefixes)
@ -699,14 +699,14 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
switch (level)
{
case JNLIB_LOG_BEGIN: break;
case JNLIB_LOG_CONT: break;
case JNLIB_LOG_INFO: break;
case JNLIB_LOG_WARN: break;
case JNLIB_LOG_ERROR: break;
case JNLIB_LOG_FATAL: es_fputs_unlocked ("Fatal: ",logstream ); break;
case JNLIB_LOG_BUG: es_fputs_unlocked ("Ohhhh jeeee: ", logstream); break;
case JNLIB_LOG_DEBUG: es_fputs_unlocked ("DBG: ", logstream ); break;
case GPGRT_LOG_BEGIN: break;
case GPGRT_LOG_CONT: break;
case GPGRT_LOG_INFO: break;
case GPGRT_LOG_WARN: break;
case GPGRT_LOG_ERROR: break;
case GPGRT_LOG_FATAL: es_fputs_unlocked ("Fatal: ",logstream ); break;
case GPGRT_LOG_BUG: es_fputs_unlocked ("Ohhhh jeeee: ", logstream); break;
case GPGRT_LOG_DEBUG: es_fputs_unlocked ("DBG: ", logstream ); break;
default:
es_fprintf_unlocked (logstream,"[Unknown log level %d]: ", level);
break;
@ -722,14 +722,14 @@ do_logv (int level, int ignore_arg_ptr, const char *fmt, va_list arg_ptr)
missing_lf = 1;
}
if (level == JNLIB_LOG_FATAL)
if (level == GPGRT_LOG_FATAL)
{
if (missing_lf)
es_putc_unlocked ('\n', logstream);
es_funlockfile (logstream);
exit (2);
}
else if (level == JNLIB_LOG_BUG)
else if (level == GPGRT_LOG_BUG)
{
if (missing_lf)
es_putc_unlocked ('\n', logstream );
@ -785,7 +785,7 @@ log_info (const char *fmt, ...)
va_list arg_ptr ;
va_start (arg_ptr, fmt);
do_logv (JNLIB_LOG_INFO, 0, fmt, arg_ptr);
do_logv (GPGRT_LOG_INFO, 0, fmt, arg_ptr);
va_end (arg_ptr);
}
@ -796,7 +796,7 @@ log_error (const char *fmt, ...)
va_list arg_ptr ;
va_start (arg_ptr, fmt);
do_logv (JNLIB_LOG_ERROR, 0, fmt, arg_ptr);
do_logv (GPGRT_LOG_ERROR, 0, fmt, arg_ptr);
va_end (arg_ptr);
/* Protect against counter overflow. */
if (errorcount < 30000)
@ -810,7 +810,7 @@ log_fatal (const char *fmt, ...)
va_list arg_ptr ;
va_start (arg_ptr, fmt);
do_logv (JNLIB_LOG_FATAL, 0, fmt, arg_ptr);
do_logv (GPGRT_LOG_FATAL, 0, fmt, arg_ptr);
va_end (arg_ptr);
abort (); /* Never called; just to make the compiler happy. */
}
@ -822,7 +822,7 @@ log_bug (const char *fmt, ...)
va_list arg_ptr ;
va_start (arg_ptr, fmt);
do_logv (JNLIB_LOG_BUG, 0, fmt, arg_ptr);
do_logv (GPGRT_LOG_BUG, 0, fmt, arg_ptr);
va_end (arg_ptr);
abort (); /* Never called; just to make the compiler happy. */
}
@ -834,7 +834,7 @@ log_debug (const char *fmt, ...)
va_list arg_ptr ;
va_start (arg_ptr, fmt);
do_logv (JNLIB_LOG_DEBUG, 0, fmt, arg_ptr);
do_logv (GPGRT_LOG_DEBUG, 0, fmt, arg_ptr);
va_end (arg_ptr);
}
@ -845,7 +845,7 @@ log_printf (const char *fmt, ...)
va_list arg_ptr;
va_start (arg_ptr, fmt);
do_logv (fmt ? JNLIB_LOG_CONT : JNLIB_LOG_BEGIN, 0, fmt, arg_ptr);
do_logv (fmt ? GPGRT_LOG_CONT : GPGRT_LOG_BEGIN, 0, fmt, arg_ptr);
va_end (arg_ptr);
}
@ -855,7 +855,7 @@ log_printf (const char *fmt, ...)
void
log_flush (void)
{
do_log_ignore_arg (JNLIB_LOG_CONT, NULL);
do_log_ignore_arg (GPGRT_LOG_CONT, NULL);
}
@ -923,14 +923,14 @@ log_clock (const char *string)
void
bug_at( const char *file, int line, const char *func )
{
log_log (JNLIB_LOG_BUG, ("... this is a bug (%s:%d:%s)\n"), file, line, func);
log_log (GPGRT_LOG_BUG, ("... this is a bug (%s:%d:%s)\n"), file, line, func);
abort (); /* Never called; just to make the compiler happy. */
}
#else
void
bug_at( const char *file, int line )
{
log_log (JNLIB_LOG_BUG, _("you found a bug ... (%s:%d)\n"), file, line);
log_log (GPGRT_LOG_BUG, _("you found a bug ... (%s:%d)\n"), file, line);
abort (); /* Never called; just to make the compiler happy. */
}
#endif

View File

@ -48,8 +48,8 @@ int log_test_fd (int fd);
int log_get_fd(void);
estream_t log_get_stream (void);
#ifdef JNLIB_GCC_M_FUNCTION
void bug_at( const char *file, int line, const char *func ) JNLIB_GCC_A_NR;
#ifdef GPGRT_GCC_M_FUNCTION
void bug_at( const char *file, int line, const char *func ) GPGRT_GCC_A_NR;
# define BUG() bug_at( __FILE__ , __LINE__, __FUNCTION__ )
#else
void bug_at( const char *file, int line );
@ -57,34 +57,34 @@ estream_t log_get_stream (void);
#endif
/* Flag values for log_set_prefix. */
#define JNLIB_LOG_WITH_PREFIX 1
#define JNLIB_LOG_WITH_TIME 2
#define JNLIB_LOG_WITH_PID 4
#define JNLIB_LOG_RUN_DETACHED 256
#define JNLIB_LOG_NO_REGISTRY 512
#define GPGRT_LOG_WITH_PREFIX 1
#define GPGRT_LOG_WITH_TIME 2
#define GPGRT_LOG_WITH_PID 4
#define GPGRT_LOG_RUN_DETACHED 256
#define GPGRT_LOG_NO_REGISTRY 512
/* Log levels as used by log_log. */
enum jnlib_log_levels {
JNLIB_LOG_BEGIN,
JNLIB_LOG_CONT,
JNLIB_LOG_INFO,
JNLIB_LOG_WARN,
JNLIB_LOG_ERROR,
JNLIB_LOG_FATAL,
JNLIB_LOG_BUG,
JNLIB_LOG_DEBUG
GPGRT_LOG_BEGIN,
GPGRT_LOG_CONT,
GPGRT_LOG_INFO,
GPGRT_LOG_WARN,
GPGRT_LOG_ERROR,
GPGRT_LOG_FATAL,
GPGRT_LOG_BUG,
GPGRT_LOG_DEBUG
};
void log_log (int level, const char *fmt, ...) JNLIB_GCC_A_PRINTF(2,3);
void log_log (int level, const char *fmt, ...) GPGRT_GCC_A_PRINTF(2,3);
void log_logv (int level, const char *fmt, va_list arg_ptr);
void log_string (int level, const char *string);
void log_bug( const char *fmt, ... ) JNLIB_GCC_A_NR_PRINTF(1,2);
void log_fatal( const char *fmt, ... ) JNLIB_GCC_A_NR_PRINTF(1,2);
void log_error( const char *fmt, ... ) JNLIB_GCC_A_PRINTF(1,2);
void log_info( const char *fmt, ... ) JNLIB_GCC_A_PRINTF(1,2);
void log_debug( const char *fmt, ... ) JNLIB_GCC_A_PRINTF(1,2);
void log_printf( const char *fmt, ... ) JNLIB_GCC_A_PRINTF(1,2);
void log_bug( const char *fmt, ... ) GPGRT_GCC_A_NR_PRINTF(1,2);
void log_fatal( const char *fmt, ... ) GPGRT_GCC_A_NR_PRINTF(1,2);
void log_error( const char *fmt, ... ) GPGRT_GCC_A_PRINTF(1,2);
void log_info( const char *fmt, ... ) GPGRT_GCC_A_PRINTF(1,2);
void log_debug( const char *fmt, ... ) GPGRT_GCC_A_PRINTF(1,2);
void log_printf( const char *fmt, ... ) GPGRT_GCC_A_PRINTF(1,2);
void log_flush (void);
/* Print a hexdump of BUFFER. With TEXT passes as NULL print just the

View File

@ -55,7 +55,7 @@ void clear_membuf (membuf_t *mb, size_t amount);
void put_membuf (membuf_t *mb, const void *buf, size_t len);
void put_membuf_str (membuf_t *mb, const char *string);
void put_membuf_printf (membuf_t *mb, const char *format,
...) JNLIB_GCC_A_PRINTF(2,3);
...) GPGRT_GCC_A_PRINTF(2,3);
void *get_membuf (membuf_t *mb, size_t *len);
void *get_membuf_shrink (membuf_t *mb, size_t *len);
const void *peek_membuf (membuf_t *mb, size_t *len);

View File

@ -44,14 +44,14 @@ my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
/* Map the log levels. */
switch (level)
{
case GCRY_LOG_CONT: level = JNLIB_LOG_CONT; break;
case GCRY_LOG_INFO: level = JNLIB_LOG_INFO; break;
case GCRY_LOG_WARN: level = JNLIB_LOG_WARN; break;
case GCRY_LOG_ERROR:level = JNLIB_LOG_ERROR; break;
case GCRY_LOG_FATAL:level = JNLIB_LOG_FATAL; break;
case GCRY_LOG_BUG: level = JNLIB_LOG_BUG; break;
case GCRY_LOG_DEBUG:level = JNLIB_LOG_DEBUG; break;
default: level = JNLIB_LOG_ERROR; break;
case GCRY_LOG_CONT: level = GPGRT_LOG_CONT; break;
case GCRY_LOG_INFO: level = GPGRT_LOG_INFO; break;
case GCRY_LOG_WARN: level = GPGRT_LOG_WARN; break;
case GCRY_LOG_ERROR:level = GPGRT_LOG_ERROR; break;
case GCRY_LOG_FATAL:level = GPGRT_LOG_FATAL; break;
case GCRY_LOG_BUG: level = GPGRT_LOG_BUG; break;
case GCRY_LOG_DEBUG:level = GPGRT_LOG_DEBUG; break;
default: level = GPGRT_LOG_ERROR; break;
}
log_logv (level, fmt, arg_ptr);
}

View File

@ -48,25 +48,25 @@ time_t timegm (struct tm *tm);
#define DIMof(type,member) DIM(((type *)0)->member)
#undef JNLIB_GCC_HAVE_PUSH_PRAGMA
#undef GPGRT_GCC_HAVE_PUSH_PRAGMA
#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 5 )
# define JNLIB_GCC_M_FUNCTION 1
# define JNLIB_GCC_A_NR __attribute__ ((noreturn))
# define GPGRT_GCC_M_FUNCTION 1 /* __FUNCTION__ macro is available. */
# define GPGRT_GCC_A_NR __attribute__ ((noreturn))
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4 )
# define JNLIB_GCC_HAVE_PUSH_PRAGMA 1
# define JNLIB_GCC_A_PRINTF( f, a ) \
# define GPGRT_GCC_HAVE_PUSH_PRAGMA 1
# define GPGRT_GCC_A_PRINTF( f, a ) \
__attribute__ ((format (__gnu_printf__,f,a)))
# define JNLIB_GCC_A_NR_PRINTF( f, a ) \
# define GPGRT_GCC_A_NR_PRINTF( f, a ) \
__attribute__ ((noreturn, format (__gnu_printf__,f,a)))
# else
# define JNLIB_GCC_A_PRINTF( f, a ) __attribute__ ((format (printf,f,a)))
# define JNLIB_GCC_A_NR_PRINTF( f, a ) \
# define GPGRT_GCC_A_PRINTF( f, a ) __attribute__ ((format (printf,f,a)))
# define GPGRT_GCC_A_NR_PRINTF( f, a ) \
__attribute__ ((noreturn, format (printf,f,a)))
# endif
#else
# define JNLIB_GCC_A_NR
# define JNLIB_GCC_A_PRINTF( f, a )
# define JNLIB_GCC_A_NR_PRINTF( f, a )
# define GPGRT_GCC_A_NR
# define GPGRT_GCC_A_PRINTF( f, a )
# define GPGRT_GCC_A_NR_PRINTF( f, a )
#endif

View File

@ -363,9 +363,9 @@ const char *gnupg_messages_locale_name (void);
void setup_libgcrypt_logging (void);
/* Same as estream_asprintf but die on memory failure. */
char *xasprintf (const char *fmt, ...) JNLIB_GCC_A_PRINTF(1,2);
char *xasprintf (const char *fmt, ...) GPGRT_GCC_A_PRINTF(1,2);
/* This is now an alias to estream_asprintf. */
char *xtryasprintf (const char *fmt, ...) JNLIB_GCC_A_PRINTF(1,2);
char *xtryasprintf (const char *fmt, ...) GPGRT_GCC_A_PRINTF(1,2);
/* Replacement for gcry_cipher_algo_name. */
const char *gnupg_cipher_algo_name (int algo);

View File

@ -183,7 +183,7 @@ main (int argc, char **argv )
early_system_init ();
set_strusage (my_strusage);
log_set_prefix ("dirmngr-client",
JNLIB_LOG_WITH_PREFIX);
GPGRT_LOG_WITH_PREFIX);
/* For W32 we need to initialize the socket subsystem. Becuase we
don't use Pth we need to do this explicit. */

View File

@ -1040,9 +1040,9 @@ main (int argc, char **argv)
if (logfile)
{
log_set_file (logfile);
log_set_prefix (NULL, (JNLIB_LOG_WITH_PREFIX
|JNLIB_LOG_WITH_TIME
|JNLIB_LOG_WITH_PID));
log_set_prefix (NULL, (GPGRT_LOG_WITH_PREFIX
|GPGRT_LOG_WITH_TIME
|GPGRT_LOG_WITH_PID));
current_logfile = xstrdup (logfile);
}
@ -1211,7 +1211,7 @@ main (int argc, char **argv)
}
log_get_prefix (&oldflags);
log_set_prefix (NULL, oldflags | JNLIB_LOG_RUN_DETACHED);
log_set_prefix (NULL, oldflags | GPGRT_LOG_RUN_DETACHED);
opt.running_detached = 1;
if (chdir("/"))
@ -1825,7 +1825,7 @@ housekeeping_thread (void *arg)
}
#if JNLIB_GCC_HAVE_PUSH_PRAGMA
#if GPGRT_GCC_HAVE_PUSH_PRAGMA
# pragma GCC push_options
# pragma GCC optimize ("no-strict-overflow")
#endif
@ -1845,7 +1845,7 @@ time_for_housekeeping_p (time_t curtime)
}
return 0;
}
#if JNLIB_GCC_HAVE_PUSH_PRAGMA
#if GPGRT_GCC_HAVE_PUSH_PRAGMA
# pragma GCC pop_options
#endif

View File

@ -245,7 +245,7 @@ ldap_wrapper_main (char **argv, estream_t outstream)
#ifdef USE_LDAPWRAPPER
set_strusage (my_strusage);
log_set_prefix ("dirmngr_ldap", JNLIB_LOG_WITH_PREFIX);
log_set_prefix ("dirmngr_ldap", GPGRT_LOG_WITH_PREFIX);
/* Setup I18N and common subsystems. */
i18n_init();
@ -297,7 +297,7 @@ ldap_wrapper_main (char **argv, estream_t outstream)
{
unsigned int oldflags;
log_get_prefix (&oldflags);
log_set_prefix (NULL, oldflags | JNLIB_LOG_WITH_PID);
log_set_prefix (NULL, oldflags | GPGRT_LOG_WITH_PID);
}
break;

View File

@ -26,7 +26,7 @@
/*-- ks-action.c --*/
gpg_error_t ks_print_help (ctrl_t ctrl, const char *text);
gpg_error_t ks_printf_help (ctrl_t ctrl, const char *format,
...) JNLIB_GCC_A_PRINTF(2,3);
...) GPGRT_GCC_A_PRINTF(2,3);
/*-- ks-engine-hkp.c --*/
gpg_error_t ks_hkp_resolve (ctrl_t ctrl, parsed_uri_t uri);

View File

@ -1155,7 +1155,7 @@ change_passphrase (ctrl_t ctrl, kbnode_t keyblock)
if (err)
log_log ((gpg_err_code (err) == GPG_ERR_CANCELED
|| gpg_err_code (err) == GPG_ERR_FULLY_CANCELED)
? JNLIB_LOG_INFO : JNLIB_LOG_ERROR,
? GPGRT_LOG_INFO : GPGRT_LOG_ERROR,
_("key %s: error changing passphrase: %s\n"),
keystr_with_sub (keyid, subid),
gpg_strerror (err));

View File

@ -137,14 +137,14 @@ my_gcry_logger (void *dummy, int level, const char *fmt, va_list arg_ptr)
/* Map the log levels. */
switch (level)
{
case GCRY_LOG_CONT: level = JNLIB_LOG_CONT; break;
case GCRY_LOG_INFO: level = JNLIB_LOG_INFO; break;
case GCRY_LOG_WARN: level = JNLIB_LOG_WARN; break;
case GCRY_LOG_ERROR:level = JNLIB_LOG_ERROR; break;
case GCRY_LOG_FATAL:level = JNLIB_LOG_FATAL; break;
case GCRY_LOG_BUG: level = JNLIB_LOG_BUG; break;
case GCRY_LOG_DEBUG:level = JNLIB_LOG_DEBUG; break;
default: level = JNLIB_LOG_ERROR; break;
case GCRY_LOG_CONT: level = GPGRT_LOG_CONT; break;
case GCRY_LOG_INFO: level = GPGRT_LOG_INFO; break;
case GCRY_LOG_WARN: level = GPGRT_LOG_WARN; break;
case GCRY_LOG_ERROR:level = GPGRT_LOG_ERROR; break;
case GCRY_LOG_FATAL:level = GPGRT_LOG_FATAL; break;
case GCRY_LOG_BUG: level = GPGRT_LOG_BUG; break;
case GCRY_LOG_DEBUG:level = GPGRT_LOG_DEBUG; break;
default: level = GPGRT_LOG_ERROR; break;
}
log_logv (level, fmt, arg_ptr);
}

View File

@ -119,7 +119,7 @@ do_list (int is_error, int listmode, estream_t fp, const char *format, ...)
}
else
{
log_logv (is_error? JNLIB_LOG_ERROR: JNLIB_LOG_INFO, format, arg_ptr);
log_logv (is_error? GPGRT_LOG_ERROR: GPGRT_LOG_INFO, format, arg_ptr);
log_printf ("\n");
}
va_end (arg_ptr);

View File

@ -86,7 +86,7 @@ gc_error (int status, int errnum, const char *fmt, ...)
va_list arg_ptr;
va_start (arg_ptr, fmt);
log_logv (JNLIB_LOG_ERROR, fmt, arg_ptr);
log_logv (GPGRT_LOG_ERROR, fmt, arg_ptr);
va_end (arg_ptr);
if (errnum)

View File

@ -114,7 +114,7 @@ main (int argc, char **argv)
setmode( fileno(stdin), O_BINARY );
setmode( fileno(stdout), O_BINARY );
#endif
log_set_prefix ("gpgsplit", JNLIB_LOG_WITH_PREFIX);
log_set_prefix ("gpgsplit", GPGRT_LOG_WITH_PREFIX);
set_strusage (my_strusage);
pargs.argc = &argc;