]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
stop warnings about no previous prototype when compiling shared engines
authorDr. Stephen Henson <steve@openssl.org>
Sun, 30 Jan 2011 01:30:48 +0000 (01:30 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 30 Jan 2011 01:30:48 +0000 (01:30 +0000)
crypto/engine/engine.h
engines/e_capi.c
engines/e_gmp.c
engines/e_padlock.c

index a42e6b1f98e560d2c0b082f3f1ebfc9a7d4b9e74..bfc453fa96a1f3d0d985642693ce5f7a2326cdf1 100644 (file)
@@ -678,6 +678,7 @@ typedef struct st_dynamic_fns {
  * can be fully instantiated with IMPLEMENT_DYNAMIC_CHECK_FN(). */
 typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version);
 #define IMPLEMENT_DYNAMIC_CHECK_FN() \
+       OPENSSL_EXPORT unsigned long v_check(unsigned long v); \
        OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \
                if(v >= OSSL_DYNAMIC_OLDEST) return OSSL_DYNAMIC_VERSION; \
                return 0; }
@@ -700,6 +701,8 @@ typedef unsigned long (*dynamic_v_check_fn)(unsigned long ossl_version);
 typedef int (*dynamic_bind_engine)(ENGINE *e, const char *id,
                                const dynamic_fns *fns);
 #define IMPLEMENT_DYNAMIC_BIND_FN(fn) \
+       OPENSSL_EXPORT \
+       int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \
        OPENSSL_EXPORT \
        int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { \
                if(ENGINE_get_static_state() == fns->static_state) goto skip_cbs; \
index 1925bad5c139dcdc6f00157132277ed2ce82a13d..d4cfdfe4ec850bd4a54677c1d5e2a5b21af4e316 100644 (file)
@@ -1886,6 +1886,8 @@ static int cert_select_dialog(ENGINE *e, SSL *ssl, STACK_OF(X509) *certs)
 #include <openssl/engine.h>
 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
 OPENSSL_EXPORT
+int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns);
+OPENSSL_EXPORT
 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; }
 IMPLEMENT_DYNAMIC_CHECK_FN()
 #else
index c1f5601b62b34f18a36cd6624a3b3e5430bb8eb7..a3d47151ea154b9ed967a9b057589f7c64e95672 100644 (file)
@@ -471,6 +471,8 @@ static int bind_fn(ENGINE *e, const char *id)
 IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
 #else
 OPENSSL_EXPORT
+int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns);
+OPENSSL_EXPORT
 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; }
 #endif
 #endif /* !OPENSSL_NO_DYNAMIC_ENGINE */
index 240b1f9b575972aa3a1697685f31d6633b110a7d..ce7e086553c87f453457b6c45f18adb15367d448 100644 (file)
      ) || \
      (defined(_MSC_VER) && defined(_M_IX86))
 #  define COMPILE_HW_PADLOCK
+#  ifdef OPENSSL_NO_DYNAMIC_ENGINE
 static ENGINE *ENGINE_padlock (void);
+#  endif
 # endif
 #endif
 
+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
+
 void ENGINE_load_padlock (void)
 {
 /* On non-x86 CPUs it just returns. */
@@ -123,6 +127,8 @@ void ENGINE_load_padlock (void)
 #endif
 }
 
+#endif
+
 #ifdef COMPILE_HW_PADLOCK
 /* We do these includes here to avoid header problems on platforms that
    do not have the VIA padlock anyway... */
@@ -196,6 +202,7 @@ padlock_bind_helper(ENGINE *e)
        return 1;
 }
 
+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
 /* Constructor */
 static ENGINE *
 ENGINE_padlock(void)
@@ -213,6 +220,7 @@ ENGINE_padlock(void)
 
        return eng;
 }
+#endif
 
 /* Check availability of the engine */
 static int
@@ -1322,6 +1330,8 @@ static RAND_METHOD padlock_rand = {
 #else  /* !COMPILE_HW_PADLOCK */
 #ifndef OPENSSL_NO_DYNAMIC_ENGINE
 OPENSSL_EXPORT
+int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns);
+OPENSSL_EXPORT
 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns) { return 0; }
 IMPLEMENT_DYNAMIC_CHECK_FN()
 #endif