Yet another step in reducing the syshead.h content.
Conditional compilation of sources needs to be based on
a minimum program prefix (config.h only).
Signed-off-by: Alon Bar-Lev <alon.barlev@gmail.com>
Acked-by: David Sommerseth <davids@redhat.com>
Signed-off-by: David Sommerseth <davids@redhat.com>
... | ... |
@@ -31,6 +31,12 @@ |
31 | 31 |
* SUCH DAMAGE. |
32 | 32 |
*/ |
33 | 33 |
|
34 |
+#ifdef HAVE_CONFIG_H |
|
35 |
+#include "config.h" |
|
36 |
+#elif defined(_MSC_VER) |
|
37 |
+#include "config-msvc.h" |
|
38 |
+#endif |
|
39 |
+ |
|
34 | 40 |
#include "syshead.h" |
35 | 41 |
|
36 | 42 |
#if defined(ENABLE_HTTP_PROXY) || defined(ENABLE_PKCS11) || defined(ENABLE_CLIENT_CR) || defined(MANAGMENT_EXTERNAL_KEY) |
... | ... |
@@ -22,6 +22,12 @@ |
22 | 22 |
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | 23 |
*/ |
24 | 24 |
|
25 |
+#ifdef HAVE_CONFIG_H |
|
26 |
+#include "config.h" |
|
27 |
+#elif defined(_MSC_VER) |
|
28 |
+#include "config-msvc.h" |
|
29 |
+#endif |
|
30 |
+ |
|
25 | 31 |
#include "syshead.h" |
26 | 32 |
#include "compat.h" |
27 | 33 |
#include <string.h> |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Data Channel Cryptography OpenSSL-specific backend interface |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_CRYPTO) && defined(ENABLE_CRYPTO_OPENSSL) |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Data Channel Cryptography PolarSSL-specific backend interface |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_CRYPTO) && defined(ENABLE_CRYPTO_POLARSSL) |
... | ... |
@@ -28,6 +28,12 @@ |
28 | 28 |
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 | 29 |
*/ |
30 | 30 |
|
31 |
+#ifdef HAVE_CONFIG_H |
|
32 |
+#include "config.h" |
|
33 |
+#elif defined(_MSC_VER) |
|
34 |
+#include "config-msvc.h" |
|
35 |
+#endif |
|
36 |
+ |
|
31 | 37 |
#include "syshead.h" |
32 | 38 |
|
33 | 39 |
#ifdef ENABLE_CRYPTOAPI |
... | ... |
@@ -22,6 +22,12 @@ |
22 | 22 |
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | 23 |
*/ |
24 | 24 |
|
25 |
+#ifdef HAVE_CONFIG_H |
|
26 |
+#include "config.h" |
|
27 |
+#elif defined(_MSC_VER) |
|
28 |
+#include "config-msvc.h" |
|
29 |
+#endif |
|
30 |
+ |
|
25 | 31 |
#include "syshead.h" |
26 | 32 |
#include "error.h" |
27 | 33 |
#include "mss.h" |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file PKCS #11 OpenSSL backend |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_PKCS11) && defined(ENABLE_CRYPTO_OPENSSL) |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file PKCS #11 PolarSSL backend |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_PKCS11) && defined(ENABLE_CRYPTO_POLARSSL) |
... | ... |
@@ -31,6 +31,12 @@ |
31 | 31 |
* it is called the key_id and is currently 2 bits long. |
32 | 32 |
*/ |
33 | 33 |
|
34 |
+#ifdef HAVE_CONFIG_H |
|
35 |
+#include "config.h" |
|
36 |
+#elif defined(_MSC_VER) |
|
37 |
+#include "config-msvc.h" |
|
38 |
+#endif |
|
39 |
+ |
|
34 | 40 |
#include "syshead.h" |
35 | 41 |
|
36 | 42 |
#if defined(ENABLE_CRYPTO) && defined(ENABLE_SSL) |
... | ... |
@@ -22,6 +22,12 @@ |
22 | 22 |
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
23 | 23 |
*/ |
24 | 24 |
|
25 |
+#ifdef HAVE_CONFIG_H |
|
26 |
+#include "config.h" |
|
27 |
+#elif defined(_MSC_VER) |
|
28 |
+#include "config-msvc.h" |
|
29 |
+#endif |
|
30 |
+ |
|
25 | 31 |
#include "syshead.h" |
26 | 32 |
#include "shaper.h" |
27 | 33 |
#include "memdbg.h" |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Control Channel OpenSSL Backend |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Control Channel PolarSSL Backend |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Control Channel Verification Module |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_CRYPTO) && defined(ENABLE_SSL) |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Control Channel Verification Module OpenSSL implementation |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_OPENSSL) |
... | ... |
@@ -27,6 +27,12 @@ |
27 | 27 |
* @file Control Channel Verification Module PolarSSL backend |
28 | 28 |
*/ |
29 | 29 |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
30 | 36 |
#include "syshead.h" |
31 | 37 |
|
32 | 38 |
#if defined(ENABLE_SSL) && defined(ENABLE_CRYPTO_POLARSSL) |
... | ... |
@@ -25,15 +25,6 @@ |
25 | 25 |
#ifndef SYSHEAD_H |
26 | 26 |
#define SYSHEAD_H |
27 | 27 |
|
28 |
-/* |
|
29 |
- * Only include if not during configure |
|
30 |
- */ |
|
31 |
-#ifdef HAVE_CONFIG_H |
|
32 |
-#include "config.h" |
|
33 |
-#elif defined(_MSC_VER) |
|
34 |
-#include "config-msvc.h" |
|
35 |
-#endif |
|
36 |
- |
|
37 | 28 |
#include "compat.h" |
38 | 29 |
|
39 | 30 |
/* branch prediction hints */ |
... | ... |
@@ -26,6 +26,13 @@ |
26 | 26 |
* Win32-specific OpenVPN code, targetted at the mingw |
27 | 27 |
* development environment. |
28 | 28 |
*/ |
29 |
+ |
|
30 |
+#ifdef HAVE_CONFIG_H |
|
31 |
+#include "config.h" |
|
32 |
+#elif defined(_MSC_VER) |
|
33 |
+#include "config-msvc.h" |
|
34 |
+#endif |
|
35 |
+ |
|
29 | 36 |
#include "syshead.h" |
30 | 37 |
|
31 | 38 |
#ifdef WIN32 |