1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

Replace file locking by the new portable dotlock code.

* include/dotlock.h: New.  From current gnupg master.
* util/dotlock.c: Ditto.  Include util.h.  The major changes done in
master are: 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 and add a dummy arg.
(destroy_dotlock): Rename to dotlock_destroy.
(make_dotlock): Rename to dotlock_take.
(release_dotlock): Rename to dotlock_release.
(remove_lockfiles): Rename to dotlock_remove_lockfiles.
This commit is contained in:
Werner Koch 2012-01-10 15:16:44 +01:00
parent dccdcef319
commit b9333cd890
10 changed files with 1432 additions and 643 deletions

View file

@ -148,7 +148,7 @@ main( int argc, char **argv )
tty_no_terminal(1);
tty_batchmode(1);
disable_dotlock();
dotlock_disable ();
set_native_charset (NULL); /* Try to auto set the character set */
@ -430,9 +430,10 @@ void rl_free_line_state (void) {}
#endif
/* We do not do any locking, so use these stubs here */
void disable_dotlock(void) {}
DOTLOCK create_dotlock( const char *file_to_lock ) { return NULL; }
void destroy_dotlock (DOTLOCK h) {}
int make_dotlock( DOTLOCK h, long timeout ) { return 0;}
int release_dotlock( DOTLOCK h ) {return 0;}
void remove_lockfiles(void) {}
void dotlock_disable(void) {}
dotlock_t dotlock_create (const char *file_to_lock, unsigned int flags)
{ return NULL; }
void dotlock_destroy (dotlock_t h) {}
int dotlock_take (dotlock_t h, long timeout) { return 0;}
int dotlock_release (dotlock_t h) {return 0;}
void dotlock_remove_lockfiles (void) {}