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

Merged jnlib into common.

This commit is contained in:
Werner Koch 2010-03-10 12:24:58 +00:00
parent ffe6dc9957
commit d8b1099d01
79 changed files with 260 additions and 136 deletions

View File

@ -1,3 +1,12 @@
2010-03-10 Werner Koch <wk@g10code.com>
* jnlib/: Move all code to common/.
* Makefile.am (SUBDIRS): Remove jnlib.
* configure.ac (AC_CONFIG_FILES): Remove jnlib/Makefile.
* configure.ac (AM_PATH_LIBASSUAN): Remove double test.
* acinclude.m4 (GNUPG_CHECK_ENDIAN): Remove bogus warning.
2010-03-09 Werner Koch <wk@g10code.com>
* configure.ac: Add option --disable-ccid-driver.

View File

@ -76,7 +76,7 @@ else
tests = tests
endif
SUBDIRS = m4 gl include jnlib common ${kbx} \
SUBDIRS = m4 gl include common ${kbx} \
${gpg} ${keyserver} ${sm} ${agent} ${scd} ${g13} ${tools} po ${doc} ${tests}
dist_doc_DATA = README

View File

@ -103,6 +103,7 @@ dnl
AC_DEFUN([GNUPG_CHECK_ENDIAN],
[
tmp_assumed_endian=big
tmp_assume_warn=""
if test "$cross_compiling" = yes; then
case "$host_cpu" in
i@<:@345678@:>@* )
@ -111,7 +112,6 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
*)
;;
esac
AC_MSG_WARN(cross compiling; assuming $tmp_assumed_endian endianess)
fi
AC_MSG_CHECKING(endianess)
AC_CACHE_VAL(gnupg_cv_c_endian,
@ -141,10 +141,11 @@ AC_DEFUN([GNUPG_CHECK_ENDIAN],
gnupg_cv_c_endian=little,
gnupg_cv_c_endian=big,
gnupg_cv_c_endian=$tmp_assumed_endian
tmp_assumed_warn=" (assumed)"
)
fi
])
AC_MSG_RESULT([$gnupg_cv_c_endian])
AC_MSG_RESULT([${gnupg_cv_c_endian}${tmp_assumed_warn}])
if test "$gnupg_cv_c_endian" = little; then
AC_DEFINE(LITTLE_ENDIAN_HOST,1,
[Defined if the host has little endian byte ordering])

View File

@ -1,3 +1,9 @@
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (common_libs): Remove libjnlib.a.
* trustlist.c, protect-tool.c, command-ssh.c: Remove estream.h.
2010-02-17 Werner Koch <wk@g10code.com>
* call-pinentry.c (start_pinentry): Always free OPTSTR. Send

View File

@ -45,8 +45,8 @@ gpg_agent_SOURCES = \
call-scd.c \
learncard.c
common_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a
commonpth_libs = $(libcommonpth) ../jnlib/libjnlib.a ../gl/libgnu.a
common_libs = $(libcommon) ../gl/libgnu.a
commonpth_libs = $(libcommonpth) ../gl/libgnu.a
pwquery_libs = ../common/libsimple-pwquery.a
#if HAVE_W32_SYSTEM

View File

@ -32,7 +32,6 @@
#include "agent.h"
#include "estream.h"
#include "i18n.h"

View File

@ -32,8 +32,8 @@
#include <unistd.h>
#endif
#include "../jnlib/logging.h"
#include "../jnlib/utf8conv.h"
#include "../common/logging.h"
#include "../common/utf8conv.h"
#include "minip12.h"
#ifndef DIM
@ -2354,7 +2354,7 @@ main (int argc, char **argv)
/*
Local Variables:
compile-command: "gcc -Wall -O0 -g -DTEST=1 -o minip12 minip12.c ../jnlib/libjnlib.a -L /usr/local/lib -lgcrypt -lgpg-error"
compile-command: "gcc -Wall -O0 -g -DTEST=1 -o minip12 minip12.c ../common/libcommon.a -L /usr/local/lib -lgcrypt -lgpg-error"
End:
*/
#endif /* TEST */

View File

