mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-10 13:04:23 +01:00
Merge branch 'master' into npth
Conflicts: ChangeLog common/ChangeLog
This commit is contained in:
commit
36e85416a3
@ -1,4 +1,4 @@
|
|||||||
2011-09-26 Marcus Brinkmann <marcus@g10code.com>
|
2011-10-13 Marcus Brinkmann <marcus@g10code.com>
|
||||||
|
|
||||||
* configure.ac: Don't check for PTH but for NPTH.
|
* configure.ac: Don't check for PTH but for NPTH.
|
||||||
(AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
|
(AH_BOTTOM): Remove PTH_SYSCALL_SOFT.
|
||||||
@ -8,6 +8,10 @@
|
|||||||
(USE_GNU_PTH): ... this.
|
(USE_GNU_PTH): ... this.
|
||||||
* m4/gnupg-npth.m4: New file.
|
* m4/gnupg-npth.m4: New file.
|
||||||
|
|
||||||
|
2011-09-23 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* configure.ac: Remove check for gcry_kdf_derive.
|
||||||
|
|
||||||
2011-08-10 Werner Koch <wk@g10code.com>
|
2011-08-10 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* configure.ac: Fix new autoconf warnings.
|
* configure.ac: Fix new autoconf warnings.
|
||||||
|
@ -3,6 +3,49 @@
|
|||||||
* estream.c, exechelp-posix.c, exechelp-w32.c, exechelp-w32ce.c,
|
* estream.c, exechelp-posix.c, exechelp-w32.c, exechelp-w32ce.c,
|
||||||
http.c, init.c, sysutils.c: Port to NPth.
|
http.c, init.c, sysutils.c: Port to NPth.
|
||||||
|
|
||||||
|
2011-09-30 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
Change the license of all JNLIB parts from LPGLv3+ to to LGPLv3+
|
||||||
|
or GPLv2+.
|
||||||
|
|
||||||
|
* dotlock.h (DOTLOCK_EXT_SYM_PREFIX): New macro.
|
||||||
|
|
||||||
|
2011-09-29 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* dotlock.c (DOTLOCK_USE_PTHREAD): New macro.
|
||||||
|
[DOTLOCK_USE_PTHREAD] (all_lockfiles_mutex): New.
|
||||||
|
(LOCK_all_lockfiles, UNLOCK_all_lockfiles): New. Use them to
|
||||||
|
protect access to all_lockfiles.
|
||||||
|
(dotlock_set_fd, dotlock_get_fd): New.
|
||||||
|
|
||||||
|
2011-09-28 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* dotlock.c (dotlock_take, dotlock_take_unix, dotlock_take_w32):
|
||||||
|
Implement arbitrary timeout values.
|
||||||
|
(dotlock_create): Add arg FLAGS for future extensions.
|
||||||
|
|
||||||
|
2011-09-27 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* dotlock.c (dotlock_take_unix): Check only the link count and not
|
||||||
|
the error return from link.
|
||||||
|
(use_hardlinks_p): New.
|
||||||
|
(dotlock_create_unix): Test for hardlinks.
|
||||||
|
(dotlock_take_unix): Implement O_EXCL locking.
|
||||||
|
|
||||||
|
2011-09-23 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* dotlock.c: Factor Unix and W32 specific code out into specific
|
||||||
|
functions. Define HAVE_POSIX_SYSTEM. Rearrange some functions.
|
||||||
|
(disable_dotlock): Rename to dotlock_disable.
|
||||||
|
(create_dotlock): Rename to dotlock_create.
|
||||||
|
(destroy_dotlock): Rename to dotlock_destroy.
|
||||||
|
(make_dotlock): Rename to dotlock_take.
|
||||||
|
(release_dotlock): Rename to dotlock_release.
|
||||||
|
|
||||||
|
2011-09-22 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* dotlock.c: Remove support for RISCOS.
|
||||||
|
|
||||||
2011-08-10 Werner Koch <wk@g10code.com>
|
2011-08-10 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* t-exechelp.c (test_close_all_fds): Don't use the DUMMY_FD var.
|
* t-exechelp.c (test_close_all_fds): Don't use the DUMMY_FD var.
|
||||||
@ -2399,7 +2442,7 @@
|
|||||||
|
|
||||||
|
|
||||||
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
|
||||||
2009, 2010 Free Software Foundation, Inc.
|
2009, 2010, 2011 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This file is free software; as a special exception the author gives
|
This file is free software; as a special exception the author gives
|
||||||
unlimited permission to copy and/or distribute it, with or without
|
unlimited permission to copy and/or distribute it, with or without
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2006
|
* Copyright (C) 1998, 1999, 2000, 2001, 2006
|
||||||
* 2007, 2008 Free Software Foundation, Inc.
|
* 2007, 2008 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 2.1 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* argparse.h - Argument parser for option handling.
|
/* argparse.h - Argument parser for option handling.
|
||||||
* Copyright (C) 1998,1999,2000,2001,2006 Free Software Foundation, Inc.
|
* Copyright (C) 1998,1999,2000,2001,2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 2.1 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_ARGPARSE_H
|
#ifndef LIBJNLIB_ARGPARSE_H
|
||||||
|
@ -287,14 +287,14 @@ lock_spawning (lock_spawn_t *lock, const char *homedir, const char *name,
|
|||||||
if (!fname)
|
if (!fname)
|
||||||
return gpg_error_from_syserror ();
|
return gpg_error_from_syserror ();
|
||||||
|
|
||||||
*lock = create_dotlock (fname);
|
*lock = dotlock_create (fname, 0);
|
||||||
xfree (fname);
|
xfree (fname);
|
||||||
if (!*lock)
|
if (!*lock)
|
||||||
return gpg_error_from_syserror ();
|
return gpg_error_from_syserror ();
|
||||||
|
|
||||||
/* FIXME: We should use a timeout of 5000 here - however
|
/* FIXME: We should use a timeout of 5000 here - however
|
||||||
make_dotlock does not yet support values other than -1 and 0. */
|
make_dotlock does not yet support values other than -1 and 0. */
|
||||||
if (make_dotlock (*lock, -1))
|
if (dotlock_take (*lock, -1))
|
||||||
return gpg_error_from_syserror ();
|
return gpg_error_from_syserror ();
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -315,7 +315,7 @@ unlock_spawning (lock_spawn_t *lock, const char *name)
|
|||||||
CloseHandle (*lock);
|
CloseHandle (*lock);
|
||||||
#else /*!HAVE_W32_SYSTEM*/
|
#else /*!HAVE_W32_SYSTEM*/
|
||||||
(void)name;
|
(void)name;
|
||||||
destroy_dotlock (*lock);
|
dotlock_destroy (*lock);
|
||||||
#endif /*!HAVE_W32_SYSTEM*/
|
#endif /*!HAVE_W32_SYSTEM*/
|
||||||
*lock = NULL;
|
*lock = NULL;
|
||||||
}
|
}
|
||||||
|
1633
common/dotlock.c
1633
common/dotlock.c
File diff suppressed because it is too large
Load Diff
@ -1,33 +1,76 @@
|
|||||||
/* dotlock.h
|
/* dotlock.h - dotfile locking declarations
|
||||||
* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 2000, 2001, 2006, 2011 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_DOTLOCK_H
|
#ifndef LIBJNLIB_DOTLOCK_H
|
||||||
#define LIBJNLIB_DOTLOCK_H
|
#define LIBJNLIB_DOTLOCK_H
|
||||||
|
|
||||||
|
/* See dotlock.c for a description. */
|
||||||
|
|
||||||
|
#ifdef DOTLOCK_EXT_SYM_PREFIX
|
||||||
|
# ifndef _DOTLOCK_PREFIX
|
||||||
|
# define _DOTLOCK_PREFIX1(x,y) x ## y
|
||||||
|
# define _DOTLOCK_PREFIX2(x,y) _DOTLOCK_PREFIX1(x,y)
|
||||||
|
# define _DOTLOCK_PREFIX(x) _DOTLOCK_PREFIX2(DOTLOCK_EXT_SYM_PREFIX,x)
|
||||||
|
# endif /*_DOTLOCK_PREFIX*/
|
||||||
|
# define dotlock_disable _DOTLOCK_PREFIX(dotlock_disable)
|
||||||
|
# define dotlock_create _DOTLOCK_PREFIX(dotlock_create)
|
||||||
|
# define dotlock_set_fd _DOTLOCK_PREFIX(dotlock_set_fd)
|
||||||
|
# define dotlock_get_fd _DOTLOCK_PREFIX(dotlock_get_fd)
|
||||||
|
# define dotlock_destroy _DOTLOCK_PREFIX(dotlock_destroy)
|
||||||
|
# define dotlock_take _DOTLOCK_PREFIX(dotlock_take)
|
||||||
|
# define dotlock_release _DOTLOCK_PREFIX(dotlock_release)
|
||||||
|
# define dotlock_remove_lockfiles _DOTLOCK_PREFIX(dotlock_remove_lockfiles)
|
||||||
|
#endif /*DOTLOCK_EXT_SYM_PREFIX*/
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
struct dotlock_handle;
|
struct dotlock_handle;
|
||||||
typedef struct dotlock_handle *dotlock_t;
|
typedef struct dotlock_handle *dotlock_t;
|
||||||
|
|
||||||
void disable_dotlock (void);
|
void dotlock_disable (void);
|
||||||
dotlock_t create_dotlock (const char *file_to_lock);
|
dotlock_t dotlock_create (const char *file_to_lock, unsigned int flags);
|
||||||
void destroy_dotlock ( dotlock_t h );
|
void dotlock_set_fd (dotlock_t h, int fd);
|
||||||
int make_dotlock (dotlock_t h, long timeout);
|
int dotlock_get_fd (dotlock_t h);
|
||||||
int release_dotlock (dotlock_t h);
|
void dotlock_destroy (dotlock_t h);
|
||||||
|
int dotlock_take (dotlock_t h, long timeout);
|
||||||
|
int dotlock_release (dotlock_t h);
|
||||||
void dotlock_remove_lockfiles (void);
|
void dotlock_remove_lockfiles (void);
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
#endif /*LIBJNLIB_DOTLOCK_H*/
|
#endif /*LIBJNLIB_DOTLOCK_H*/
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* dynload.h - Wrapper functions for run-time dynamic loading
|
/* dynload.h - Wrapper functions for run-time dynamic loading
|
||||||
* Copyright (C) 2003, 2010 Free Software Foundation, Inc.
|
* Copyright (C) 2003, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_DYNLOAD_H
|
#ifndef LIBJNLIB_DYNLOAD_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* libjnlib-config.h - local configuration of the jnlib functions
|
/* libjnlib-config.h - local configuration of the jnlib functions
|
||||||
* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/****************
|
/****************
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
|
||||||
* 2009, 2010 Free Software Foundation, Inc.
|
* 2009, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1999, 2000, 2001, 2004, 2006,
|
* Copyright (C) 1999, 2000, 2001, 2004, 2006,
|
||||||
* 2010 Free Software Foundation, Inc.
|
* 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_LOGGING_H
|
#ifndef LIBJNLIB_LOGGING_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* mischelp.c - Miscellaneous helper functions
|
/* mischelp.c - Miscellaneous helper functions
|
||||||
* Copyright (C) 1998, 2000, 2001, 2006, 2007 Free Software Foundation, Inc.
|
* Copyright (C) 1998, 2000, 2001, 2006, 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1999, 2000, 2001, 2002, 2003,
|
* Copyright (C) 1999, 2000, 2001, 2002, 2003,
|
||||||
* 2006, 2007, 2009 Free Software Foundation, Inc.
|
* 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_MISCHELP_H
|
#ifndef LIBJNLIB_MISCHELP_H
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
|
||||||
* 2008, 2009, 2010 Free Software Foundation, Inc.
|
* 2008, 2009, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1998, 1999, 2000, 2001, 2003,
|
* Copyright (C) 1998, 1999, 2000, 2001, 2003,
|
||||||
* 2006, 2007, 2009 Free Software Foundation, Inc.
|
* 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_STRINGHELP_H
|
#ifndef LIBJNLIB_STRINGHELP_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* strlist.c - string helpers
|
/* strlist.c - string helpers
|
||||||
* Copyright (C) 1998, 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 1998, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* strlist.h
|
/* strlist.h
|
||||||
* Copyright (C) 1998, 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 1998, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_STRLIST_H
|
#ifndef LIBJNLIB_STRLIST_H
|
||||||
|
145
common/t-dotlock.c
Normal file
145
common/t-dotlock.c
Normal file
@ -0,0 +1,145 @@
|
|||||||
|
/* t-dotlock.c - Module test for dotlock.c
|
||||||
|
* Copyright (C) 2011 Free Software Foundation, Inc.
|
||||||
|
*
|
||||||
|
* This file is part of GnuPG.
|
||||||
|
*
|
||||||
|
* GnuPG is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 3 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* GnuPG 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 General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Note: This is a standalone test program which does not rely on any
|
||||||
|
GnuPG helper files. However, it may also be build as part of the
|
||||||
|
GnuPG build system. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Some quick replacements for stuff we usually expect to be defined
|
||||||
|
in config.h. Define HAVE_POSIX_SYSTEM for better readability. */
|
||||||
|
#if !defined (HAVE_DOSISH_SYSTEM) && defined(_WIN32)
|
||||||
|
# define HAVE_DOSISH_SYSTEM 1
|
||||||
|
#endif
|
||||||
|
#if !defined (HAVE_DOSISH_SYSTEM) && !defined (HAVE_POSIX_SYSTEM)
|
||||||
|
# define HAVE_POSIX_SYSTEM 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <signal.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#include "dotlock.h"
|
||||||
|
|
||||||
|
#define PGM "t-dotlock"
|
||||||
|
|
||||||
|
|
||||||
|
static volatile int ctrl_c_pending;
|
||||||
|
|
||||||
|
static void
|
||||||
|
control_c_handler (int signo)
|
||||||
|
{
|
||||||
|
(void)signo;
|
||||||
|
ctrl_c_pending = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
die (const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list arg_ptr;
|
||||||
|
|
||||||
|
va_start (arg_ptr, format);
|
||||||
|
fprintf (stderr, PGM "[%lu]: ", (unsigned long)getpid ());
|
||||||
|
vfprintf (stderr, format, arg_ptr);
|
||||||
|
putc ('\n', stderr);
|
||||||
|
va_end (arg_ptr);
|
||||||
|
exit (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
inf (const char *format, ...)
|
||||||
|
{
|
||||||
|
va_list arg_ptr;
|
||||||
|
|
||||||
|
va_start (arg_ptr, format);
|
||||||
|
fprintf (stderr, PGM "[%lu]: ", (unsigned long)getpid ());
|
||||||
|
vfprintf (stderr, format, arg_ptr);
|
||||||
|
putc ('\n', stderr);
|
||||||
|
va_end (arg_ptr);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
lock_and_unlock (const char *fname)
|
||||||
|
{
|
||||||
|
dotlock_t h;
|
||||||
|
|
||||||
|
h = dotlock_create (fname, 0);
|
||||||
|
if (!h)
|
||||||
|
die ("error creating lock file for `%s': %s", fname, strerror (errno));
|
||||||
|
inf ("lock created");
|
||||||
|
|
||||||
|
while (!ctrl_c_pending)
|
||||||
|
{
|
||||||
|
if (dotlock_take (h, -1))
|
||||||
|
die ("error taking lock");
|
||||||
|
inf ("lock taken");
|
||||||
|
sleep (1);
|
||||||
|
if (dotlock_release (h))
|
||||||
|
die ("error releasing lock");
|
||||||
|
inf ("lock released");
|
||||||
|
sleep (1);
|
||||||
|
}
|
||||||
|
dotlock_destroy (h);
|
||||||
|
inf ("lock destroyed");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int
|
||||||
|
main (int argc, char **argv)
|
||||||
|
{
|
||||||
|
const char *fname;
|
||||||
|
|
||||||
|
if (argc > 1)
|
||||||
|
fname = argv[1];
|
||||||
|
else
|
||||||
|
fname = "t-dotlock.tmp";
|
||||||
|
|
||||||
|
{
|
||||||
|
struct sigaction nact;
|
||||||
|
|
||||||
|
nact.sa_handler = control_c_handler;
|
||||||
|
nact.sa_flags = 0;
|
||||||
|
sigaction (SIGINT, &nact, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
dotlock_create (NULL, 0); /* Initialize (optional). */
|
||||||
|
|
||||||
|
lock_and_unlock (fname);
|
||||||
|
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Local Variables:
|
||||||
|
compile-command: "cc -Wall -O2 -D_FILE_OFFSET_BITS=64 -o t-dotlock t-dotlock.c dotlock.c"
|
||||||
|
End:
|
||||||
|
*/
|
@ -1,20 +1,31 @@
|
|||||||
/* t-stringhelp.c - Regression tests for stringhelp.c
|
/* t-stringhelp.c - Regression tests for stringhelp.c
|
||||||
* Copyright (C) 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* t-support.c - helper functions for the regression tests.
|
/* t-support.c - helper functions for the regression tests.
|
||||||
* Copyright (C) 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* t-support.h - Helper for the regression tests
|
/* t-support.h - Helper for the regression tests
|
||||||
* Copyright (C) 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_T_SUPPORT_H
|
#ifndef LIBJNLIB_T_SUPPORT_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* t-timestuff.c - Regression tests for time functions
|
/* t-timestuff.c - Regression tests for time functions
|
||||||
* Copyright (C) 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* t-w32-reg.c - Regression tests for W32 registry functions
|
/* t-w32-reg.c - Regression tests for W32 registry functions
|
||||||
* Copyright (C) 2010 Free Software Foundation, Inc.
|
* Copyright (C) 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* types.h - define some extra types
|
/* types.h - define some extra types
|
||||||
* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_TYPES_H
|
#ifndef LIBJNLIB_TYPES_H
|
||||||
|
@ -2,20 +2,31 @@
|
|||||||
* Copyright (C) 1994, 1998, 1999, 2000, 2001, 2003, 2006,
|
* Copyright (C) 1994, 1998, 1999, 2000, 2001, 2003, 2006,
|
||||||
* 2008, 2010 Free Software Foundation, Inc.
|
* 2008, 2010 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* utf8conf.h
|
/* utf8conf.h
|
||||||
* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_UTF8CONF_H
|
#ifndef LIBJNLIB_UTF8CONF_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* util.h - Utility functions for GnuPG
|
/* util.h - Utility functions for GnuPG
|
||||||
* Copyright (C) 2001, 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
|
* Copyright (C) 2001, 2002, 2003, 2004, 2009 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of GnuPG.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* GnuPG is free software; you can redistribute it and/or modify
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* it under the terms of the GNU General Public License as published by
|
* under the terms of either
|
||||||
* the Free Software Foundation; either version 3 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
*
|
||||||
* GnuPG is distributed in the hope that it will be useful,
|
* - the GNU Lesser General Public License as published by the Free
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
* Software Foundation; either version 3 of the License, or (at
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
* your option) any later version.
|
||||||
* GNU General Public License for more details.
|
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* or
|
||||||
* along with this program; if not, see <http://www.gnu.org/licenses/>.
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
|
*
|
||||||
|
* 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
|
||||||
|
* General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copies of the GNU General Public License
|
||||||
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNUPG_COMMON_UTIL_H
|
#ifndef GNUPG_COMMON_UTIL_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* w32-afunix.c - AF_UNIX emulation for Windows (Client only).
|
/* w32-afunix.c - AF_UNIX emulation for Windows (Client only).
|
||||||
* Copyright (C) 2004, 2006 g10 Code GmbH
|
* Copyright (C) 2004, 2006 g10 Code GmbH
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Use of this code is deprecated - you better use the socket wrappers
|
/* Use of this code is deprecated - you better use the socket wrappers
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* w32-afunix.h - AF_UNIX emulation for Windows
|
/* w32-afunix.h - AF_UNIX emulation for Windows
|
||||||
* Copyright (C) 2004, 2006 g10 Code GmbH
|
* Copyright (C) 2004, 2006 g10 Code GmbH
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* w32-reg.c - MS-Windows Registry access
|
/* w32-reg.c - MS-Windows Registry access
|
||||||
* Copyright (C) 1999, 2002, 2007 Free Software Foundation, Inc.
|
* Copyright (C) 1999, 2002, 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* w32help.h - W32 speicif functions
|
/* w32help.h - W32 speicif functions
|
||||||
* Copyright (C) 2007 Free Software Foundation, Inc.
|
* Copyright (C) 2007 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_W32HELP_H
|
#ifndef LIBJNLIB_W32HELP_H
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* xmalloc.c - standard malloc wrappers
|
/* xmalloc.c - standard malloc wrappers
|
||||||
* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -1,20 +1,31 @@
|
|||||||
/* xmalloc.h
|
/* xmalloc.h
|
||||||
* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
* Copyright (C) 1999, 2000, 2001, 2006 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This file is part of JNLIB.
|
* This file is part of JNLIB, which is a subsystem of GnuPG.
|
||||||
*
|
*
|
||||||
* JNLIB is free software; you can redistribute it and/or modify it
|
* JNLIB is free software; you can redistribute it and/or modify it
|
||||||
* under the terms of the GNU Lesser General Public License as
|
* under the terms of either
|
||||||
* published by the Free Software Foundation; either version 3 of
|
*
|
||||||
* the License, or (at your option) any later version.
|
* - 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.
|
||||||
|
*
|
||||||
|
* or
|
||||||
|
*
|
||||||
|
* - the GNU General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2 of the License, or (at
|
||||||
|
* your option) any later version.
|
||||||
|
*
|
||||||
|
* or both in parallel, as here.
|
||||||
*
|
*
|
||||||
* JNLIB is distributed in the hope that it will be useful, but
|
* JNLIB is distributed in the hope that it will be useful, but
|
||||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
* Lesser General Public License for more details.
|
* General Public License for more details.
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU Lesser General Public
|
* You should have received a copies of the GNU General Public License
|
||||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
* and the GNU Lesser General Public License along with this program;
|
||||||
|
* if not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef LIBJNLIB_XMALLOC_H
|
#ifndef LIBJNLIB_XMALLOC_H
|
||||||
|
33
configure.ac
33
configure.ac
@ -741,21 +741,6 @@ AM_PATH_GPG_ERROR("$NEED_GPG_ERROR_VERSION",
|
|||||||
AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
|
AM_PATH_LIBGCRYPT("$NEED_LIBGCRYPT_API:$NEED_LIBGCRYPT_VERSION",
|
||||||
have_libgcrypt=yes,have_libgcrypt=no)
|
have_libgcrypt=yes,have_libgcrypt=no)
|
||||||
|
|
||||||
# FIxme: Remove this test after libgcrypt 1.5.0 has been released.
|
|
||||||
AC_CACHE_CHECK([whether Libgcrypt has gcry_kdf_derive],
|
|
||||||
gnupg_cv_gcry_kdf_derive,
|
|
||||||
[ _gnupg_gcry_save_cflags=$CFLAGS
|
|
||||||
_gnupg_gcry_save_libs=$LIBS
|
|
||||||
CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS"
|
|
||||||
LIBS="$LIBS $LIBGCRYPT_LIBS"
|
|
||||||
AC_TRY_LINK(
|
|
||||||
[#include <gcrypt.h>],
|
|
||||||
[ return gcry_kdf_derive (NULL,0,0,0,NULL,0,0,0,NULL); ],
|
|
||||||
gnupg_cv_gcry_kdf_derive=yes,
|
|
||||||
gnupg_cv_gcry_kdf_derive=no)
|
|
||||||
LIBS=$_gnupg_gcry_save_libs
|
|
||||||
CFLAGS=$_gnupg_gcry_save_cflags])
|
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# libassuan is used for IPC
|
# libassuan is used for IPC
|
||||||
@ -1616,15 +1601,15 @@ if test "$have_libgcrypt" = "no"; then
|
|||||||
*** ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/
|
*** ftp://ftp.gnupg.org/gcrypt/alpha/libgcrypt/
|
||||||
*** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
|
*** (at least version $NEED_LIBGCRYPT_VERSION using API $NEED_LIBGCRYPT_API is required.)
|
||||||
***]])
|
***]])
|
||||||
elif test "$gnupg_cv_gcry_kdf_derive" = no; then
|
dnl elif test "$gnupg_cv_gcry_kdf_derive" = no; then
|
||||||
die=yes
|
dnl die=yes
|
||||||
AC_MSG_NOTICE([[
|
dnl AC_MSG_NOTICE([[
|
||||||
***
|
dnl ***
|
||||||
*** Libgcrypt 1.5.0 has not yet been released and thus the API
|
dnl *** Libgcrypt 1.5.0 has not yet been released and thus the API
|
||||||
*** is a bit in a flux. Your version misses the function
|
dnl *** is a bit in a flux. Your version misses the function
|
||||||
*** gcry_kdf_derive
|
dnl *** gcry_kdf_derive
|
||||||
*** You need to install a newer Libgcrypt version.
|
dnl *** You need to install a newer Libgcrypt version.
|
||||||
***]])
|
dnl #***]])
|
||||||
fi
|
fi
|
||||||
if test "$have_libassuan" = "no"; then
|
if test "$have_libassuan" = "no"; then
|
||||||
die=yes
|
die=yes
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
2011-10-12 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* gpg.texi: Add a bunch of opindex items.
|
||||||
|
|
||||||
|
* yat2m.c (parse_file): Add hack to allow table indentation.
|
||||||
|
|
||||||
2011-08-12 Werner Koch <wk@g10code.com>
|
2011-08-12 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* texi.css: Override some elements.
|
* texi.css: Override some elements.
|
||||||
|
@ -204,7 +204,6 @@ below the home directory of the user.
|
|||||||
|
|
||||||
@item -v
|
@item -v
|
||||||
@item --verbose
|
@item --verbose
|
||||||
@opindex v
|
|
||||||
@opindex verbose
|
@opindex verbose
|
||||||
Outputs additional information while running.
|
Outputs additional information while running.
|
||||||
You can increase the verbosity by giving several
|
You can increase the verbosity by giving several
|
||||||
@ -212,7 +211,6 @@ verbose commands to @command{gpgsm}, such as @samp{-vv}.
|
|||||||
|
|
||||||
@item -q
|
@item -q
|
||||||
@item --quiet
|
@item --quiet
|
||||||
@opindex q
|
|
||||||
@opindex quiet
|
@opindex quiet
|
||||||
Try to be as quiet as possible.
|
Try to be as quiet as possible.
|
||||||
|
|
||||||
@ -300,9 +298,7 @@ debugging.
|
|||||||
@itemx --sh
|
@itemx --sh
|
||||||
@itemx -c
|
@itemx -c
|
||||||
@itemx --csh
|
@itemx --csh
|
||||||
@opindex s
|
|
||||||
@opindex sh
|
@opindex sh
|
||||||
@opindex c
|
|
||||||
@opindex csh
|
@opindex csh
|
||||||
Format the info output in daemon mode for use with the standard Bourne
|
Format the info output in daemon mode for use with the standard Bourne
|
||||||
shell or the C-shell respectively. The default is to guess it based on
|
shell or the C-shell respectively. The default is to guess it based on
|
||||||
|
1336
doc/gpg.texi
1336
doc/gpg.texi
File diff suppressed because it is too large
Load Diff
@ -479,7 +479,6 @@ for a reason.
|
|||||||
@item --armor
|
@item --armor
|
||||||
@itemx -a
|
@itemx -a
|
||||||
@opindex armor
|
@opindex armor
|
||||||
@opindex -a
|
|
||||||
Create PEM encoded output. Default is binary output.
|
Create PEM encoded output. Default is binary output.
|
||||||
|
|
||||||
@item --base64
|
@item --base64
|
||||||
@ -523,7 +522,6 @@ set; however @option{--default-key} always overrides this.
|
|||||||
@item --local-user @var{user_id}
|
@item --local-user @var{user_id}
|
||||||
@item -u @var{user_id}
|
@item -u @var{user_id}
|
||||||
@opindex local-user
|
@opindex local-user
|
||||||
@opindex -u
|
|
||||||
Set the user(s) to be used for signing. The default is the first
|
Set the user(s) to be used for signing. The default is the first
|
||||||
secret key found in the database.
|
secret key found in the database.
|
||||||
|
|
||||||
|
@ -1193,7 +1193,6 @@ Specify the agent program to be started if none is running.
|
|||||||
|
|
||||||
@item -S
|
@item -S
|
||||||
@itemx --raw-socket @var{name}
|
@itemx --raw-socket @var{name}
|
||||||
@opindex S
|
|
||||||
@opindex raw-socket
|
@opindex raw-socket
|
||||||
Connect to socket @var{name} assuming this is an Assuan style server.
|
Connect to socket @var{name} assuming this is an Assuan style server.
|
||||||
Do not run any special initializations or environment checks. This may
|
Do not run any special initializations or environment checks. This may
|
||||||
|
101
doc/yat2m.c
101
doc/yat2m.c
@ -1,6 +1,6 @@
|
|||||||
/* yat2m.c - Yet Another Texi 2 Man converter
|
/* yat2m.c - Yet Another Texi 2 Man converter
|
||||||
* Copyright (C) 2005 g10 Code GmbH
|
* Copyright (C) 2005 g10 Code GmbH
|
||||||
* Copyright (C) 2006, 2008 Free Software Foundation, Inc.
|
* Copyright (C) 2006, 2008, 2011 Free Software Foundation, Inc.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -29,11 +29,11 @@
|
|||||||
@end macro
|
@end macro
|
||||||
@macro mansect {a}
|
@macro mansect {a}
|
||||||
@end macro
|
@end macro
|
||||||
@macro manpause
|
@macro manpause
|
||||||
@end macro
|
@end macro
|
||||||
@macro mancont
|
@macro mancont
|
||||||
@end macro
|
@end macro
|
||||||
|
|
||||||
They are used by yat2m to select parts of the Texinfo which should
|
They are used by yat2m to select parts of the Texinfo which should
|
||||||
go into the man page. These macros need to be used without leading
|
go into the man page. These macros need to be used without leading
|
||||||
left space. Processing starts after a "manpage" macro has been
|
left space. Processing starts after a "manpage" macro has been
|
||||||
@ -72,7 +72,21 @@
|
|||||||
extracted from one file, either using the --store or the --select
|
extracted from one file, either using the --store or the --select
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
If you want to indent tables in the source use this style:
|
||||||
|
|
||||||
|
@table foo
|
||||||
|
@item
|
||||||
|
@item
|
||||||
|
@table
|
||||||
|
@item
|
||||||
|
@end
|
||||||
|
@end
|
||||||
|
|
||||||
|
Don't change the indentation within a table and keep the same
|
||||||
|
number of white space at the start of the line. yat2m simply
|
||||||
|
detects the number of white spaces in front of an @item and remove
|
||||||
|
this number of spaces from all following lines until a new @item
|
||||||
|
is found or there are less spaces than for the last @item.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -97,8 +111,8 @@
|
|||||||
static int verbose;
|
static int verbose;
|
||||||
static int quiet;
|
static int quiet;
|
||||||
static int debug;
|
static int debug;
|
||||||
static const char *opt_source;
|
static const char *opt_source;
|
||||||
static const char *opt_release;
|
static const char *opt_release;
|
||||||
static const char *opt_select;
|
static const char *opt_select;
|
||||||
static const char *opt_include;
|
static const char *opt_include;
|
||||||
static int opt_store;
|
static int opt_store;
|
||||||
@ -148,22 +162,22 @@ struct section_buffer_s
|
|||||||
typedef struct section_buffer_s *section_buffer_t;
|
typedef struct section_buffer_s *section_buffer_t;
|
||||||
|
|
||||||
/* Variable to keep info about the current page together. */
|
/* Variable to keep info about the current page together. */
|
||||||
static struct
|
static struct
|
||||||
{
|
{
|
||||||
/* Filename of the current page or NULL if no page is active. Malloced. */
|
/* Filename of the current page or NULL if no page is active. Malloced. */
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
/* Number of allocated elements in SECTIONS below. */
|
/* Number of allocated elements in SECTIONS below. */
|
||||||
size_t n_sections;
|
size_t n_sections;
|
||||||
/* Array with the data of the sections. */
|
/* Array with the data of the sections. */
|
||||||
section_buffer_t sections;
|
section_buffer_t sections;
|
||||||
|
|
||||||
} thepage;
|
} thepage;
|
||||||
|
|
||||||
|
|
||||||
/* The list of standard section names. COMMANDS and ASSUAN are GnuPG
|
/* The list of standard section names. COMMANDS and ASSUAN are GnuPG
|
||||||
specific. */
|
specific. */
|
||||||
static const char * const standard_sections[] =
|
static const char * const standard_sections[] =
|
||||||
{ "NAME", "SYNOPSIS", "DESCRIPTION",
|
{ "NAME", "SYNOPSIS", "DESCRIPTION",
|
||||||
"RETURN VALUE", "EXIT STATUS", "ERROR HANDLING", "ERRORS",
|
"RETURN VALUE", "EXIT STATUS", "ERROR HANDLING", "ERRORS",
|
||||||
"COMMANDS", "OPTIONS", "USAGE", "EXAMPLES", "FILES",
|
"COMMANDS", "OPTIONS", "USAGE", "EXAMPLES", "FILES",
|
||||||
@ -286,7 +300,7 @@ isodatestring (void)
|
|||||||
static char buffer[11+5];
|
static char buffer[11+5];
|
||||||
struct tm *tp;
|
struct tm *tp;
|
||||||
time_t atime = time (NULL);
|
time_t atime = time (NULL);
|
||||||
|
|
||||||
if (atime < 0)
|
if (atime < 0)
|
||||||
strcpy (buffer, "????" "-??" "-??");
|
strcpy (buffer, "????" "-??" "-??");
|
||||||
else
|
else
|
||||||
@ -307,7 +321,7 @@ static section_buffer_t
|
|||||||
get_section_buffer (const char *name)
|
get_section_buffer (const char *name)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
section_buffer_t sect;
|
section_buffer_t sect;
|
||||||
|
|
||||||
/* If there is no section we put everything into the required NAME
|
/* If there is no section we put everything into the required NAME
|
||||||
section. Given that this is the first one listed it is likely
|
section. Given that this is the first one listed it is likely
|
||||||
@ -452,8 +466,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
{ "sc", 0, "\\fB", "\\fR" },
|
{ "sc", 0, "\\fB", "\\fR" },
|
||||||
{ "var", 0, "\\fI", "\\fR" },
|
{ "var", 0, "\\fI", "\\fR" },
|
||||||
{ "samp", 0, "\\(aq", "\\(aq" },
|
{ "samp", 0, "\\(aq", "\\(aq" },
|
||||||
{ "file", 0, "\\(oq\\fI","\\fR\\(cq" },
|
{ "file", 0, "\\(oq\\fI","\\fR\\(cq" },
|
||||||
{ "env", 0, "\\(oq\\fI","\\fR\\(cq" },
|
{ "env", 0, "\\(oq\\fI","\\fR\\(cq" },
|
||||||
{ "acronym", 0 },
|
{ "acronym", 0 },
|
||||||
{ "dfn", 0 },
|
{ "dfn", 0 },
|
||||||
{ "option", 0, "\\fB", "\\fR" },
|
{ "option", 0, "\\fB", "\\fR" },
|
||||||
@ -467,7 +481,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
{ "uref", 0, "(\\fB", "\\fR)" },
|
{ "uref", 0, "(\\fB", "\\fR)" },
|
||||||
{ "footnote",0, " ([", "])" },
|
{ "footnote",0, " ([", "])" },
|
||||||
{ "emph", 0, "\\fI", "\\fR" },
|
{ "emph", 0, "\\fI", "\\fR" },
|
||||||
{ "w", 1 },
|
{ "w", 1 },
|
||||||
{ "c", 5 },
|
{ "c", 5 },
|
||||||
{ "opindex", 1 },
|
{ "opindex", 1 },
|
||||||
{ "cpindex", 1 },
|
{ "cpindex", 1 },
|
||||||
@ -479,8 +493,8 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
{ "chapheading", 0},
|
{ "chapheading", 0},
|
||||||
{ "item", 2, ".TP\n.B " },
|
{ "item", 2, ".TP\n.B " },
|
||||||
{ "itemx", 2, ".TP\n.B " },
|
{ "itemx", 2, ".TP\n.B " },
|
||||||
{ "table", 3 },
|
{ "table", 3 },
|
||||||
{ "itemize", 3 },
|
{ "itemize", 3 },
|
||||||
{ "bullet", 0, "* " },
|
{ "bullet", 0, "* " },
|
||||||
{ "end", 4 },
|
{ "end", 4 },
|
||||||
{ "quotation",1, ".RS\n\\fB" },
|
{ "quotation",1, ".RS\n\\fB" },
|
||||||
@ -504,7 +518,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
{
|
{
|
||||||
case 1: /* Throw away the entire line. */
|
case 1: /* Throw away the entire line. */
|
||||||
s = memchr (rest, '\n', len);
|
s = memchr (rest, '\n', len);
|
||||||
return s? (s-rest)+1 : len;
|
return s? (s-rest)+1 : len;
|
||||||
case 2: /* Handle @item. */
|
case 2: /* Handle @item. */
|
||||||
break;
|
break;
|
||||||
case 3: /* Handle table. */
|
case 3: /* Handle table. */
|
||||||
@ -512,7 +526,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
fputs (".RS\n", fp);
|
fputs (".RS\n", fp);
|
||||||
/* Now throw away the entire line. */
|
/* Now throw away the entire line. */
|
||||||
s = memchr (rest, '\n', len);
|
s = memchr (rest, '\n', len);
|
||||||
return s? (s-rest)+1 : len;
|
return s? (s-rest)+1 : len;
|
||||||
break;
|
break;
|
||||||
case 4: /* Handle end. */
|
case 4: /* Handle end. */
|
||||||
for (s=rest, n=len; n && (*s == ' ' || *s == '\t'); s++, n--)
|
for (s=rest, n=len; n && (*s == ' ' || *s == '\t'); s++, n--)
|
||||||
@ -540,7 +554,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
}
|
}
|
||||||
/* Now throw away the entire line. */
|
/* Now throw away the entire line. */
|
||||||
s = memchr (rest, '\n', len);
|
s = memchr (rest, '\n', len);
|
||||||
return s? (s-rest)+1 : len;
|
return s? (s-rest)+1 : len;
|
||||||
case 5: /* Handle special comments. */
|
case 5: /* Handle special comments. */
|
||||||
for (s=rest, n=len; n && (*s == ' ' || *s == '\t'); s++, n--)
|
for (s=rest, n=len; n && (*s == ' ' || *s == '\t'); s++, n--)
|
||||||
;
|
;
|
||||||
@ -552,7 +566,7 @@ proc_texi_cmd (FILE *fp, const char *command, const char *rest, size_t len,
|
|||||||
}
|
}
|
||||||
/* Now throw away the entire line. */
|
/* Now throw away the entire line. */
|
||||||
s = memchr (rest, '\n', len);
|
s = memchr (rest, '\n', len);
|
||||||
return s? (s-rest)+1 : len;
|
return s? (s-rest)+1 : len;
|
||||||
case 6:
|
case 6:
|
||||||
*eol_action = 1;
|
*eol_action = 1;
|
||||||
break;
|
break;
|
||||||
@ -627,17 +641,17 @@ proc_texi_buffer (FILE *fp, const char *line, size_t len,
|
|||||||
{
|
{
|
||||||
switch (*s)
|
switch (*s)
|
||||||
{
|
{
|
||||||
case '@': case '{': case '}':
|
case '@': case '{': case '}':
|
||||||
putc (*s, fp); in_cmd = 0;
|
putc (*s, fp); in_cmd = 0;
|
||||||
break;
|
break;
|
||||||
case ':': /* Not ending a sentence flag. */
|
case ':': /* Not ending a sentence flag. */
|
||||||
in_cmd = 0;
|
in_cmd = 0;
|
||||||
break;
|
break;
|
||||||
case '.': case '!': case '?': /* Ending a sentence. */
|
case '.': case '!': case '?': /* Ending a sentence. */
|
||||||
putc (*s, fp); in_cmd = 0;
|
putc (*s, fp); in_cmd = 0;
|
||||||
break;
|
break;
|
||||||
case ' ': case '\t': case '\n': /* Non collapsing spaces. */
|
case ' ': case '\t': case '\n': /* Non collapsing spaces. */
|
||||||
putc (*s, fp); in_cmd = 0;
|
putc (*s, fp); in_cmd = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
cmdidx = 0;
|
cmdidx = 0;
|
||||||
@ -655,7 +669,7 @@ proc_texi_buffer (FILE *fp, const char *line, size_t len,
|
|||||||
s--; len++;
|
s--; len++;
|
||||||
in_cmd = 0;
|
in_cmd = 0;
|
||||||
}
|
}
|
||||||
else if (cmdidx < sizeof cmdbuf -1)
|
else if (cmdidx < sizeof cmdbuf -1)
|
||||||
cmdbuf[cmdidx++] = *s;
|
cmdbuf[cmdidx++] = *s;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -734,7 +748,7 @@ write_content (FILE *fp, line_buffer_t lines)
|
|||||||
/* fputs ("---\n", fp); */
|
/* fputs ("---\n", fp); */
|
||||||
parse_texi_line (fp, line->line, &table_level);
|
parse_texi_line (fp, line->line, &table_level);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -823,7 +837,7 @@ finish_page (void)
|
|||||||
write_content (fp, sect->lines);
|
write_content (fp, sect->lines);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -856,10 +870,11 @@ parse_file (const char *fname, FILE *fp, char **section_name, int in_pause)
|
|||||||
int in_gpgone = 0; /* Keep track of "@ifset gpgone" parts. */
|
int in_gpgone = 0; /* Keep track of "@ifset gpgone" parts. */
|
||||||
int not_in_gpgone = 0; /* Keep track of "@ifclear gpgone" parts. */
|
int not_in_gpgone = 0; /* Keep track of "@ifclear gpgone" parts. */
|
||||||
int not_in_man = 0; /* Keep track of "@ifclear isman" parts. */
|
int not_in_man = 0; /* Keep track of "@ifclear isman" parts. */
|
||||||
|
int item_indent = 0; /* How far is the current @item indented. */
|
||||||
|
|
||||||
/* Helper to define a macro. */
|
/* Helper to define a macro. */
|
||||||
char *macroname = NULL;
|
char *macroname = NULL;
|
||||||
char *macrovalue = NULL;
|
char *macrovalue = NULL;
|
||||||
size_t macrovaluesize = 0;
|
size_t macrovaluesize = 0;
|
||||||
size_t macrovalueused = 0;
|
size_t macrovalueused = 0;
|
||||||
|
|
||||||
@ -879,6 +894,24 @@ parse_file (const char *fname, FILE *fp, char **section_name, int in_pause)
|
|||||||
}
|
}
|
||||||
line[--n] = 0;
|
line[--n] = 0;
|
||||||
|
|
||||||
|
/* Kludge to allow indentation of tables. */
|
||||||
|
for (p=line; *p == ' ' || *p == '\t'; p++)
|
||||||
|
;
|
||||||
|
if (*p)
|
||||||
|
{
|
||||||
|
if (*p == '@' && !strncmp (p+1, "item", 4))
|
||||||
|
item_indent = p - line; /* Set a new indent level. */
|
||||||
|
else if (p - line < item_indent)
|
||||||
|
item_indent = 0; /* Switch off indention. */
|
||||||
|
|
||||||
|
if (item_indent)
|
||||||
|
{
|
||||||
|
memmove (line, line+item_indent, n - item_indent + 1);
|
||||||
|
n -= item_indent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (*line == '@')
|
if (*line == '@')
|
||||||
{
|
{
|
||||||
for (p=line+1, n=1; *p && *p != ' ' && *p != '\t'; p++)
|
for (p=line+1, n=1; *p && *p != ' ' && *p != '\t'; p++)
|
||||||
@ -903,7 +936,7 @@ parse_file (const char *fname, FILE *fp, char **section_name, int in_pause)
|
|||||||
macrovalue[--macrovalueused] = 0; /* Kill the last LF. */
|
macrovalue[--macrovalueused] = 0; /* Kill the last LF. */
|
||||||
macrovalue[macrovalueused] = 0; /* Terminate macro. */
|
macrovalue[macrovalueused] = 0; /* Terminate macro. */
|
||||||
macrovalue = xrealloc (macrovalue, macrovalueused+1);
|
macrovalue = xrealloc (macrovalue, macrovalueused+1);
|
||||||
|
|
||||||
for (m= macrolist; m; m = m->next)
|
for (m= macrolist; m; m = m->next)
|
||||||
if (!strcmp (m->name, macroname))
|
if (!strcmp (m->name, macroname))
|
||||||
break;
|
break;
|
||||||
@ -1182,7 +1215,7 @@ top_parse_file (const char *fname, FILE *fp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main (int argc, char **argv)
|
main (int argc, char **argv)
|
||||||
{
|
{
|
||||||
int last_argc = -1;
|
int last_argc = -1;
|
||||||
@ -1275,7 +1308,7 @@ main (int argc, char **argv)
|
|||||||
opt_select = strrchr (*argv, '/');
|
opt_select = strrchr (*argv, '/');
|
||||||
if (opt_select)
|
if (opt_select)
|
||||||
opt_select++;
|
opt_select++;
|
||||||
else
|
else
|
||||||
opt_select = *argv;
|
opt_select = *argv;
|
||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
}
|
}
|
||||||
@ -1299,8 +1332,8 @@ main (int argc, char **argv)
|
|||||||
argc--; argv++;
|
argc--; argv++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n");
|
die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n");
|
||||||
|
|
||||||
|
@ -1,3 +1,12 @@
|
|||||||
|
2011-09-23 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* gpgv.c (disable_dotlock): Rename to dotlock_disable.
|
||||||
|
(create_dotlock): Rename to dotlock_create.
|
||||||
|
(destroy_dotlock): Rename to dotlock_destroy.
|
||||||
|
(make_dotlock): Rename to dotlock_take.
|
||||||
|
(release_dotlock): Rename to dotlock_release.
|
||||||
|
(lockfiles_remove): Rename to dotlock_remove_lockfiles.
|
||||||
|
|
||||||
2011-09-20 Werner Koch <wk@g10code.com>
|
2011-09-20 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
* free-packet.c (free_public_key): Allow a NULL argument.
|
* free-packet.c (free_public_key): Allow a NULL argument.
|
||||||
|
@ -1969,7 +1969,7 @@ main (int argc, char **argv)
|
|||||||
|
|
||||||
gnupg_init_signals (0, emergency_cleanup);
|
gnupg_init_signals (0, emergency_cleanup);
|
||||||
|
|
||||||
create_dotlock(NULL); /* Register locking cleanup. */
|
dotlock_create (NULL, 0); /* Register lock file cleanup. */
|
||||||
|
|
||||||
opt.session_env = session_env_new ();
|
opt.session_env = session_env_new ();
|
||||||
if (!opt.session_env)
|
if (!opt.session_env)
|
||||||
@ -2651,7 +2651,7 @@ main (int argc, char **argv)
|
|||||||
case oNoEscapeFrom: opt.escape_from = 0; break;
|
case oNoEscapeFrom: opt.escape_from = 0; break;
|
||||||
case oLockOnce: opt.lock_once = 1; break;
|
case oLockOnce: opt.lock_once = 1; break;
|
||||||
case oLockNever:
|
case oLockNever:
|
||||||
disable_dotlock ();
|
dotlock_disable ();
|
||||||
break;
|
break;
|
||||||
case oLockMultiple:
|
case oLockMultiple:
|
||||||
#ifndef __riscos__
|
#ifndef __riscos__
|
||||||
|
15
g10/gpgv.c
15
g10/gpgv.c
@ -163,7 +163,7 @@ main( int argc, char **argv )
|
|||||||
|
|
||||||
tty_no_terminal(1);
|
tty_no_terminal(1);
|
||||||
tty_batchmode(1);
|
tty_batchmode(1);
|
||||||
disable_dotlock();
|
dotlock_disable ();
|
||||||
|
|
||||||
pargs.argc = &argc;
|
pargs.argc = &argc;
|
||||||
pargs.argv = &argv;
|
pargs.argv = &argv;
|
||||||
@ -502,25 +502,26 @@ agent_scd_getattr (const char *name, struct agent_card_info_s *info)
|
|||||||
|
|
||||||
/* We do not do any locking, so use these stubs here */
|
/* We do not do any locking, so use these stubs here */
|
||||||
void
|
void
|
||||||
disable_dotlock (void)
|
dotlock_disable (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
dotlock_t
|
dotlock_t
|
||||||
create_dotlock (const char *file_to_lock)
|
dotlock_create (const char *file_to_lock, unsigned int flags)
|
||||||
{
|
{
|
||||||
(void)file_to_lock;
|
(void)file_to_lock;
|
||||||
|
(void)flags;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
destroy_dotlock (dotlock_t h)
|
dotlock_destroy (dotlock_t h)
|
||||||
{
|
{
|
||||||
(void)h;
|
(void)h;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
make_dotlock (dotlock_t h, long timeout)
|
dotlock_take (dotlock_t h, long timeout)
|
||||||
{
|
{
|
||||||
(void)h;
|
(void)h;
|
||||||
(void)timeout;
|
(void)timeout;
|
||||||
@ -528,14 +529,14 @@ make_dotlock (dotlock_t h, long timeout)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
release_dotlock (dotlock_t h)
|
dotlock_release (dotlock_t h)
|
||||||
{
|
{
|
||||||
(void)h;
|
(void)h;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
remove_lockfiles (void)
|
dotlock_remove_lockfiles (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -136,7 +136,7 @@ maybe_create_keyring (char *filename, int force)
|
|||||||
/* To avoid races with other instances of gpg trying to create or
|
/* To avoid races with other instances of gpg trying to create or
|
||||||
update the keyring (it is removed during an update for a short
|
update the keyring (it is removed during an update for a short
|
||||||
time), we do the next stuff in a locked state. */
|
time), we do the next stuff in a locked state. */
|
||||||
lockhd = create_dotlock (filename);
|
lockhd = dotlock_create (filename, 0);
|
||||||
if (!lockhd)
|
if (!lockhd)
|
||||||
{
|
{
|
||||||
/* A reason for this to fail is that the directory is not
|
/* A reason for this to fail is that the directory is not
|
||||||
@ -152,7 +152,7 @@ maybe_create_keyring (char *filename, int force)
|
|||||||
return gpg_error (GPG_ERR_GENERAL);
|
return gpg_error (GPG_ERR_GENERAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( make_dotlock (lockhd, -1) )
|
if ( dotlock_take (lockhd, -1) )
|
||||||
{
|
{
|
||||||
/* This is something bad. Probably a stale lockfile. */
|
/* This is something bad. Probably a stale lockfile. */
|
||||||
log_info ("can't lock `%s'\n", filename );
|
log_info ("can't lock `%s'\n", filename );
|
||||||
@ -196,8 +196,8 @@ maybe_create_keyring (char *filename, int force)
|
|||||||
leave:
|
leave:
|
||||||
if (lockhd)
|
if (lockhd)
|
||||||
{
|
{
|
||||||
release_dotlock (lockhd);
|
dotlock_release (lockhd);
|
||||||
destroy_dotlock (lockhd);
|
dotlock_destroy (lockhd);
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
@ -306,7 +306,7 @@ keyring_lock (KEYRING_HANDLE hd, int yes)
|
|||||||
if (!keyring_is_writable(kr))
|
if (!keyring_is_writable(kr))
|
||||||
continue;
|
continue;
|
||||||
if (!kr->lockhd) {
|
if (!kr->lockhd) {
|
||||||
kr->lockhd = create_dotlock( kr->fname );
|
kr->lockhd = dotlock_create (kr->fname, 0);
|
||||||
if (!kr->lockhd) {
|
if (!kr->lockhd) {
|
||||||
log_info ("can't allocate lock for `%s'\n", kr->fname );
|
log_info ("can't allocate lock for `%s'\n", kr->fname );
|
||||||
rc = G10ERR_GENERAL;
|
rc = G10ERR_GENERAL;
|
||||||
@ -322,7 +322,7 @@ keyring_lock (KEYRING_HANDLE hd, int yes)
|
|||||||
continue;
|
continue;
|
||||||
if (kr->is_locked)
|
if (kr->is_locked)
|
||||||
;
|
;
|
||||||
else if (make_dotlock (kr->lockhd, -1) ) {
|
else if (dotlock_take (kr->lockhd, -1) ) {
|
||||||
log_info ("can't lock `%s'\n", kr->fname );
|
log_info ("can't lock `%s'\n", kr->fname );
|
||||||
rc = G10ERR_GENERAL;
|
rc = G10ERR_GENERAL;
|
||||||
}
|
}
|
||||||
@ -337,7 +337,7 @@ keyring_lock (KEYRING_HANDLE hd, int yes)
|
|||||||
continue;
|
continue;
|
||||||
if (!kr->is_locked)
|
if (!kr->is_locked)
|
||||||
;
|
;
|
||||||
else if (release_dotlock (kr->lockhd))
|
else if (dotlock_release (kr->lockhd))
|
||||||
log_info ("can't unlock `%s'\n", kr->fname );
|
log_info ("can't unlock `%s'\n", kr->fname );
|
||||||
else
|
else
|
||||||
kr->is_locked = 0;
|
kr->is_locked = 0;
|
||||||
|
24
g10/tdbio.c
24
g10/tdbio.c
@ -257,7 +257,7 @@ put_record_into_cache( ulong recno, const char *data )
|
|||||||
if( !n )
|
if( !n )
|
||||||
n = 1;
|
n = 1;
|
||||||
if( !is_locked ) {
|
if( !is_locked ) {
|
||||||
if( make_dotlock( lockhandle, -1 ) )
|
if( dotlock_take( lockhandle, -1 ) )
|
||||||
log_fatal("can't acquire lock - giving up\n");
|
log_fatal("can't acquire lock - giving up\n");
|
||||||
else
|
else
|
||||||
is_locked = 1;
|
is_locked = 1;
|
||||||
@ -276,7 +276,7 @@ put_record_into_cache( ulong recno, const char *data )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if( !opt.lock_once ) {
|
if( !opt.lock_once ) {
|
||||||
if( !release_dotlock( lockhandle ) )
|
if( !dotlock_release( lockhandle ) )
|
||||||
is_locked = 0;
|
is_locked = 0;
|
||||||
}
|
}
|
||||||
assert( unused );
|
assert( unused );
|
||||||
@ -318,7 +318,7 @@ tdbio_sync()
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if( !is_locked ) {
|
if( !is_locked ) {
|
||||||
if( make_dotlock( lockhandle, -1 ) )
|
if( dotlock_take( lockhandle, -1 ) )
|
||||||
log_fatal("can't acquire lock - giving up\n");
|
log_fatal("can't acquire lock - giving up\n");
|
||||||
else
|
else
|
||||||
is_locked = 1;
|
is_locked = 1;
|
||||||
@ -333,7 +333,7 @@ tdbio_sync()
|
|||||||
}
|
}
|
||||||
cache_is_dirty = 0;
|
cache_is_dirty = 0;
|
||||||
if( did_lock && !opt.lock_once ) {
|
if( did_lock && !opt.lock_once ) {
|
||||||
if( !release_dotlock( lockhandle ) )
|
if( !dotlock_release (lockhandle) )
|
||||||
is_locked = 0;
|
is_locked = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -373,7 +373,7 @@ tdbio_end_transaction()
|
|||||||
if( !in_transaction )
|
if( !in_transaction )
|
||||||
log_bug("tdbio: no active transaction\n");
|
log_bug("tdbio: no active transaction\n");
|
||||||
if( !is_locked ) {
|
if( !is_locked ) {
|
||||||
if( make_dotlock( lockhandle, -1 ) )
|
if( dotlock_take( lockhandle, -1 ) )
|
||||||
log_fatal("can't acquire lock - giving up\n");
|
log_fatal("can't acquire lock - giving up\n");
|
||||||
else
|
else
|
||||||
is_locked = 1;
|
is_locked = 1;
|
||||||
@ -383,7 +383,7 @@ tdbio_end_transaction()
|
|||||||
rc = tdbio_sync();
|
rc = tdbio_sync();
|
||||||
unblock_all_signals();
|
unblock_all_signals();
|
||||||
if( !opt.lock_once ) {
|
if( !opt.lock_once ) {
|
||||||
if( !release_dotlock( lockhandle ) )
|
if( !dotlock_release (lockhandle) )
|
||||||
is_locked = 0;
|
is_locked = 0;
|
||||||
}
|
}
|
||||||
return rc;
|
return rc;
|
||||||
@ -423,7 +423,7 @@ static void
|
|||||||
cleanup(void)
|
cleanup(void)
|
||||||
{
|
{
|
||||||
if( is_locked ) {
|
if( is_locked ) {
|
||||||
if( !release_dotlock(lockhandle) )
|
if( !dotlock_release (lockhandle) )
|
||||||
is_locked = 0;
|
is_locked = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -544,10 +544,10 @@ tdbio_set_dbname( const char *new_dbname, int create )
|
|||||||
db_name = fname;
|
db_name = fname;
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
if( !lockhandle )
|
if( !lockhandle )
|
||||||
lockhandle = create_dotlock( db_name );
|
lockhandle = dotlock_create (db_name, 0);
|
||||||
if( !lockhandle )
|
if( !lockhandle )
|
||||||
log_fatal( _("can't create lock for `%s'\n"), db_name );
|
log_fatal( _("can't create lock for `%s'\n"), db_name );
|
||||||
if( make_dotlock( lockhandle, -1 ) )
|
if( dotlock_make (lockhandle, -1) )
|
||||||
log_fatal( _("can't lock `%s'\n"), db_name );
|
log_fatal( _("can't lock `%s'\n"), db_name );
|
||||||
#endif /* __riscos__ */
|
#endif /* __riscos__ */
|
||||||
oldmask=umask(077);
|
oldmask=umask(077);
|
||||||
@ -567,7 +567,7 @@ tdbio_set_dbname( const char *new_dbname, int create )
|
|||||||
|
|
||||||
#ifndef __riscos__
|
#ifndef __riscos__
|
||||||
if( !lockhandle )
|
if( !lockhandle )
|
||||||
lockhandle = create_dotlock( db_name );
|
lockhandle = dotlock_create (db_name, 0);
|
||||||
if( !lockhandle )
|
if( !lockhandle )
|
||||||
log_fatal( _("can't create lock for `%s'\n"), db_name );
|
log_fatal( _("can't create lock for `%s'\n"), db_name );
|
||||||
#endif /* !__riscos__ */
|
#endif /* !__riscos__ */
|
||||||
@ -608,11 +608,11 @@ open_db()
|
|||||||
assert( db_fd == -1 );
|
assert( db_fd == -1 );
|
||||||
|
|
||||||
if (!lockhandle )
|
if (!lockhandle )
|
||||||
lockhandle = create_dotlock( db_name );
|
lockhandle = dotlock_create (db_name, 0);
|
||||||
if (!lockhandle )
|
if (!lockhandle )
|
||||||
log_fatal( _("can't create lock for `%s'\n"), db_name );
|
log_fatal( _("can't create lock for `%s'\n"), db_name );
|
||||||
#ifdef __riscos__
|
#ifdef __riscos__
|
||||||
if (make_dotlock( lockhandle, -1 ) )
|
if (dotlock_take (lockhandle, -1) )
|
||||||
log_fatal( _("can't lock `%s'\n"), db_name );
|
log_fatal( _("can't lock `%s'\n"), db_name );
|
||||||
#endif /* __riscos__ */
|
#endif /* __riscos__ */
|
||||||
#ifdef HAVE_W32CE_SYSTEM
|
#ifdef HAVE_W32CE_SYSTEM
|
||||||
|
@ -246,10 +246,10 @@ g13_create_container (ctrl_t ctrl, const char *filename, strlist_t keys)
|
|||||||
/* Take a lock and proceed with the creation. If there is a lock we
|
/* Take a lock and proceed with the creation. If there is a lock we
|
||||||
immediately return an error because for creation it does not make
|
immediately return an error because for creation it does not make
|
||||||
sense to wait. */
|
sense to wait. */
|
||||||
lock = create_dotlock (filename);
|
lock = dotlock_create (filename, 0);
|
||||||
if (!lock)
|
if (!lock)
|
||||||
return gpg_error_from_syserror ();
|
return gpg_error_from_syserror ();
|
||||||
if (make_dotlock (lock, 0))
|
if (dotlock_take (lock, 0))
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
goto leave;
|
goto leave;
|
||||||
@ -319,7 +319,7 @@ g13_create_container (ctrl_t ctrl, const char *filename, strlist_t keys)
|
|||||||
xfree (detachedname);
|
xfree (detachedname);
|
||||||
xfree (enckeyblob);
|
xfree (enckeyblob);
|
||||||
xfree (keyblob);
|
xfree (keyblob);
|
||||||
destroy_dotlock (lock);
|
dotlock_destroy (lock);
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,7 @@ main ( int argc, char **argv)
|
|||||||
|
|
||||||
gnupg_init_signals (0, emergency_cleanup);
|
gnupg_init_signals (0, emergency_cleanup);
|
||||||
|
|
||||||
create_dotlock (NULL); /* Register locking cleanup. */
|
dotlock_create (NULL, 0); /* Register locking cleanup. */
|
||||||
|
|
||||||
opt.session_env = session_env_new ();
|
opt.session_env = session_env_new ();
|
||||||
if (!opt.session_env)
|
if (!opt.session_env)
|
||||||
|
@ -273,14 +273,14 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Try to take a lock. */
|
/* Try to take a lock. */
|
||||||
lock = create_dotlock (filename);
|
lock = dotlock_create (filename, 0);
|
||||||
if (!lock)
|
if (!lock)
|
||||||
{
|
{
|
||||||
xfree (mountpoint_buffer);
|
xfree (mountpoint_buffer);
|
||||||
return gpg_error_from_syserror ();
|
return gpg_error_from_syserror ();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (make_dotlock (lock, 0))
|
if (dotlock_take (lock, 0))
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
goto leave;
|
goto leave;
|
||||||
@ -359,7 +359,7 @@ g13_mount_container (ctrl_t ctrl, const char *filename, const char *mountpoint)
|
|||||||
destroy_tupledesc (tuples);
|
destroy_tupledesc (tuples);
|
||||||
xfree (keyblob);
|
xfree (keyblob);
|
||||||
xfree (enckeyblob);
|
xfree (enckeyblob);
|
||||||
destroy_dotlock (lock);
|
dotlock_destroy (lock);
|
||||||
xfree (mountpoint_buffer);
|
xfree (mountpoint_buffer);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
56
po/de.po
56
po/de.po
@ -128,16 +128,28 @@ msgid "error writing key: %s\n"
|
|||||||
msgstr "Fehler beim Schreiben des Schlüssels: %s\n"
|
msgstr "Fehler beim Schreiben des Schlüssels: %s\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Please enter the passphrase for the ssh key%0A %c"
|
msgid ""
|
||||||
|
"An ssh process requested the use of key%%0A %s%%0A (%s)%%0ADo you want to "
|
||||||
|
"allow this?"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Allow"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Deny"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy, c-format
|
||||||
|
msgid "Please enter the passphrase for the ssh key%%0A %F%%0A (%c)"
|
||||||
msgstr "Bitte geben Sie die Passphrase für den SSH-Schlüssel %0A %c ein."
|
msgstr "Bitte geben Sie die Passphrase für den SSH-Schlüssel %0A %c ein."
|
||||||
|
|
||||||
msgid "Please re-enter this passphrase"
|
msgid "Please re-enter this passphrase"
|
||||||
msgstr "Bitte geben Sie die Passphrase noch einmal ein:"
|
msgstr "Bitte geben Sie die Passphrase noch einmal ein:"
|
||||||
|
|
||||||
#, c-format
|
#, fuzzy, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Please enter a passphrase to protect the received secret key%%0A %s%%"
|
"Please enter a passphrase to protect the received secret key%%0A %s%%0A %"
|
||||||
"0Awithin gpg-agent's key storage"
|
"s%%0Awithin gpg-agent's key storage"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Bitte geben Sie eine Passphrase ein, um den empfangenen geheimen Schlüssel%%"
|
"Bitte geben Sie eine Passphrase ein, um den empfangenen geheimen Schlüssel%%"
|
||||||
"0A %s%%0A im Schlüsselspeicher des gpg-agenten zu schützen."
|
"0A %s%%0A im Schlüsselspeicher des gpg-agenten zu schützen."
|
||||||
@ -1034,9 +1046,6 @@ msgstr "Fehler beim Schreiben von %s: %s\n"
|
|||||||
msgid "removing stale lockfile (created by %d)\n"
|
msgid "removing stale lockfile (created by %d)\n"
|
||||||
msgstr "eine übriggebliebene Sperrdatei wird entfernt (erzeugt von %d)\n"
|
msgstr "eine übriggebliebene Sperrdatei wird entfernt (erzeugt von %d)\n"
|
||||||
|
|
||||||
msgid " - probably dead - removing lock"
|
|
||||||
msgstr " - existiert wahrscheinlich nicht mehr - entferne Sperre"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "waiting for lock (held by %d%s) %s...\n"
|
msgid "waiting for lock (held by %d%s) %s...\n"
|
||||||
msgstr "warte auf die Freigabe der Sperre (gehalten von %d%s) %s...\n"
|
msgstr "warte auf die Freigabe der Sperre (gehalten von %d%s) %s...\n"
|
||||||
@ -1428,6 +1437,10 @@ msgstr "Diesen Schlüssel aus dem Schlüsselbund löschen? (j/N) "
|
|||||||
msgid "This is a secret key! - really delete? (y/N) "
|
msgid "This is a secret key! - really delete? (y/N) "
|
||||||
msgstr "Dies ist ein privater Schlüssel! - Wirklich löschen? (j/N) "
|
msgstr "Dies ist ein privater Schlüssel! - Wirklich löschen? (j/N) "
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "deleting secret key not implemented\n"
|
||||||
|
msgstr "Exportieren geheimer Schlüssel ist nicht erlaubt\n"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "deleting keyblock failed: %s\n"
|
msgid "deleting keyblock failed: %s\n"
|
||||||
msgstr "löschen des Schlüsselblocks fehlgeschlagen: %s\n"
|
msgstr "löschen des Schlüsselblocks fehlgeschlagen: %s\n"
|
||||||
@ -2521,10 +2534,6 @@ msgstr ""
|
|||||||
msgid "importing secret keys not allowed\n"
|
msgid "importing secret keys not allowed\n"
|
||||||
msgstr "Importieren geheimer Schlüssel ist nicht erlaubt\n"
|
msgstr "Importieren geheimer Schlüssel ist nicht erlaubt\n"
|
||||||
|
|
||||||
#, c-format
|
|
||||||
msgid "key %s: secret key part already available\n"
|
|
||||||
msgstr "Schlüssel %s: Die geheimen Teile sind bereits vorhanden\n"
|
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "key %s: no public key - can't apply revocation certificate\n"
|
msgid "key %s: no public key - can't apply revocation certificate\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -7666,6 +7675,25 @@ msgstr "Liste der LDAP Server"
|
|||||||
msgid "Configuration for OCSP"
|
msgid "Configuration for OCSP"
|
||||||
msgstr "Konfiguration zu OCSP"
|
msgstr "Konfiguration zu OCSP"
|
||||||
|
|
||||||
|
msgid "GPG for OpenPGP"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "GPG Agent"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Smartcard Daemon"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "GPG for S/MIME"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Directory Manager"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#, fuzzy
|
||||||
|
msgid "PIN and Passphrase Entry"
|
||||||
|
msgstr "Falsche Passphrase!"
|
||||||
|
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "External verification of component %s failed"
|
msgid "External verification of component %s failed"
|
||||||
msgstr "Die externe Überprüfung der Komponente %s war nicht erfolgreich"
|
msgstr "Die externe Überprüfung der Komponente %s war nicht erfolgreich"
|
||||||
@ -7878,6 +7906,12 @@ msgstr ""
|
|||||||
"Syntax: gpg-check-pattern [optionen] Musterdatei\n"
|
"Syntax: gpg-check-pattern [optionen] Musterdatei\n"
|
||||||
"Die von stdin gelesene Passphrase gegen die Musterdatei prüfen\n"
|
"Die von stdin gelesene Passphrase gegen die Musterdatei prüfen\n"
|
||||||
|
|
||||||
|
#~ msgid " - probably dead - removing lock"
|
||||||
|
#~ msgstr " - existiert wahrscheinlich nicht mehr - entferne Sperre"
|
||||||
|
|
||||||
|
#~ msgid "key %s: secret key part already available\n"
|
||||||
|
#~ msgstr "Schlüssel %s: Die geheimen Teile sind bereits vorhanden\n"
|
||||||
|
|
||||||
#~ msgid "self-signed certificate"
|
#~ msgid "self-signed certificate"
|
||||||
#~ msgstr "eigenbeglaubigtes Zertifikat"
|
#~ msgstr "eigenbeglaubigtes Zertifikat"
|
||||||
|
|
||||||
|
@ -928,7 +928,7 @@ main ( int argc, char **argv)
|
|||||||
|
|
||||||
gnupg_init_signals (0, emergency_cleanup);
|
gnupg_init_signals (0, emergency_cleanup);
|
||||||
|
|
||||||
create_dotlock (NULL); /* register locking cleanup */
|
dotlock_create (NULL, 0); /* Register lockfile cleanup. */
|
||||||
|
|
||||||
opt.session_env = session_env_new ();
|
opt.session_env = session_env_new ();
|
||||||
if (!opt.session_env)
|
if (!opt.session_env)
|
||||||
|
12
sm/keydb.c
12
sm/keydb.c
@ -214,12 +214,12 @@ keydb_add_resource (const char *url, int force, int secret, int *auto_created)
|
|||||||
all_resources[used_resources].secret = secret;
|
all_resources[used_resources].secret = secret;
|
||||||
|
|
||||||
all_resources[used_resources].lockhandle
|
all_resources[used_resources].lockhandle
|
||||||
= create_dotlock (filename);
|
= dotlock_create (filename, 0);
|
||||||
if (!all_resources[used_resources].lockhandle)
|
if (!all_resources[used_resources].lockhandle)
|
||||||
log_fatal ( _("can't create lock for `%s'\n"), filename);
|
log_fatal ( _("can't create lock for `%s'\n"), filename);
|
||||||
|
|
||||||
/* Do a compress run if needed and the file is not locked. */
|
/* Do a compress run if needed and the file is not locked. */
|
||||||
if (!make_dotlock (all_resources[used_resources].lockhandle, 0))
|
if (!dotlock_take (all_resources[used_resources].lockhandle, 0))
|
||||||
{
|
{
|
||||||
KEYBOX_HANDLE kbxhd = keybox_new (token, secret);
|
KEYBOX_HANDLE kbxhd = keybox_new (token, secret);
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ keydb_add_resource (const char *url, int force, int secret, int *auto_created)
|
|||||||
keybox_compress (kbxhd);
|
keybox_compress (kbxhd);
|
||||||
keybox_release (kbxhd);
|
keybox_release (kbxhd);
|
||||||
}
|
}
|
||||||
release_dotlock (all_resources[used_resources].lockhandle);
|
dotlock_release (all_resources[used_resources].lockhandle);
|
||||||
}
|
}
|
||||||
|
|
||||||
used_resources++;
|
used_resources++;
|
||||||
@ -421,7 +421,7 @@ lock_all (KEYDB_HANDLE hd)
|
|||||||
break;
|
break;
|
||||||
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
||||||
if (hd->active[i].lockhandle)
|
if (hd->active[i].lockhandle)
|
||||||
rc = make_dotlock (hd->active[i].lockhandle, -1);
|
rc = dotlock_take (hd->active[i].lockhandle, -1);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (rc)
|
if (rc)
|
||||||
@ -439,7 +439,7 @@ lock_all (KEYDB_HANDLE hd)
|
|||||||
break;
|
break;
|
||||||
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
||||||
if (hd->active[i].lockhandle)
|
if (hd->active[i].lockhandle)
|
||||||
release_dotlock (hd->active[i].lockhandle);
|
dotlock_release (hd->active[i].lockhandle);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -469,7 +469,7 @@ unlock_all (KEYDB_HANDLE hd)
|
|||||||
break;
|
break;
|
||||||
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
case KEYDB_RESOURCE_TYPE_KEYBOX:
|
||||||
if (hd->active[i].lockhandle)
|
if (hd->active[i].lockhandle)
|
||||||
release_dotlock (hd->active[i].lockhandle);
|
dotlock_release (hd->active[i].lockhandle);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user