diff options
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | VERSION | 2 | ||||
-rw-r--r-- | cipher/dynload.c | 19 | ||||
-rw-r--r-- | g10/ChangeLog | 6 | ||||
-rw-r--r-- | g10/signal.c | 3 | ||||
-rw-r--r-- | include/util.h | 2 | ||||
-rw-r--r-- | util/ChangeLog | 5 | ||||
-rw-r--r-- | util/dotlock.c | 5 |
8 files changed, 38 insertions, 5 deletions
@@ -114,6 +114,7 @@ Oskari J��skel�inen [email protected] Paul D. Smith [email protected] Per Cederqvist [email protected] Philippe Laliberte [email protected] +Peter Fales [email protected] Peter Gutmann [email protected] Peter Marschall [email protected] QingLong [email protected] @@ -1 +1 @@ -1.0.4c +1.0.4d diff --git a/cipher/dynload.c b/cipher/dynload.c index e2c988e02..adf576780 100644 --- a/cipher/dynload.c +++ b/cipher/dynload.c @@ -67,6 +67,25 @@ dlsym(void *handle, char *name) } #endif /*HAVE_DL_SHL_LOAD*/ +#ifdef __MINGW32__ +#warning Needs some more work. Based on [email protected] patch. + +#define dlopen(PATHNAME,MODE) ((void *)LoadLibrary(PATHNAME)) +#define dlclose(HANDLE) FreeLibrary(HANDLE) +char *dlerror(void) +{ + static char dlerrstr[10]; + int err=GetLastError(); + if (!err) + return NULL; + sprintf(dlerrstr, "%u", err); + return dlerrstr; +} +#define dlsym(HANDLE,NAME) GetProcAddress(HANDLE,NAME) +#endif /*__MINGW32__*/ + + + typedef struct ext_list { diff --git a/g10/ChangeLog b/g10/ChangeLog index c3561d9f5..252467dda 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,9 @@ +2000-12-28 Werner Koch <[email protected]> + + * signal.c (got_fatal_signal): Remove lockfiles here because the + atexit stuff does not work due to the use of raise. Suggested by + Peter Fales. + 2000-12-19 Werner Koch <[email protected]> * status.c, status.h (cpr_get_no_help): New. diff --git a/g10/signal.c b/g10/signal.c index cf8dbd5eb..7b34bd8d1 100644 --- a/g10/signal.c +++ b/g10/signal.c @@ -75,6 +75,9 @@ got_fatal_signal( int sig ) sigaction( sig, &nact, NULL); } #endif + + remove_lockfiles (); + raise( sig ); } diff --git a/include/util.h b/include/util.h index 4c475927c..9d2d1a75c 100644 --- a/include/util.h +++ b/include/util.h @@ -136,7 +136,7 @@ void disable_dotlock(void); DOTLOCK create_dotlock( const char *file_to_lock ); int make_dotlock( DOTLOCK h, long timeout ); int release_dotlock( DOTLOCK h ); - +void remove_lockfiles (void); /*-- fileutil.c --*/ char * make_basename(const char *filepath); diff --git a/util/ChangeLog b/util/ChangeLog index 2f5609d84..fd1279ef9 100644 --- a/util/ChangeLog +++ b/util/ChangeLog @@ -1,3 +1,8 @@ +2000-12-28 Werner Koch <[email protected]> + + * dotlock.c: Made all_lockfiles volatile. + (remove_lockfiles): Made public. + 2000-11-30 Werner Koch <[email protected]> * iobuf.c (iobuf_translate_file_handle): New. diff --git a/util/dotlock.c b/util/dotlock.c index fc8ddae36..a56789608 100644 --- a/util/dotlock.c +++ b/util/dotlock.c @@ -46,11 +46,10 @@ struct dotlock_handle { }; -static DOTLOCK all_lockfiles; +static volatile DOTLOCK all_lockfiles; static int never_lock; static int read_lockfile( const char *name ); -static void remove_lockfiles(void); void disable_dotlock(void) @@ -349,7 +348,7 @@ read_lockfile( const char *name ) } -static void +void remove_lockfiles() { #ifndef HAVE_DOSISH_SYSTEM |