summaryrefslogtreecommitdiff
blob: d47cac4ca3a0bc6392f42a480230ba0a3f31448e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
diff -urNp beecrypt-4.1.2.org/c++/mutex.h beecrypt-4.1.2/c++/mutex.h
--- beecrypt-4.1.2.org/c++/mutex.h	2004-09-07 13:47:51.000000000 +0300
+++ beecrypt-4.1.2/c++/mutex.h	2006-10-23 11:19:04.000000000 +0200
@@ -37,7 +37,9 @@ namespace beecrypt {
 	class BEECRYPTCXXAPI mutex
 	{
 	private:
+#ifdef ENABLE_THREADS
 		bc_mutex_t _lock;
+#endif
 
 	public:
 		inline void init() throw (char*)
@@ -55,7 +57,9 @@ namespace beecrypt {
 			if ((rc = pthread_mutex_init(&_lock, 0)))
 				throw strerror(rc);
 			# else
+			#  ifdef ENABLE_THREADS
 			#  error
+			#  endif
 			# endif
 			#endif
 		}
@@ -75,7 +79,9 @@ namespace beecrypt {
 			if ((rc = pthread_mutex_lock(&_lock)))
 				throw strerror(rc);
 			# else
+			#  ifdef ENABLE_THREADS
 			#  error
+			#  endif
 			# endif
 			#endif
 		}
@@ -107,7 +113,9 @@ namespace beecrypt {
 				return false;
 			throw strerror(rc);
 			# else
+			#  ifdef ENABLE_THREADS
 			#  error
+			#  endif
 			# endif
 			#endif
 		}
@@ -126,7 +134,9 @@ namespace beecrypt {
 			if ((rc = pthread_mutex_unlock(&_lock)))
 				throw strerror(rc);
 			# else
+			#  ifdef ENABLE_THREADS
 			#  error
+			#  endif
 			# endif
 			#endif
 		}
@@ -145,7 +155,9 @@ namespace beecrypt {
 			if ((rc = pthread_mutex_destroy(&_lock)))
 				throw strerror(rc);
 			# else
+			#  ifdef ENABLE_THREADS
 			#  error
+			#  endif
 			# endif
 			#endif
 		}
diff -urNp beecrypt-4.1.2.org/c++/security/Security.cxx beecrypt-4.1.2/c++/security/Security.cxx
--- beecrypt-4.1.2.org/c++/security/Security.cxx	2004-11-02 09:06:58.000000000 +0200
+++ beecrypt-4.1.2/c++/security/Security.cxx	2006-10-23 11:19:23.000000000 +0200
@@ -115,10 +115,8 @@ void Security::initialize()
 					{
 						#if WIN32
 						const Provider& (*inst)(void*) = (const Provider& (*)(void*)) GetProcAddress((HMODULE) handle, "provider_const_ref");
-						#elif HAVE_PTHREAD_H
-						const Provider& (*inst)(void*) = (const Provider& (*)(void*)) dlsym(handle, "provider_const_ref");
 						#else
-						# error
+						const Provider& (*inst)(void*) = (const Provider& (*)(void*)) dlsym(handle, "provider_const_ref");
 						#endif
 
 						if (inst)