@ -44,7 +44,6 @@
#include "i18n.h"
#include "get-passphrase.h"
#include "sysutils.h"
#include "estream.h"
enum cmd_and_opt_values

View File

@ -31,7 +31,6 @@
#include "agent.h"
#include <assuan.h> /* fixme: need a way to avoid assuan calls here */
#include "i18n.h"
#include "estream.h"
/* A structure to store the information from the trust file. */

View File

@ -1,5 +1,32 @@
2010-03-10 Werner Koch <wk@g10code.com>
* util.h: Replace jnlib path part by common.
(snprintf): Use the replacement macro on all platforms.
* Makefile.am (jnlib_sources): New.
(libcommon_a_SOURCES, libcommonpth_a_SOURCES): Add jnlib_sources.
(jnlib_tests): New.
(noinst_PROGRAMS, TESTS): Add jnlib_tests.
(t_common_ldadd): Remove libjnlib.a.
* README.jnlib, ChangeLog.jnlib, libjnlib-config.h, argparse.c
* argparse.h, dotlock.c, dotlock.h, dynload.h, logging.c
* logging.h, mischelp.c, mischelp.h, stringhelp.c, stringhelp.h
* strlist.c, strlist.h, types.h, utf8conv.c, utf8conv.h
* w32-afunix.c, w32-afunix.h, w32-reg.c, w32help.h, xmalloc.c
* xmalloc.h, t-stringhelp.c, t-support.c, t-support.h
* t-timestuff.c, t-w32-reg.c: Move from jnlib to here.
* init.c: Remove "estream.h".
* util.h: Include "estream.h".
* xasprintf.c, ttyio.c: Remove "estream-printf.h".
2010-03-08 Werner Koch <wk@g10code.com>
* exechelp.c [!HAVE_SIGNAL_H]: Do not include signal.h.
(DETACHED_PROCESS, CREATE_NEW_PROCESS_GROUP) [W32CE]: Provide stubs.
* iobuf.h (iobuf_ioctl_t): New. Use the new macros instead of the
hard wired values.
* iobuf.c (iobuf_append): Remove.

View File

@ -1,3 +1,14 @@
2010-03-10 Werner Koch <wk@g10code.com>
See gnupg/common/ChangeLog for newer changes.
JNLIB has been merged into GnuPG's common directory. README.jnlib
list the files making up JNLIB.
* README: Rename to README.jnlib
* ChangeLog: Rename to ChangeLog.jnlib.
* Makefile.am: Remove.
2010-03-01 Werner Koch <wk@g10code.com>
* t-w32-reg.c: New.

View File

