aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2000-12-28 15:49:42 +0000
committerWerner Koch <[email protected]>2000-12-28 15:49:42 +0000
commit94c45b7ff336b41fe67df2c7b8240f70ffe6352e (patch)
treea2929e35a5f05f300f12c48f97c3fcd96164c740
parentcipher deprecated warning explained (diff)
downloadgnupg-94c45b7ff336b41fe67df2c7b8240f70ffe6352e.tar.gz
gnupg-94c45b7ff336b41fe67df2c7b8240f70ffe6352e.zip
Remove lockfiles and other changes
-rw-r--r--THANKS1
-rw-r--r--VERSION2
-rw-r--r--cipher/dynload.c19
-rw-r--r--g10/ChangeLog6
-rw-r--r--g10/signal.c3
-rw-r--r--include/util.h2
-rw-r--r--util/ChangeLog5
-rw-r--r--util/dotlock.c5
8 files changed, 38 insertions, 5 deletions
diff --git a/THANKS b/THANKS
index 71aa72e75..510168239 100644
--- a/THANKS
+++ b/THANKS
@@ -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]
diff --git a/VERSION b/VERSION
index a71955659..a0bbf9ac4 100644
--- a/VERSION
+++ b/VERSION
@@ -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