Preserve errno on dlopen
[oweals/openssl.git] / crypto / dso / dso_locl.h
index 980448d25ae17ce9245c495755f7003a53b4bda1..14a0ccb7c0128d488ea36c814afe63feb8fc5881 100644 (file)
@@ -1,15 +1,17 @@
 /*
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
- * Licensed under the OpenSSL licenses, (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *      https://www.openssl.org/source/license.html
- * or in the file LICENSE in the source distribution.
+ *
+ * Licensed under the OpenSSL license (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
  */
+
 #include <stdio.h>
 #include "internal/cryptlib.h"
-#include <openssl/dso.h>
+#include "internal/dso.h"
 #include "internal/dso_conf.h"
+#include "internal/refcount.h"
 
 /**********************************************************************/
 /* The low-level handle type used to refer to a loaded shared library */
@@ -23,7 +25,7 @@ struct dso_st {
      * "Handles" and such go in a STACK.
      */
     STACK_OF(void) *meth_data;
-    int references;
+    CRYPTO_REF_COUNT references;
     int flags;
     /*
      * For use by applications etc ... use this for your bits'n'pieces, don't
@@ -72,8 +74,6 @@ struct dso_meth_st {
     int (*dso_load) (DSO *dso);
     /* Unloads a shared library */
     int (*dso_unload) (DSO *dso);
-    /* Binds a variable */
-    void *(*dso_bind_var) (DSO *dso, const char *symname);
     /*
      * Binds a function - assumes a return type of DSO_FUNC_TYPE. This should
      * be cast to the real function prototype by the caller. Platforms that
@@ -105,4 +105,3 @@ struct dso_meth_st {
     /* Perform global symbol lookup, i.e. among *all* modules */
     void *(*globallookup) (const char *symname);
 };
-