@ -1,5 +1,5 @@
# Makefile for common gnupg modules
# Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
# Copyright (C) 2001, 2003, 2007, 2010 Free Software Foundation, Inc.
#
# This file is part of GnuPG.
#
@ -19,11 +19,11 @@
## Process this file with automake to produce Makefile.in
EXTRA_DIST = mkstrtable.awk exaudit.awk exstatus.awk \
audit-events.h status-codes.h
audit-events.h status-codes.h README.jnlib ChangeLog.jnlib
noinst_LIBRARIES = libcommon.a libcommonpth.a libsimple-pwquery.a libgpgrl.a
noinst_PROGRAMS = $(module_tests) $(module_maint_tests)
TESTS = $(module_tests)
noinst_PROGRAMS = $(jnlib_tests) $(module_tests) $(module_maint_tests)
TESTS = $(jnlib_tests) $(module_tests)
BUILT_SOURCES = audit-events.h status-codes.h
@ -35,9 +35,26 @@ AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(KSBA_CFLAGS)
include $(top_srcdir)/am/cmacros.am
jnlib_sources = \
libjnlib-config.h \
types.h dynload.h w32help.h \
stringhelp.c stringhelp.h \
strlist.c strlist.h \
utf8conv.c utf8conv.h \
argparse.c argparse.h \
logging.c logging.h \
dotlock.c dotlock.h \
mischelp.c mischelp.h
if HAVE_W32_SYSTEM
jnlib_sources += w32-reg.c w32-afunix.c w32-afunix.h
endif
common_sources = \
common-defs.h \
util.h i18n.c i18n.h \
estream.c estream.h estream-printf.c estream-printf.h \
status.c status.h\
openpgpdefs.h \
gc-opt-flags.h \
@ -62,7 +79,6 @@ common_sources = \
asshelp.c asshelp.h \
exechelp.c exechelp.h \
signal.c \
estream.c estream.h estream-printf.c estream-printf.h \
audit.c audit.h \
srv.h \
dns-cert.c dns-cert.h \
@ -78,13 +94,13 @@ without_pth_sources = \
get-passphrase.c get-passphrase.h
libcommon_a_SOURCES = $(common_sources) $(without_pth_sources)
libcommon_a_SOURCES = $(jnlib_sources) $(common_sources) $(without_pth_sources)
if USE_DNS_SRV
libcommon_a_SOURCES += srv.c
endif
libcommon_a_CFLAGS = $(AM_CFLAGS) $(LIBASSUAN_CFLAGS) -DWITHOUT_GNU_PTH=1
libcommonpth_a_SOURCES = $(common_sources)
libcommonpth_a_SOURCES = $(jnlib_sources) $(common_sources)
if USE_DNS_SRV
libcommonpth_a_SOURCES += srv.c
endif
@ -121,13 +137,32 @@ endif
#
# Module tests
#
t_jnlib_src = t-support.c t-support.h
jnlib_tests = t-stringhelp t-timestuff
if HAVE_W32_SYSTEM
jnlib_tests += t-w32-reg
endif
module_tests = t-convert t-percent t-gettime t-sysutils t-sexputil t-exechelp \
t-session-env
module_maint_tests = t-helpfile t-b64
t_common_ldadd = libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a \
t_common_ldadd = libcommon.a ../gl/libgnu.a \
$(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)
# jnlib tests
t_stringhelp_SOURCES = t-stringhelp.c $(t_jnlib_src)
t_stringhelp_LDADD = $(t_common_ldadd)
t_timestuff_SOURCES = t-timestuff.c $(t_jnlib_src)
t_timestuff_LDADD = $(t_common_ldadd)
if HAVE_W32_SYSTEM
t_w32_reg_SOURCES = t-w32-reg.c $(t_jnlib_src)
t_w32_reg_LDADD = $(t_common_ldadd)
endif
# common tests
t_convert_LDADD = $(t_common_ldadd)
t_percent_LDADD = $(t_common_ldadd)
t_gettime_LDADD = $(t_common_ldadd)
@ -138,3 +173,6 @@ t_b64_LDADD = $(t_common_ldadd)
t_exechelp_LDADD = $(t_common_ldadd)
t_session_env_LDADD = $(t_common_ldadd)

View File

@ -1,25 +1,45 @@
# Makefile for the JNLIB part of GnuPG
# Copyright (C) 1999, 2000, 2001, 2004, 2006,
# 2010 Feee Software Soundation, Inc.
#
# This file is part of JNLIB.
#
# JNLIB is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of
# the License, or (at your option) any later version.
#
# JNLIB is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
JNLIB - This is a collection of utility function which are too small
to put into a library. The code here is licensed under the LGPL.
libjnlib-config.h should be be modified for each project to make these
functions fit into the software. Mainly these are memory functions in
case you need another allocator.
Files which make up jnlib:
README.jnlib
ChangeLog.jnlib
libjnlib-config.h
argparse.c
argparse.h
dotlock.c
dotlock.h
dynload.h
logging.c
logging.h
mischelp.c
mischelp.h
stringhelp.c
stringhelp.h
strlist.c
strlist.h
types.h
utf8conv.c
utf8conv.h
w32-afunix.c
w32-afunix.h
w32-reg.c
w32help.h
xmalloc.c
xmalloc.h
t-stringhelp.c
t-support.c
t-support.h
t-timestuff.c
t-w32-reg.c
## Process this file with automake to produce Makefile.in
Here is a template Makefile.am for these jnlib modules:
===8<==================================================
EXTRA_DIST = README
noinst_PROGRAMS = $(module_tests)
TESTS = $(module_tests)
@ -27,12 +47,10 @@ TESTS = $(module_tests)
AM_CPPFLAGS = -I$(top_srcdir)/intl
# We need libgcrypt because libjnlib-config includes gcrypt.h
AM_CFLAGS = -DJNLIB_IN_JNLIB $(LIBGCRYPT_CFLAGS)
AM_CFLAGS = $(LIBGCRYPT_CFLAGS)
noinst_LIBRARIES = libjnlib.a
#libjnlib_a_LDFLAGS =
libjnlib_a_SOURCES = \
libjnlib-config.h \
stringhelp.c stringhelp.h \
@ -41,17 +59,13 @@ libjnlib_a_SOURCES = \
argparse.c argparse.h \
logging.c logging.h \
dotlock.c dotlock.h \
types.h mischelp.c mischelp.h dynload.h w32help.h
types.h mischelp.c mischelp.h dynload.h w32help.h \
xmalloc.c xmalloc.h
if HAVE_W32_SYSTEM
libjnlib_a_SOURCES += w32-reg.c w32-afunix.c w32-afunix.h
endif
# For GnuPG we don't need the xmalloc stuff.
# xmalloc.c xmalloc.h
#
# Module tests.
#
@ -82,4 +96,6 @@ if HAVE_W32_SYSTEM
t_w32_reg_SOURCES = t-w32-reg.c $(t_jnlib_src)
t_w32_reg_LDADD = $(t_jnlib_ldadd)
endif
==>8===================================================

