summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src/perl/OpenSSL.xs
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2002-05-15 02:29:01 +0000
committerbeck <beck@openbsd.org>2002-05-15 02:29:01 +0000
commitda347917d3d3e5d3ece379d298f4e183b4828151 (patch)
tree4667bec6fb5a5191ed165d4bf727adbb97475bcb /lib/libssl/src/perl/OpenSSL.xs
parentOpenSSL 0.9.7 (diff)
downloadwireguard-openbsd-da347917d3d3e5d3ece379d298f4e183b4828151.tar.xz
wireguard-openbsd-da347917d3d3e5d3ece379d298f4e183b4828151.zip
OpenSSL 0.9.7 stable 2002 05 08 merge
Diffstat (limited to 'lib/libssl/src/perl/OpenSSL.xs')
-rw-r--r--lib/libssl/src/perl/OpenSSL.xs41
1 files changed, 34 insertions, 7 deletions
diff --git a/lib/libssl/src/perl/OpenSSL.xs b/lib/libssl/src/perl/OpenSSL.xs
index 2267168b79a..6ef66ccc1ee 100644
--- a/lib/libssl/src/perl/OpenSSL.xs
+++ b/lib/libssl/src/perl/OpenSSL.xs
@@ -72,11 +72,38 @@ BOOT:
boot_digest();
boot_err();
boot_ssl();
- boot_OpenSSL__BN();
- boot_OpenSSL__BIO();
- boot_OpenSSL__Cipher();
- boot_OpenSSL__MD();
- boot_OpenSSL__ERR();
- boot_OpenSSL__SSL();
- boot_OpenSSL__X509();
+
+ /* */
+ /* The next macro is the completely correct way to call a C */
+ /* function that uses perl calling conventions but is not */
+ /* registered with perl. */
+ /* */
+ /* The second macro seems to work for this context. (We just */
+ /* need a mark for the called function since we don't have */
+ /* any local variables and what-not.) */
+ /* */
+ /* Unfortunately, we need to do this because these boot_* */
+ /* functions are auto-generated by xsubpp and are normally */
+ /* called from DyncLoader, but we're pulling them in here. */
+ /* */
+#define FULL_callBootFunc(func) { \
+ dSP; \
+ ENTER; \
+ SAVETMPS; \
+ PUSHMARK(SP); \
+ func(); \
+ FREETMPS; \
+ LEAVE; \
+ }
+#define callBootFunc(func) { \
+ PUSHMARK(SP); \
+ func(); \
+ }
+ callBootFunc(boot_OpenSSL__BN);
+ callBootFunc(boot_OpenSSL__BIO);
+ callBootFunc(boot_OpenSSL__Cipher);
+ callBootFunc(boot_OpenSSL__MD);
+ callBootFunc(boot_OpenSSL__ERR);
+ callBootFunc(boot_OpenSSL__SSL);
+ callBootFunc(boot_OpenSSL__X509);