summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorbcook <>2023-07-05 13:06:06 +0000
committerbcook <>2023-07-05 13:06:06 +0000
commit260f77cf028addd36215686a4f82ebf72c34f238 (patch)
tree7824e88db93abb7f5e2e6b5816d6ca4dc8a890e1 /src/lib
parent0a0b792020542a8a29c5c9a9a40b6e12af3a46a9 (diff)
downloadopenbsd-260f77cf028addd36215686a4f82ebf72c34f238.tar.gz
openbsd-260f77cf028addd36215686a4f82ebf72c34f238.tar.bz2
openbsd-260f77cf028addd36215686a4f82ebf72c34f238.zip
Adjust the public declaration of OpenSSLDie to use a portable
method of indicating that the function does not return. ok tb@
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/libcrypto/crypto.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libcrypto/crypto.h b/src/lib/libcrypto/crypto.h
index 43950e3afc..f91374f496 100644
--- a/src/lib/libcrypto/crypto.h
+++ b/src/lib/libcrypto/crypto.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: crypto.h,v 1.61 2023/07/01 09:04:19 tb Exp $ */ 1/* $OpenBSD: crypto.h,v 1.62 2023/07/05 13:06:06 bcook Exp $ */
2/* ==================================================================== 2/* ====================================================================
3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved. 3 * Copyright (c) 1998-2006 The OpenSSL Project. All rights reserved.
4 * 4 *
@@ -487,7 +487,15 @@ int CRYPTO_mem_leaks(struct bio_st *bio);
487typedef int *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *); 487typedef int *CRYPTO_MEM_LEAK_CB(unsigned long, const char *, int, int, void *);
488int CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb); 488int CRYPTO_mem_leaks_cb(CRYPTO_MEM_LEAK_CB *cb);
489 489
490/* die if we have to */ 490/*
491 * Because this is a public header, use a portable method of indicating the
492 * function does not return, rather than __dead.
493 */
494#ifdef _MSC_VER
495__declspec(noreturn)
496#else
497__attribute__((__noreturn__))
498#endif
491void OpenSSLDie(const char *file, int line, const char *assertion); 499void OpenSSLDie(const char *file, int line, const char *assertion);
492#define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1)) 500#define OPENSSL_assert(e) (void)((e) ? 0 : (OpenSSLDie(__FILE__, __LINE__, #e),1))
493 501