View File

@ -22,7 +22,7 @@
#include <ksba.h>
#include "estream.h"
#include "../common/estream.h"
struct audit_ctx_s;
typedef struct audit_ctx_s *audit_ctx_t;

View File

@ -25,7 +25,9 @@
#include <string.h>
#include <errno.h>
#include <assert.h>
#include <signal.h>
#ifdef HAVE_SIGNAL_H
# include <signal.h>
#endif
#include <unistd.h>
#include <fcntl.h>
@ -78,6 +80,12 @@
#define X_OK F_OK
#endif /* HAVE_W32_SYSTEM */
/* Constants not supported by WindowsCE. */
#ifdef HAVE_W32CE_SYSTEM
# define DETACHED_PROCESS (0)
# define CREATE_NEW_PROCESS_GROUP (0)
#endif
#ifdef HAVE_W32_SYSTEM
/* We assume that a HANDLE can be represented by an int which should

View File

@ -20,7 +20,7 @@
#ifndef GNUPG_COMMON_EXECHELP_H
#define GNUPG_COMMON_EXECHELP_H
#include "estream.h"
#include "../common/estream.h"
/* Return the maximum number of currently allowed file descriptors.

View File

@ -22,7 +22,7 @@
#include <gpg-error.h>
#ifdef HTTP_USE_ESTREAM
#include "estream.h"
#include "../common/estream.h"
#endif
struct uri_tuple_s {

View File

@ -16,7 +16,7 @@
#ifdef USE_SIMPLE_GETTEXT
# include "../jnlib/w32help.h"
# include "../common/w32help.h"
# define _(a) gettext (a)
# define N_(a) (a)
#else

View File

@ -31,7 +31,6 @@
#include <pth.h>
#endif
#include "estream.h"
#include "util.h"

View File

@ -1156,10 +1156,10 @@ iobuf_open_fd_or_name (gnupg_fd_t fd, const char *fname, const char *mode)
{
iobuf_t a;
if (fd == -1)
if (fd == GNUPG_INVALID_FD)
a = iobuf_open (fname);
else
a = iobuf_fdopen_nc (fd, mode);
a = iobuf_fdopen_nc (FD2INT(fd), mode);
return a;
}

View File

@ -30,7 +30,7 @@
#include <locale.h>
#endif
#include "../jnlib/w32help.h"
#include "../common/w32help.h"
/* XPG3 defines the result of 'setlocale (category, NULL)' as:
"Directs 'setlocale()' to query 'category' and return the current
@ -101,7 +101,7 @@ gnupg_messages_locale_name (void)
const char *s;
#ifdef HAVE_W32_SYSTEM
/* We use the localname function from ../jnlib/w32-gettext.c. */
/* We use the localname function from ../common/w32-gettext.c. */
s = gettext_localename ();
#else
s = do_nl_locale_name (LC_MESSAGES, "LC_MESSAGES");

