aboutsummaryrefslogtreecommitdiffstats
path: root/src/mutex
diff options
context:
space:
mode:
authorlloyd <[email protected]>2009-12-16 02:22:58 +0000
committerlloyd <[email protected]>2009-12-16 02:22:58 +0000
commit12afeca214c4414a0ced0bc4654d0fc5908dc77b (patch)
treed0706f470d406d68b4ec1f559d2e0f6426174c28 /src/mutex
parent87cbaef441c6baba2699a8ea53ac2562c46c772d (diff)
Make many more headers internal-only.
Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.
Diffstat (limited to 'src/mutex')
-rw-r--r--src/mutex/info.txt4
-rw-r--r--src/mutex/mutex.h6
-rw-r--r--src/mutex/noop_mutex/info.txt8
-rw-r--r--src/mutex/noop_mutex/mux_noop.cpp2
-rw-r--r--src/mutex/noop_mutex/mux_noop.h4
-rw-r--r--src/mutex/pthreads/info.txt8
-rw-r--r--src/mutex/pthreads/mux_pthr.cpp2
-rw-r--r--src/mutex/pthreads/mux_pthr.h4
-rw-r--r--src/mutex/qt_mutex/info.txt8
-rw-r--r--src/mutex/qt_mutex/mux_qt.cpp2
-rw-r--r--src/mutex/qt_mutex/mux_qt.h4
-rw-r--r--src/mutex/win32_crit_section/info.txt8
-rw-r--r--src/mutex/win32_crit_section/mux_win32.cpp2
-rw-r--r--src/mutex/win32_crit_section/mux_win32.h4
14 files changed, 50 insertions, 16 deletions
diff --git a/src/mutex/info.txt b/src/mutex/info.txt
index b92b329aa..af4cf9bb3 100644
--- a/src/mutex/info.txt
+++ b/src/mutex/info.txt
@@ -1 +1,5 @@
define MUTEX_WRAPPERS
+
+<header:internal>
+mutex.h
+</header:internal>
diff --git a/src/mutex/mutex.h b/src/mutex/mutex.h
index a04ff83c9..fcb0e9982 100644
--- a/src/mutex/mutex.h
+++ b/src/mutex/mutex.h
@@ -15,7 +15,7 @@ namespace Botan {
/*
* Mutex Base Class
*/
-class BOTAN_DLL Mutex
+class Mutex
{
public:
virtual void lock() = 0;
@@ -26,7 +26,7 @@ class BOTAN_DLL Mutex
/*
* Mutex Factory
*/
-class BOTAN_DLL Mutex_Factory
+class Mutex_Factory
{
public:
virtual Mutex* make() = 0;
@@ -36,7 +36,7 @@ class BOTAN_DLL Mutex_Factory
/*
* Mutex Holding Class
*/
-class BOTAN_DLL Mutex_Holder
+class Mutex_Holder
{
public:
Mutex_Holder(Mutex* m) : mux(m)
diff --git a/src/mutex/noop_mutex/info.txt b/src/mutex/noop_mutex/info.txt
index de98deda0..16670b1dd 100644
--- a/src/mutex/noop_mutex/info.txt
+++ b/src/mutex/noop_mutex/info.txt
@@ -1 +1,9 @@
define MUTEX_NOOP
+
+<source>
+mux_noop.cpp
+</source>
+
+<header:internal>
+mux_noop.h
+</header:internal>
diff --git a/src/mutex/noop_mutex/mux_noop.cpp b/src/mutex/noop_mutex/mux_noop.cpp
index 5c45084fe..18151274a 100644
--- a/src/mutex/noop_mutex/mux_noop.cpp
+++ b/src/mutex/noop_mutex/mux_noop.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mux_noop.h>
+#include <botan/internal/mux_noop.h>
namespace Botan {
diff --git a/src/mutex/noop_mutex/mux_noop.h b/src/mutex/noop_mutex/mux_noop.h
index 94201cb7c..a1bd57858 100644
--- a/src/mutex/noop_mutex/mux_noop.h
+++ b/src/mutex/noop_mutex/mux_noop.h
@@ -8,14 +8,14 @@
#ifndef BOTAN_NOOP_MUTEX_FACTORY_H__
#define BOTAN_NOOP_MUTEX_FACTORY_H__
-#include <botan/mutex.h>
+#include <botan/internal/mutex.h>
namespace Botan {
/*
* No-Op Mutex Factory
*/
-class BOTAN_DLL Noop_Mutex_Factory : public Mutex_Factory
+class Noop_Mutex_Factory : public Mutex_Factory
{
public:
Mutex* make();
diff --git a/src/mutex/pthreads/info.txt b/src/mutex/pthreads/info.txt
index e363cdbeb..1d826b61c 100644
--- a/src/mutex/pthreads/info.txt
+++ b/src/mutex/pthreads/info.txt
@@ -1,5 +1,13 @@
define MUTEX_PTHREAD
+<source>
+mux_pthr.cpp
+</source>
+
+<header:internal>
+mux_pthr.h
+</header:internal>
+
<libs>
all!qnx,freebsd,dragonfly,openbsd,netbsd -> pthread
</libs>
diff --git a/src/mutex/pthreads/mux_pthr.cpp b/src/mutex/pthreads/mux_pthr.cpp
index 9f1d9816e..75a116fe8 100644
--- a/src/mutex/pthreads/mux_pthr.cpp
+++ b/src/mutex/pthreads/mux_pthr.cpp
@@ -5,7 +5,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mux_pthr.h>
+#include <botan/internal/mux_pthr.h>
#include <botan/exceptn.h>
#ifndef _POSIX_C_SOURCE
diff --git a/src/mutex/pthreads/mux_pthr.h b/src/mutex/pthreads/mux_pthr.h
index 118853947..27b854265 100644
--- a/src/mutex/pthreads/mux_pthr.h
+++ b/src/mutex/pthreads/mux_pthr.h
@@ -8,14 +8,14 @@
#ifndef BOTAN_MUTEX_PTHREAD_H__
#define BOTAN_MUTEX_PTHREAD_H__
-#include <botan/mutex.h>
+#include <botan/internal/mutex.h>
namespace Botan {
/*
* Pthread Mutex Factory
*/
-class BOTAN_DLL Pthread_Mutex_Factory : public Mutex_Factory
+class Pthread_Mutex_Factory : public Mutex_Factory
{
public:
Mutex* make();
diff --git a/src/mutex/qt_mutex/info.txt b/src/mutex/qt_mutex/info.txt
index 346f04c81..7b014f886 100644
--- a/src/mutex/qt_mutex/info.txt
+++ b/src/mutex/qt_mutex/info.txt
@@ -2,6 +2,14 @@ define MUTEX_QT
load_on request
+<source>
+mux_qt.cpp
+</source>
+
+<header:internal>
+mux_qt.h
+</header:internal>
+
# I think we want to always use qt-mt, not qt -- not much point in supporting
# mutexes in a single threaded application, after all.
<libs>
diff --git a/src/mutex/qt_mutex/mux_qt.cpp b/src/mutex/qt_mutex/mux_qt.cpp
index 0f670c8b4..da4e5ce5c 100644
--- a/src/mutex/qt_mutex/mux_qt.cpp
+++ b/src/mutex/qt_mutex/mux_qt.cpp
@@ -6,7 +6,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mux_qt.h>
+#include <botan/internal/mux_qt.h>
#include <qmutex.h>
#if !defined(QT_THREAD_SUPPORT)
diff --git a/src/mutex/qt_mutex/mux_qt.h b/src/mutex/qt_mutex/mux_qt.h
index 5aed77f4b..cb396b81d 100644
--- a/src/mutex/qt_mutex/mux_qt.h
+++ b/src/mutex/qt_mutex/mux_qt.h
@@ -9,14 +9,14 @@
#ifndef BOTAN_MUTEX_QT_H__
#define BOTAN_MUTEX_QT_H__
-#include <botan/mutex.h>
+#include <botan/internal/mutex.h>
namespace Botan {
/*
* Qt Mutex
*/
-class BOTAN_DLL Qt_Mutex_Factory : public Mutex_Factory
+class Qt_Mutex_Factory : public Mutex_Factory
{
public:
Mutex* make();
diff --git a/src/mutex/win32_crit_section/info.txt b/src/mutex/win32_crit_section/info.txt
index 1533ca2da..d90b8b64b 100644
--- a/src/mutex/win32_crit_section/info.txt
+++ b/src/mutex/win32_crit_section/info.txt
@@ -1,6 +1,12 @@
define MUTEX_WIN32
-load_on auto
+<source>
+mux_win32.cpp
+</source>
+
+<header:internal>
+mux_win32.h
+</header:internal>
<os>
cygwin
diff --git a/src/mutex/win32_crit_section/mux_win32.cpp b/src/mutex/win32_crit_section/mux_win32.cpp
index 2a967892b..fa6051798 100644
--- a/src/mutex/win32_crit_section/mux_win32.cpp
+++ b/src/mutex/win32_crit_section/mux_win32.cpp
@@ -6,7 +6,7 @@
* Distributed under the terms of the Botan license
*/
-#include <botan/mux_win32.h>
+#include <botan/internal/mux_win32.h>
#include <windows.h>
namespace Botan {
diff --git a/src/mutex/win32_crit_section/mux_win32.h b/src/mutex/win32_crit_section/mux_win32.h
index a91850e71..4bbf6a540 100644
--- a/src/mutex/win32_crit_section/mux_win32.h
+++ b/src/mutex/win32_crit_section/mux_win32.h
@@ -9,14 +9,14 @@
#ifndef BOTAN_MUTEX_WIN32_H__
#define BOTAN_MUTEX_WIN32_H__
-#include <botan/mutex.h>
+#include <botan/internal/mutex.h>
namespace Botan {
/*
* Win32 Mutex Factory
*/
-class BOTAN_DLL Win32_Mutex_Factory : public Mutex_Factory
+class Win32_Mutex_Factory : public Mutex_Factory
{
public:
Mutex* make();