View File

@ -23,7 +23,7 @@
/* Because we can't use the internal jnlib_free macro in inline
functions we provide a wrapper fucntion as well. */
functions we provide a wrapper function as well. */
void _jnlib_free (void *p);
/* Check whether the files NAME1 and NAME2 are identical. This is for

View File

@ -41,9 +41,9 @@
#endif
#define JNLIB_NEED_AFLOCAL
#include "../jnlib/mischelp.h"
#include "../common/mischelp.h"
#ifdef HAVE_W32_SYSTEM
#include "../jnlib/w32-afunix.h"
#include "../common/w32-afunix.h"
#endif

View File

@ -24,7 +24,7 @@
/* Include whatever files you need. */
#include <gcrypt.h>
#include "../jnlib/logging.h"
#include "../common/logging.h"
/* Try to write error message using the standard log mechanism. The
current implementation requires that the HAVE_JNLIB_LOGGING is also

View File

@ -52,7 +52,7 @@ void gnupg_allow_set_foregound_window (pid_t pid);
#ifdef HAVE_W32_SYSTEM
#include "../jnlib/w32help.h"
#include "../common/w32help.h"
#endif /*HAVE_W32_SYSTEM*/

View File

@ -48,7 +48,6 @@
#include "util.h"
#include "ttyio.h"
#include "estream-printf.h"
#include "common-defs.h"
#define CONTROL_D ('D' - 'A' + 1)

View File

@ -33,29 +33,30 @@
/* Hash function used with libksba. */
#define HASH_FNC ((void (*)(void *, const void*,size_t))gcry_md_write)
/* Estream replaces most uses of stdio. */
#include "../common/estream.h"
#include "../common/estream-printf.h"
/* Get all the stuff from jnlib. */
#include "../jnlib/logging.h"
#include "../jnlib/argparse.h"
#include "../jnlib/stringhelp.h"
#include "../jnlib/mischelp.h"
#include "../jnlib/strlist.h"
#include "../jnlib/dotlock.h"
#include "../jnlib/utf8conv.h"
#include "../jnlib/dynload.h"
#include "../common/logging.h"
#include "../common/argparse.h"
#include "../common/stringhelp.h"
#include "../common/mischelp.h"
#include "../common/strlist.h"
#include "../common/dotlock.h"
#include "../common/utf8conv.h"
#include "../common/dynload.h"
#include "init.h"
/* Redefine asprintf by our estream version which uses our own memory
allocator.. */
#include "estream-printf.h"
#define asprintf estream_asprintf
#define vasprintf estream_vasprintf
/* Due to a bug in mingw32's snprintf related to the 'l' modifier we
better use our snprintf. */
#ifdef HAVE_W32_SYSTEM
/* Due to a bug in mingw32's snprintf related to the 'l' modifier and
for increased portability we use our snprintf on all systems. */
#define snprintf estream_snprintf
#endif
/* GCC attributes. */

View File

@ -23,7 +23,6 @@
#include "util.h"
#include "iobuf.h"
#include "estream-printf.h"
#if !defined(_ESTREAM_PRINTF_MALLOC) || !defined(_ESTREAM_PRINTF_FREE)
#error Need to define ESTREAM_PRINTF_MALLOC and _FREE

View File

@ -43,7 +43,7 @@ NEED_LIBGCRYPT_API=1
NEED_LIBGCRYPT_VERSION=1.4.0
NEED_LIBASSUAN_API=2
NEED_LIBASSUAN_VERSION=1.1.0
NEED_LIBASSUAN_VERSION=2.0.0
NEED_KSBA_API=1
NEED_KSBA_VERSION=1.0.2
@ -439,7 +439,7 @@ AH_BOTTOM([
asprintf. */
#define _ESTREAM_PRINTF_MALLOC gcry_malloc
#define _ESTREAM_PRINTF_FREE gcry_free
#define _ESTREAM_PRINTF_EXTRA_INCLUDE "util.h"
#define _ESTREAM_PRINTF_EXTRA_INCLUDE "../common/util.h"
/* Under Windows we use the gettext code from libgpg-error. */
#define GPG_ERR_ENABLE_GETTEXT_MACROS
@ -633,9 +633,6 @@ AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
have_libassuan=yes,have_libassuan=no)
if test "$have_libassuan" = "yes"; then
have_libassuan=no
AM_PATH_LIBASSUAN("$NEED_LIBASSUAN_API:$NEED_LIBASSUAN_VERSION",
have_libassuan=yes,have_libassuan=no)
AC_DEFINE_UNQUOTED(GNUPG_LIBASSUAN_VERSION, "$libassuan_version",
[version of the libassuan library])
fi
@ -1108,7 +1105,7 @@ AC_CHECK_FUNCS([ttyname rand ftello fsync])
AC_CHECK_TYPES([struct sigaction, sigset_t],,,[#include <signal.h>])
#
# These are needed by libjnlib - fixme: we should use a jnlib.m4
# These are needed by the jnlib parts in common.
# Note: We already checked pwd.h.
AC_CHECK_HEADERS([signal.h])
AC_CHECK_FUNCS([memicmp stpcpy strsep strlwr strtoul memmove stricmp strtol \
@ -1490,7 +1487,6 @@ Makefile
po/Makefile.in
gl/Makefile
include/Makefile
jnlib/Makefile
common/Makefile
kbx/Makefile
g10/Makefile

View File

@ -1,3 +1,9 @@
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (needed_libs): Remove libjnlib.a.
* main.h: Remove "estream.h".
2010-03-08 Werner Koch <wk@g10code.com>
* main.h: Include "estream.h"

View File

@ -27,7 +27,7 @@ include $(top_srcdir)/am/cmacros.am
AM_CFLAGS = $(LIBGCRYPT_CFLAGS) $(LIBASSUAN_CFLAGS) $(GPG_ERROR_CFLAGS)
needed_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a
needed_libs = $(libcommon) ../gl/libgnu.a
bin_PROGRAMS = gpg2 gpgv2
noinst_PROGRAMS = $(module_tests)

View File

@ -25,7 +25,6 @@
#include "cipher.h"
#include "keydb.h"
#include "util.h"
#include "../common/estream.h"
/* It could be argued that the default cipher should be 3DES rather
than CAST5, and the default compression should be 0

View File

@ -23,7 +23,7 @@
#include "types.h"
#include "../common/iobuf.h"
#include "../jnlib/strlist.h"
#include "../common/strlist.h"
#include "cipher.h"
#include "filter.h"
#include "../common/openpgpdefs.h"

View File

@ -35,7 +35,7 @@
#include <stdlib.h>
#include <string.h>
#include "../jnlib/types.h"
#include "../common/types.h"
#include "rmd160.h"
/*

View File

@ -40,7 +40,7 @@ g13_SOURCES = \
be-encfs.c be-encfs.h \
be-truecrypt.c be-truecrypt.h
g13_LDADD = $(libcommonpth) ../jnlib/libjnlib.a ../gl/libgnu.a \
g13_LDADD = $(libcommonpth) ../gl/libgnu.a \
$(LIBGCRYPT_LIBS) $(LIBASSUAN_LIBS) $(PTH_LIBS) \
$(GPG_ERROR_LIBS) $(LIBINTL)

View File

@ -1,8 +0,0 @@
JNLIB - This is a collection of utility function which are too small
to put into a library. The code here is licensed under the LGPL.
libjnlib-config.h should be be modified for each project to make these
functions fit into the software. Mainly these are memory functions in
case you need another allocator.

View File

@ -1,3 +1,10 @@
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (kbxutil_LDADD, $(PROGRAMS)): Remove libjnlib.a.
* keybox-search.c, keybox-init.c, keybox-defs.h, kbxutil.c:
Replace "jnlib" include file part by "common".
2010-03-08 Werner Koch <wk@g10code.com>
Use macros for iobuf_ioctl commands.

View File

@ -46,8 +46,8 @@ libkeybox_a_SOURCES = $(common_sources)
# requires it - although we don't actually need it. It is easier
# to do it this way.
kbxutil_SOURCES = kbxutil.c $(common_sources)
kbxutil_LDADD = ../common/libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a \
kbxutil_LDADD = ../common/libcommon.a ../gl/libgnu.a \
$(KSBA_LIBS) $(LIBGCRYPT_LIBS) \
$(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV) $(W32SOCKLIBS)
$(PROGRAMS) : ../common/libcommon.a ../jnlib/libjnlib.a ../gl/libgnu.a
$(PROGRAMS) : ../common/libcommon.a ../gl/libgnu.a

View File

@ -29,10 +29,10 @@
#include <assert.h>
#define JNLIB_NEED_LOG_LOGV
#include "../jnlib/logging.h"
#include "../jnlib/argparse.h"
#include "../jnlib/stringhelp.h"
#include "../jnlib/utf8conv.h"
#include "../common/logging.h"
#include "../common/argparse.h"
#include "../common/stringhelp.h"
#include "../common/utf8conv.h"
#include "i18n.h"
#include "init.h"
#include "keybox-defs.h"
@ -433,7 +433,7 @@ main( int argc, char **argv )
/*create_dotlock(NULL); register locking cleanup */
/* We need to use the gcry malloc function because jnlib does use them */
/* We need to use the gcry malloc function because jnlib uses them. */
keybox_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free);
ksba_set_malloc_hooks (gcry_malloc, gcry_realloc, gcry_free );

View File

@ -34,9 +34,9 @@
owns here. This will not allow us build KBX in a standalone way
but there is currently no need for it anyway. Same goes for
stringhelp.h which for example provides a replacement for stpcpy -
fixme: Better the LIBOBJ mechnism. */
#include "../jnlib/types.h"
#include "../jnlib/stringhelp.h"
fixme: Better use the LIBOBJ mechnism. */
#include "../common/types.h"
#include "../common/stringhelp.h"
#include "keybox.h"

View File

@ -472,7 +472,7 @@ open_file (const char **filename, FILE *outfp)
{
int save_errno = errno;
fprintf (outfp, "can't open `%s': %s\n", *filename, strerror(errno));
errno = save_errno;
gpg_err_set_errno (save_errno);
}
return fp;
}

View File

@ -24,7 +24,7 @@
#include <unistd.h>
#include <assert.h>
#include "../jnlib/mischelp.h"
#include "../common/mischelp.h"
#include "keybox-defs.h"
static KB_NAME kb_names;

View File

@ -24,7 +24,7 @@
#include <assert.h>
#include <errno.h>
#include "../jnlib/stringhelp.h" /* ascii_xxxx() */
#include "../common/stringhelp.h" /* ascii_xxxx() */
#include "keybox-defs.h"
#include <gcrypt.h>

View File

@ -37,12 +37,12 @@ libexec_PROGRAMS = $(GPGKEYS_LDAP) $(GPGKEYS_HKP) $(GPGKEYS_FINGER) \
libexec_SCRIPTS = $(GPGKEYS_MAILTO)
noinst_SCRIPTS = gpg2keys_test
common_libs = ../gl/libgnu.a ../common/libcommon.a ../jnlib/libjnlib.a
common_libs = ../gl/libgnu.a ../common/libcommon.a
other_libs = $(LIBICONV) $(LIBINTL) $(CAPLIBS)
gpg2keys_ldap_SOURCES = gpgkeys_ldap.c ksutil.c ksutil.h no-libgcrypt.c
gpg2keys_ldap_CPPFLAGS = $(LDAP_CPPFLAGS) $(AM_CPPFLAGS)
gpg2keys_ldap_LDADD = ../jnlib/libjnlib.a $(LDAPLIBS) $(GPG_ERROR_LIBS) \
gpg2keys_ldap_LDADD = $(common_libs) $(LDAPLIBS) $(GPG_ERROR_LIBS) \
$(NETLIBS) $(other_libs)
gpg2keys_finger_SOURCES = gpgkeys_finger.c ksutil.c ksutil.h no-libgcrypt.c

View File

@ -21,6 +21,12 @@ common/audit.c
common/helpfile.c
common/gettime.c
common/argparse.c
common/logging.c
common/utf8conv.c
common/dotlock.c
g10/armor.c
g10/build-packet.c
g10/call-agent.c
@ -65,11 +71,6 @@ g10/textfilter.c
g10/trustdb.c
g10/verify.c
jnlib/argparse.c
jnlib/logging.c
jnlib/utf8conv.c
jnlib/dotlock.c
kbx/kbxutil.c
scd/app-nks.c

View File

@ -1,3 +1,7 @@
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (scdaemon_LDADD): Remove libjnlib.a.
2009-12-15 Werner Koch <wk@g10code.com>
* iso7816.c (do_generate_keypair): s/readonly/read_only/ because

View File

@ -41,7 +41,7 @@ scdaemon_SOURCES = \
app.c app-common.h app-help.c $(card_apps)
scdaemon_LDADD = $(libcommonpth) ../jnlib/libjnlib.a ../gl/libgnu.a \
scdaemon_LDADD = $(libcommonpth) ../gl/libgnu.a \
$(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(LIBASSUAN_LIBS) $(PTH_LIBS) \
$(LIBUSB_LIBS) $(GPG_ERROR_LIBS) \
$(LIBINTL) $(DL_LIBS) $(NETLIBS) $(LIBICONV)

View File

@ -1,3 +1,9 @@
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (common_libs): Remove libjnlib.a. Change order.
* gpgsm.h: Remove "estream.h".
2010-03-08 Werner Koch <wk@g10code.com>
* certreqgen.c (gpgsm_genkey): Change OUT_FP to an estream_t

View File

@ -52,8 +52,7 @@ gpgsm_SOURCES = \
qualified.c
common_libs = $(libcommon) ../kbx/libkeybox.a ../jnlib/libjnlib.a \
../gl/libgnu.a
common_libs = ../kbx/libkeybox.a $(libcommon) ../gl/libgnu.a
gpgsm_LDADD = $(common_libs) ../common/libgpgrl.a \
$(LIBGCRYPT_LIBS) $(KSBA_LIBS) $(LIBASSUAN_LIBS) \

View File

@ -31,7 +31,6 @@
#include <ksba.h>
#include "../common/util.h"
#include "../common/status.h"
#include "../common/estream.h"
#include "../common/audit.h"
#include "../common/session-env.h"

View File

@ -1,3 +1,7 @@
2010-03-10 Werner Koch <wk@g10code.com>
* Makefile.am (common_libs): Remove libjnlib.a.
2010-03-08 Werner Koch <wk@g10code.com>
* no-libgcrypt.c (gcry_create_nonce): New.

View File

@ -53,7 +53,7 @@ endif
noinst_PROGRAMS = clean-sat mk-tdata make-dns-cert gpgsplit
common_libs = $(libcommon) ../jnlib/libjnlib.a ../gl/libgnu.a
common_libs = $(libcommon) ../gl/libgnu.a
pwquery_libs = ../common/libsimple-pwquery.a
gpgsplit_LDADD = $(common_libs) \
@ -62,7 +62,7 @@ gpgsplit_LDADD = $(common_libs) \
gpgconf_SOURCES = gpgconf.c gpgconf.h gpgconf-comp.c no-libgcrypt.c
# jnlib/common sucks in gpg-error, will they, nil they (some compilers
# common sucks in gpg-error, will they, nil they (some compilers
# do not eliminate the supposed-to-be-unused-inline-functions).
gpgconf_LDADD = $(common_libs) \
$(LIBINTL) $(GPG_ERROR_LIBS) $(LIBICONV) $(W32SOCKLIBS)
@ -86,7 +86,7 @@ gpg_connect_agent_LDADD = ../common/libgpgrl.a $(common_libs) \
gpgkey2ssh_SOURCES = gpgkey2ssh.c
gpgkey2ssh_CFLAGS = $(LIBGCRYPT_CFLAGS) $(GPG_ERROR_CFLAGS)
# common sucks in jnlib, via use of BUG() in an inline function, which
# common via use of BUG() in an inline function, which
# some compilers do not eliminate.
gpgkey2ssh_LDADD = $(common_libs) \
$(LIBGCRYPT_LIBS) $(GPG_ERROR_LIBS) $(LIBINTL) $(LIBICONV)